News for hackers. Stuff that matters.
Re:ORMs don’t kill databases. Developers do. by escoz on Tuesday August 30, 2011 @08:43AM (#2941158)
I agreed with you until the point that you said to replace things with stored procedures and in-memory tables.

Having the two different contexts for logic, code and SPs makes things a thousand times harder to debug and maintain, making the cost of anything skyrocket.

ORMs are indeed awesome, but the solution for problems like this is not to take ORM out of the way, is to work with it to make it work better.

Re:ORMs don’t kill databases. Developers do. by ap22213 on Tuesday August 30, 2011 @08:47AM (#2941175)
Why is that more difficult? It seems like it worked fine for two teams I worked with. What are other common or better ways to get around this?
Re:ORMs don’t kill databases. Developers do. by escoz on Tuesday August 30, 2011 @09:10AM (#2941252)
the big problem is that it makes refactoring and changing logic much harder, as you now two different places to maintain business logic.

In my experience, most problems that DBAs would like to use SPs for can be easily solved by refactoring/merging SQL calls and proper caching of objects during a request or session, two things that an ORM really help you with.

Re:ORMs don’t kill databases. Developers do. by Ingaz on Tuesday August 30, 2011 @11:32AM (#2941860)
I think that object oriented languages (e.g. java) is not well suited for business logic.

Putting all logic in DB also provides natural separation of concerns. UI in one place, business logic in another.

Re:ORMs don’t kill databases. Developers do. by escoz on Tuesday August 30, 2011 @02:37PM (#2942653)
What? So you think Java is not expressive enough for business logic, and you think it's better to move that logic to PLSQL? Seriously?

Java may not be the best language for some things, and that's why you use DSLs, but moving that to the place you store the data is probably the worst thing you can do 99% of the time.

Re:ORMs don’t kill databases. Developers do. by Ingaz on Wednesday August 31, 2011 @07:59AM (#2945163)
Yes.

Business logic as far as possible must be expressed in declarative way.

Java have very poor facilities for declarative programming.

SQL (not PL/SQL) on other side - is pure declarative language. It's already powerful DSL if you master it.

And yes, I agree with you, that writing logic in PL/SQL (as in imperative language) is equally terrible as writing it in Java.

Re:ORMs don’t kill databases. Developers do. by escoz on Wednesday August 31, 2011 @09:39AM (#2945465)
Omg.. this is getting worse.

SQL is a DSL to deal with sets of data. Unless the application you're writing is a database management app, you're pretty much doing it really wrong, I'm sorry to tell you that.

Re:ORMs don’t kill databases. Developers do. by Ingaz on Thursday September 01, 2011 @07:06AM (#2949478)
>>SQL is a DSL to deal with sets of data

What's wrong with this?

Can you imagine process of billing campaign?

Than try it in Hibernated database and in raw SQL.

Pure SQL will be thousands times faster.

ORMs are good only for smth like Django Admin