Creating a project correctly (discuss)

zubie

Centurion
Joined
Jul 1, 2003
Messages
103
Location
Ireland
Hi All .....

After finishing 2 projects in ASP.net I think I'm begining to get a good enough handle for the language and it quirks (oh and there are some beauties).

I dont think however that I am getting the most out of what I can do in terms of speed of applications and error handling.

My question here is what do other programmers use for error handling (besides the try .. catch) and how do they handle garbage collection and disposing of old resorces.

As an example of this: when looking back at my first project I do all my data access in Web services. These create lots of datasets which return to the UI for databinding and processing. Do I need to dispose of these and run GC or is this handled by .net.

What I'm looking for here really is a discussion on what is the best way to approach speed and damage limitation.

Looking forward to hearing your views.
ZuBiE

ps I would also like to know what type of tools people use when developing and debugging (besides VS). Hell some of them might make life easier for all of us. Cheers
 
On my side... I try to use to more If, switch, or other comparision as possible. Because the try... catch... is really heavy on the memory, it's better to get yourself down to some conditionnal instruction than using the TryCatch way (sometimes you can't do it without)
 
Creating a global error handler will help you to catch all those errors not handled, also, reusing some code is very helpful, about speed and performance it all dependes on what're you doing, in your database it all depends on how well designed it is, are you using Stored Procedures?, Views?, Functions? are there any relationships between your tables?, how many rows in eahc table? are your queries using the indexes? cursors anywhere?.
When you talk about databases many things come up, starting from a really good design, for example, before I came to San Diego there was a guy who said he was a really good database designer, now we're having big headaches trying to make the information coherent, no relationships, no views, the same information is stored in 8,10 or 15 tables, no procedures and the application that reads it (under C++), lots and lots of pointers, constructors everywhere, but just a few destructors, so imagine the memory leaks we had.
You can push the best of .NET doing things the .NET way and not old ways, like many people like to do.
 
I'm on my first ASP.Net project. I, too, am working with a database that is poorly designed...

How do set "global error handler"? any sample code/site?
 
C#:
[size=2][color=#0000ff]override[/color][/size][size=2][color=#0000ff]protected[/color][/size][size=2][color=#0000ff]void[/color][/size][size=2] OnInit(EventArgs e)

{

[/size][size=2][color=#008000]//

[/color][/size][size=2][color=#008000]// CODEGEN: This call is required by the ASP.NET Web Form Designer.

[/color][/size][size=2][color=#008000]//[/color][/size]
[size=2]try
{
InitializeComponent();
[/size][size=2][color=#0000ff]base[/color][/size][size=2].OnInit(e);[/size]
[size=2]}[/size]
[size=2]catch( Exception e)[/size]
[size=2]{[/size]
Response.Write( "Error has happen");
[size=2]}
}

[/size]

lolll didn't even try it !!! But I think that it should work !
HEhe
 
Dont you love using untested code :o)

As for my database, its Access (which says a lot)
I normalized it as much as I could and have relationships between the tables.
Cant use stored procedures but would like to add global error handling.

One big problem I'm having
The server is in another company (I dont control the server, just the code)
It is a domain controller with a max of 3 people using the system. And yet it is reallllllly slow.
When running my own testing on our own server it chugged along fine ...
doing my head in really ...

is there any tools I can use that might point out where the slow down is??
 
Let me look for the global error handler we use here at the office and post it for you later, for the database, Access is a good database for small amounts of data, try to use its capabilities as much as you can, how fast is the link between the offices?, maybe you need to change your strategy of data access and try a webservcies schema.
 
Hi

The server is internal. (ie its in the same building and on the same network)
All my date access is done through webservices.

As I said when tested in our own offices its is fine but in the clients office it is quite slow. I am not responsible for the server or the network in the clients site but I am working with the person who is.

BTW thanks in advance for the error code.

ZuBiE
 
Back
Top