I agree quite a lot with Andrew. In fact, I agree enough that I stopped using 
EJBs around the middle of last year because they are SUCH a pain to build and 
maintain, and because the performance sucks and there's nothing you can do 
about it, even if you pay the high premiums for "advanced" application 
servers.

So, since there aren't really many alternatives I decided to make one as part 
of my open source project Open For Business (www.ofbiz.org or 
sf.net/projects/ofbiz). It's called the Entity Engine. The main idea behind 
it is: have an XML file that describes you data layout, and then handle 
generic persistence functionality through a single class. The GenericValue 
object works just like a value object in the EJB design patterns context but 
is Generic so you don't have to create one for every database table or 
combination of tables. It also handles "View Entities" to combine tables and 
a few other nice features such as JTA transaction support.

The upside of it (which I was chasing) is that it is easy to change the data 
structure and have it update the database and the run-time data layout 
enforcement as well as immediately making new columns and such immediately 
available in the GenericValue objects. So, when you want to change something 
in the data layout, wham, it's done and you can move on to your application 
functionality.

I don't know if it will ever become a standard and replace EJBs, but talk 
about this kind of tool has been going around for a while, and here is one 
implementation of those ideas that is being used in commercial deployments 
and is available open source.

Even if it doesn't replace EJBs for everyone, it certainly has for me, and 
has saved me hundreds of hours and hundreds of thousands of lines of 
generated EJB code (no, I haven't written it by hand in a while, way too much 
work for stupid persistence code).

Later,
-David Jones

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to