Click here to Skip to main content
15,889,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: the one who know vb.net and cSharp Pin
Luis Alonso Ramos12-May-05 12:18
Luis Alonso Ramos12-May-05 12:18 
GeneralRe: the one who know vb.net and cSharp Pin
mav.northwind12-May-05 23:37
mav.northwind12-May-05 23:37 
GeneralRe: the one who know vb.net and cSharp Pin
Rizwan Bashir13-May-05 2:22
Rizwan Bashir13-May-05 2:22 
Generalopen .exe file Pin
eng.mohamed11-May-05 22:40
eng.mohamed11-May-05 22:40 
GeneralRe: open .exe file Pin
Polis Pilavas12-May-05 0:15
Polis Pilavas12-May-05 0:15 
GeneralNew to remote procedure calls, please help... Pin
AfzalHassen11-May-05 22:16
AfzalHassen11-May-05 22:16 
GeneralOOP concept - C# Pin
Anonymous11-May-05 21:34
Anonymous11-May-05 21:34 
GeneralRe: OOP concept - C# Pin
Peter Vertes12-May-05 12:15
Peter Vertes12-May-05 12:15 
Anonymous wrote:
1. Does 3 and 4 happen every time? The objects get instanciated? Or should the object be maintained in memory for the next call?

Depends on how much memory those object consume and how expensive it is to create/destory them. And another thing to take into consideration is the number of time this will happen. If you have a busy website with a lot of user requests then it would make sense to persist something on the backend for a while. On the other hand if you only have a handful of request then its safe to keep on recreating them. Recreating them is also safers because your object will not retain state from a revious request and chances are much smaller that things will get stale since you are working on a freshly created object. Besides with the speed on modern hardware you should not encounter any problems constantly recreating and destroying objects.


Anonymous wrote:
2. The data retrieved (dataset or should I say view) contains a lot more info (is complete in other words) before the business logic is applied. Shouldn't this dataset persisted in some way to be reused instead of making expensive calls to the database?


Calls to the database are not that expensive anymore. Correction, if you know to use the right way to access the right database then this operation is not that expensive. For example; if you use a SQL Server as your database then you should use the SqlConnection, SqlCommand and SqlDataReader object to work with it. By using these objects the developers at Micosoft guarantee that you will have the fastest means of accessing data from the database. If you use an OdbcConnection, OdbcCommand and OdbcDataReader, even though SQL Server will understand your request, the results will be slower then by using the native Sql* objects.
Also there is a big difference between a DataSet and a DataReader. When reading data from a database through a web application it is very rare you would use a DataSet. DataSets can be slow and can require a lot of memory because a DataSet will read all the data from your database and keep eveything retrieved in memory. I would recommend using a DataReader instead. DataReaders don't create a local copy of the data you requested in local memory because they keep an open connection to the database and only retrieve data that you need at the moment. A really good article about this subject can be found here:
http://aspnet.4guysfromrolla.com/articles/050405-1.aspx
GeneralRe: OOP concept - C# Pin
Anonymous12-May-05 23:18
Anonymous12-May-05 23:18 
QuestionHow to get streaming details from Flash Communication Server using C# Pin
vinu.netguy11-May-05 20:14
vinu.netguy11-May-05 20:14 
QuestionHow to make it happen Windows Control's Event in Code Pin
ye win zaw11-May-05 19:34
ye win zaw11-May-05 19:34 
AnswerRe: How to make it happen Windows Control's Event in Code Pin
Indagro12-May-05 0:02
Indagro12-May-05 0:02 
GeneralRe: How to make it happen Windows Control's Event in Code Pin
ye win zaw12-May-05 0:13
ye win zaw12-May-05 0:13 
GeneralWin form user controls Pin
skrishnasarma11-May-05 19:11
skrishnasarma11-May-05 19:11 
GeneralRe: Win form user controls Pin
Christian Graus11-May-05 19:31
protectorChristian Graus11-May-05 19:31 
GeneralDisplay datetime in C# Pin
hvan220311-May-05 17:58
hvan220311-May-05 17:58 
GeneralRe: Display datetime in C# Pin
Kodanda Pani11-May-05 18:46
Kodanda Pani11-May-05 18:46 
GeneralRe: Display datetime in C# Pin
Christian Graus11-May-05 18:55
protectorChristian Graus11-May-05 18:55 
GeneralRe: Display datetime in C# Pin
hvan220311-May-05 23:26
hvan220311-May-05 23:26 
GeneralRe: Display datetime in C# Pin
leppie12-May-05 2:10
leppie12-May-05 2:10 
GeneralRe: Display datetime in C# Pin
Christian Graus15-May-05 18:15
protectorChristian Graus15-May-05 18:15 
QuestionServer send msgs to client behind firewall? Pin
eyoung7011-May-05 17:12
eyoung7011-May-05 17:12 
AnswerRe: Server send msgs to client behind firewall? Pin
Sebastian Schneider13-May-05 0:24
Sebastian Schneider13-May-05 0:24 
GeneralNetwork problem Pin
felopater11-May-05 15:38
felopater11-May-05 15:38 
GeneralCanceling validation Pin
hhrafn11-May-05 13:33
hhrafn11-May-05 13:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.