Re: ORM Pros/Cons
Date: Tue, 17 Mar 2015 12:49:49 +0000
Message-ID: <CABe10sawS96YUjsoC7tp-FukfG9bjSYWbfk-xDErLXWaCgZ72w_at_mail.gmail.com>
From a (java/.net) developer perspective ORMs are great and fit well with the now common agile mindset. They allow the developer to be hugely 'productive' since a large chunk of the database code gets written and rewritten by machine. As these developers often aren't great database developers anyway this is arguably a good thing. This by the way is not intended as a slight - most database people are terrible at thinking procedurally and about object classification etc. This probably means that most projects with ORM in them get to the "actually works" stage quite quickly, and are also "easily changed".
However ORMs do *not* replace thinking about database processing, especially any batch processing, and will generate *some* suboptimal code. Sensible ORMs will leave developers the opportunity to either write manual database code, or to call database stored procedures. Both of these of course are tunable with normal approaches and so are a reasonable thing to do when problems are encountered. Of course every manual piece of code that you or the developers write has to be maintained and so detracts somewhat from the business case for the ORM in the first place.
Like Stephane I have met Hibernate generated code that changed its SQL text from release to release *even if the underlying java code for that section of the app was unchanged * This was not funny since when performance went south after a new release, invariably the database was blamed - often with statements like "but you fixed this exact same problem after the last release"..
On Mon, Mar 16, 2015 at 3:00 PM, stephen van linge < dmarc-noreply_at_freelists.org> wrote:
> I realize "does anyone have an opinion about ORM" is a little silly to
> ask, so instead I ask, from a dba/db developer perspective (so many
> opinions are from the application developer perspective), what pros and
> cons have you all seen with the use of an ORM at the application layer of a
> web app?
>
> Thanks,
>
> Stephen
>
-- Niall Litchfield Oracle DBA http://www.orawin.info -- http://www.freelists.org/webpage/oracle-lReceived on Tue Mar 17 2015 - 13:49:49 CET