Author |
Topic |
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2008-04-17 : 08:08:53
|
Hey allSo I've been a little absent lately, I started a new job at the beginning of March and I've had my head down.My last 18 months has been as a technical solution architect representing a US software company in Sydney, it really didn't involve me writing any code.My new job is a Director of Technology for a non-profit that runs web based services for young people, an awesome gig for me... and I'm writing code again, and enjoying it for the first time in a few years Anyway, my confession is that after 8 years of pushing the stored procs for all data access line, I think I'm losing my religion. I've been prototyping some new features with NHibernate and I'm really impressed. The SQL that is being generated is sane, and fast. I've been arguing for years that ORMs never work well because a good object model just doesn't fit with a well designed database, but I'm managing to retrofit NHibernate into an existing project and it's working.I'm not 100% of the way there yet, I'm working in a separate SVN branch so I can throw away the whole experiment at any time, but so far I haven't found any reasons not to use it.Flame away Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-04-17 : 08:30:14
|
acctually there's nothing to flame. NHibernate rocks!_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-04-17 : 08:48:48
|
Sure there is. NHibernate sucks a$$. My developers use it, and it encourages bad design and has caused nothing but headaches for me. Things got a little better when it added functionality for supporting stored procedures, but before that it was shameful.e4 d5 xd5 Nf6 |
 |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2008-04-17 : 08:58:00
|
But if you use it knowing how to do good design, how does the tool suck ?Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-04-17 : 09:01:15
|
quote: Originally posted by blindman Sure there is. NHibernate sucks a$$. My developers use it, and it encourages bad design and has caused nothing but headaches for me. Things got a little better when it added functionality for supporting stored procedures, but before that it was shameful.e4 d5 xd5 Nf6
no it's not!! stored procedures have no business in a proper ORM. you suxorz, i'm 1337!!! _______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-04-17 : 09:03:58
|
OMFG.e4 d5 xd5 Nf6 |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-04-17 : 09:22:18
|
for the record... i was joking. i do still think that nhibernate kicks ass though._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-04-17 : 10:58:42
|
Wait, are you still joking? Now I am all confused.NHibernate encourages bad database design.Period.Any tool which dictates your architecture is a bad tool. Its the tail wagging the dog.e4 d5 xd5 Nf6 |
 |
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-04-17 : 11:21:02
|
I still think you're a beauty. |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2008-04-17 : 11:26:42
|
imltho anything that binds the client to the database structure is bad.If this gives a separate layer to replace the SP layer then it might be ok but if it's part of the client then I wouldn't be happy.The test is how much you have to change if you change the database structure without changing the data stored.With a stored procedure layer it's just the tables and SP's that access them - you shouldn't even need to test anything outside the database.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-04-17 : 11:45:18
|
> NHibernate encourages bad database design.i'd disagree with you there...the point here is to see what works better for the current situation.there are times when using an orm simply speeds up development.and NHibernate speeds it up good!! let's face it... not all apps are enterprise-y.the problem with ORMs is that they work great for the things they're meant for.the minute you run into something more complex that they can handle they become a nightmare.i agree with Nigel about the client coupling the DB. but again with a good orm this is completly redundant since you auto regenerate the whole db layer._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-04-17 : 14:44:30
|
I would concede that for some non-enterprise applications ORMs are satisfactory.I would not concede that they are satisfactory for ANY enterprise level database applications. You end up trading rapidity of development for quality and flexibility.Its the old triumvarate: speed vs economy vs quality. You get to choose only two of the three, and as you pointed out ORMs are fast and cheap.e4 d5 xd5 Nf6 |
 |
|
|