Re: ORM or JDBC?
On 03/24/2011 04:17 AM, Silvio wrote:
On 03/23/2011 09:45 AM, carmelo wrote:
Hi everybody,
I would like your opinion regarding the use of ORM in web applications
built with GWT. I'm a little reconsider about the ORM, and I wonder
whether it is worth to use in web applications built with GWT. What
would be real advantages in addition to greater independence and
portability?
Waiting for your comments :)
If you consider the database a serialization/deserialization tool for your
domain objects than an ORM might be your best choice.
If the database is a deliverable on its own that will be used by other
applications, either custom or standard stuff like reporting, analytical
processing, ETL ..., or is pre-existing for similar reasons, then an ORM is
usually more trouble than its worth.
Bullshit.
Besides the fact that you are vague about "usually", "trouble" and "its
worth", others' experience is the exact opposite.
JPA ORMs work great on existing databases used by multiple functional units.
They save a tonne of trouble and add very little, if properly approached.
They provide great worth. You can very quickly get to the object model needed
by the functional unit off any data source, shared or not, whether that model
differs from other consumers of the data store or not. It saves you
boilerplate, cleans up separation of layers, and smooths the core logic of an
application to use JPA.
Why would a database's pre-existence have any negative effect whatsoever on
the value of an ORM?
If anything, JPA's value is all the greater in that scenario. You focus one
set of effort on getting the mapping right, a separate set on the logic, you
actually get increased parallelization of work in a team, especially across
all those multiple consumers of the data.
That is not to say that every functional unit would use only JPA. It has
limits. Just not the ones you said.
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg