Click here to Skip to main content
15,893,668 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Database connection [modified] Pin
dojohansen15-Apr-09 0:59
dojohansen15-Apr-09 0:59 
GeneralRe: Database connection Pin
Pete O'Hanlon15-Apr-09 1:57
mvePete O'Hanlon15-Apr-09 1:57 
GeneralRe: Database connection Pin
dojohansen15-Apr-09 2:18
dojohansen15-Apr-09 2:18 
GeneralRe: Database connection Pin
Colin Angus Mackay15-Apr-09 2:33
Colin Angus Mackay15-Apr-09 2:33 
GeneralRe: Database connection Pin
dojohansen15-Apr-09 2:58
dojohansen15-Apr-09 2:58 
GeneralRe: Database connection Pin
Pete O'Hanlon15-Apr-09 4:27
mvePete O'Hanlon15-Apr-09 4:27 
GeneralRe: Database connection Pin
Colin Angus Mackay15-Apr-09 2:26
Colin Angus Mackay15-Apr-09 2:26 
GeneralRe: Database connection Pin
dojohansen15-Apr-09 3:27
dojohansen15-Apr-09 3:27 
Colin Angus Mackay wrote:
The internal representation of a DataSet is not XML. That would be increadibly inefficient.


I'll take your word for it. I've read serveral places that it is, for example here[^], which is supposed to be about interview questions for programmers. The relevant bit is point 3. which reads

3.For a dataset XML is the internal representation as well as medium used for output but for a recordset XML is merely an output format.

I am not really sure why you say it would be "incredibly inefficient" as trees aren't generally inefficient structures, at least not in terms of time. Spacewise they might be, although that really depends on whether there's a lot of nodes with little data or a few nodes with plenty - I guess most database data would lend itself towards the first case though.

Colin Angus Mackay wrote:
Using LINQ to Objects you don't have these problems, it is built in to the language and the type discovery is done at compile time so it won't slow your application during run time.


LINQ may be better, but once again you're only proposing alternatives that work if you already have an entity layer. I think you are wrong to assume every application has a lot of business logic. Some servers for example do little more than expose (read only) data to the world.


Colin Angus Mackay wrote:
And where do the business rules fit in to all this?


Oh come on! It's not like basing the business code on datasets is much harder than building it into your entity types - especially if they are generated and the darn tool can't make partial classes. Sure, the typed datasets have awful names but if I include a few aliases in my code file I can write code that is virtually identical to your beloved entity code to do validation.

You don't seem to acknowledge that if you don't use datasets for CRUD and serialization/deserialization you have to use somethign else. LINQ may be a good alternative for CRUD, I must admit I don't like it though, it's totally opaque and one never quite knows what's going on under the hoods, even if it does seem to do a pretty good job at least with LINQ to SQL. I haven't got the experience with it to really judge. But for serialization I really don't think the Serializable attribute is much use for properly designed entity objects, since it only works with public read-write members.

I'll cave in here and say that maybe datasets are the root of all evil, but I refuse to believe that I could do all the things I can do with them using entity objects and linq without a lot more code and a much higher degree of complexity. Smile | :)
GeneralRe: Database connection Pin
dojohansen15-Apr-09 3:30
dojohansen15-Apr-09 3:30 
GeneralRe: Database connection Pin
dojohansen15-Apr-09 3:36
dojohansen15-Apr-09 3:36 
GeneralRe: Database connection Pin
Pete O'Hanlon15-Apr-09 1:54
mvePete O'Hanlon15-Apr-09 1:54 
GeneralRe: Database connection Pin
dojohansen15-Apr-09 2:40
dojohansen15-Apr-09 2:40 
GeneralRe: Database connection Pin
Pete O'Hanlon15-Apr-09 4:38
mvePete O'Hanlon15-Apr-09 4:38 
AnswerRe: Database connection Pin
Colin Angus Mackay11-Apr-09 6:24
Colin Angus Mackay11-Apr-09 6:24 
AnswerRe: Database connection Pin
Fernando Soto11-Apr-09 8:09
Fernando Soto11-Apr-09 8:09 
AnswerRe: Database connection Pin
PIEBALDconsult13-Apr-09 4:16
mvePIEBALDconsult13-Apr-09 4:16 
AnswerRe: Database connection Pin
dojohansen14-Apr-09 22:02
dojohansen14-Apr-09 22:02 
GeneralRe: Database connection Pin
Colin Angus Mackay15-Apr-09 2:37
Colin Angus Mackay15-Apr-09 2:37 
GeneralRe: Database connection Pin
dojohansen15-Apr-09 2:59
dojohansen15-Apr-09 2:59 
GeneralRe: Database connection Pin
Paulo Zemek29-Apr-09 11:48
mvaPaulo Zemek29-Apr-09 11:48 
AnswerRe: Database connection Pin
saanj29-Apr-09 0:01
saanj29-Apr-09 0:01 
GeneralRe: Database connection Pin
EmZan29-Apr-09 0:06
EmZan29-Apr-09 0:06 
Questionsecurity problem in asp.net Pin
deepak baldia9-Apr-09 19:15
deepak baldia9-Apr-09 19:15 
AnswerRe: security problem in asp.net Pin
Colin Angus Mackay10-Apr-09 2:48
Colin Angus Mackay10-Apr-09 2:48 
Questionhello Pin
mohamedmrc9-Apr-09 10:02
mohamedmrc9-Apr-09 10:02 

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.