|
PIEBALDconsult wrote: The old ways are the best ways
That's what I'm worried about, am I resisting change because I'm a grumpy old bugger who is too set in his way to consider new tech or is it really the piece of crap that it seems.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You're asking the wrong question. Get the young whipper snappers to explain why some new method is better - and to show some measure.
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
I don't think so, really. EF is an ORM - so it creates the interface between you and the DB so that you can tell it to save, retrieve objects from the data store.
Linq to SQL is more ;low level; in that it just creates an SQL statement from C# code, essentially.
In my experience, especially with volatile or large systems, using any ORM is more trouble than it is worth, if you have the SQL skillz in house.
It strikes me as a bit like the drag-and-drop windows development that always used to be shown off when VS was demonstrated - sure, you could knock up a pretty convincing app in a few minutes - but once you got into 'real' development, it all needed to be done 'properly'
I have worked on a few systems using ORM in one way shape or form, and all have suffered through issues - which to be fair may have been through a lack of understanding of the ORM involved, but were real nonetheless.
Having a DAL that accesses the database, that is under your control and (my preference) accesses stored procedures to do the work of storage and retrieval is the most efficient solution; it may take slightly longer to get up a working model, but is more flexible and obviously maintainable in the long run.
As a prime example of EF etc. being used badly, is number of systems that require a datasource for a combo - say countries of the world.
Using my own DAL and SPs I would have an SP that returns a list of country names with their IDs
Using an ORM I have seen time and again the collection returned is countries, states, towns cities etc. etc., causing in some cases a separate query or queries to be run for every country.
Now I am sure it is possible to configure it to not do that, but the fact that I have seen it done so often makes me think that these sort of issues occur more often than not.
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Ok so your another grumpy old bugger resisting change, we seem to be of the same opinion on the subject of accessing the database.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: you're another grumpy old bugger
Well, yes, that's true.
Mycroft Holmes wrote: resisting change,
Now I know what you are saying is a little toungue in cheek, but I do rather tend to stick to the "if it ain't broke, don't fix it" aphorism.
Mycroft Holmes wrote: we seem to be of the same opinion on the subject of accessing the database.
... but one of us is more verbose
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Mycroft Holmes wrote: grumpy old bugger
Mycroft Holmes wrote: be of the same opinion on the subject of accessing the database
Maybe we could form our own sub-group.
|
|
|
|
|
_Maxxx_ wrote: using any ORM is more trouble than it is worth
My thoughts exactly. ORMs are designed to solve just a small easy subset of problems, but many developers think they should be used whenever you access a database. The programs I write have absolutely no use for an ORM at all.
_Maxxx_ wrote: a list of country names with their IDs
Exactly; there is no need to define (manually or automatically) a specific class to hold that information, a DataTable does just fine.
ORMs are the realm of Architecture Astronauts:
http://www.joelonsoftware.com/articles/fog0000000018.html[^]
http://www.joelonsoftware.com/items/2008/05/01.html[^]
|
|
|
|
|
I couldn't have expressed it better.
_Maxxx_ wrote: I agree that Linq to SQL is a heap of doggy-do used by developers too thick to learn SQL (controversial? Maybe)
Maybe to the ones that are thick...
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers.
Buckminster Fuller
|
|
|
|
|
|
|
|
If only!
It's an OO world.
public class Sander : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
I picture Chevy Chase entering the country club dining room.
|
|
|
|
|
Gratz
|
|
|
|
|
Thanks!
It's an OO world.
public class Sander : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
Congratulations !
"What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts.
Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett
|
|
|
|
|
Thank you
It's an OO world.
public class Sander : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
Does that mean I need to call you by a title?
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers.
Buckminster Fuller
|
|
|
|
|
Well, I already have an academic title[^] and you've never called me by that either... But now is a good time to start!
It's an OO world.
public class Sander : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
Somehow I have the feeling that there's more bang in the drs. than in the MCP.
But until you update your signature to implement the MCP and drs. interfaces I'll keep calling you Naerling Sander.
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers.
Buckminster Fuller
|
|
|
|
|
Jörgen Andersson wrote: I'll keep calling you Naerling Sander. Actually this is the first time you called me that (at least to my digital face)
It's an OO world.
public class Sander : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
Congratulations.
Signature construction in progress. Sorry for the inconvenience.
Damn you have the perfect signature - CBadger
|
|
|
|
|
Thanks!
It's an OO world.
public class Sander : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
Congrats!
But you don't wanna read CG's replies from one of my frequent answer(s) for certification questions in Q/A section
|
|
|
|
|
Thank you!
It's an OO world.
public class Sander : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|