Re: learning Hibernate

Tony Spencer <[email protected]>
Newsgroups gmane.org.user-groups.trijug.juglist
Message-ID <C10813B3.A5FF%[email protected]>
Has anyone here tried Torque?  I have been a big proponent for about 4 years
and I still love it.  Seamless data abstraction that performs really well is
hard to argue with.   I have used it on small to massive datasets and it has
performed well across the board.  You can forget SQL (but don't have to if
you don't want to with Torque) and adding new objects or parameters to
objects is mega simple.


On 8/15/06 7:11 PM, "[email protected]" <[email protected]> wrote:

> 
> JDO is not being replaced by JPA. There was a letter Sun published a few years
> ago that gave the world that impression. That letter was written by Sun's EJB
> organization, which naturally wanted everyone to go with JPA. The JDO expert
> group has never had any intention or plans to let the EJB expert group squash
> them. Since then, JDO 2.0 has been adopted as a standard. I can also tell you
> that JDO 2.1/3.0 work has already begun, they are adding annotation support,
> as well as a few other things. You mention the JDO product Kodo, which was
> developed by SolarMetric. SolarMetric has both the Kodo JDO implementation and
> OpenJPA, their open source JDO implementation. These two persistence
> facilities share some common code. SolarMetric was acquired by BEA last year.
> They are planning to continue to support and enhance both JDO (which they are
> charging for) and OpenJDO (which is free, maybe partly because Hibernate JPA
> is free). So the product BEA will be selling for persistence is Kodo JDO. Most
> of the JDO vendors, including the JPOX team, are planning to support both JDO
> and JPA. Why? Because it is unclear which technology will ultimately win and
> they will have both bases covered. But none of the JDO vendors have dropped
> out due to JPA.
> 
> I'd encourage people to compare JDO and JPA. My understanding is that JDO has
> much richer modeling capabilities. JDO is a 2.0 product, JPA is not even
> released as 1.0 yet (as far as I know). If you don't like the queries of
> Hibernate (very SQL based), you will not like the queries of JPA.
> 
>> 
>> From: [email protected]
>> Date: 2006/08/15 Tue PM 06:06:31 EDT
>> To: [email protected]
>> Subject: Re: [Juglist] learning Hibernate
>> 
>> I have tried Hibernate 2/3.0 and I have used
>> JPOX JDO (http://interjavanet.typepad.com/weblog/jdo/index.html)
>> 
>> Originally, I was more inclined to use JDO in the beginning as my
>> thought was
>> that Hibernate is a strictly an O/R implementation where as JDO followed
>> to the JDO Sun specification.  It is my impression that JDO was
>> being replaced by JPA (Java Persistence Architecture). It seems JDO venors
>> such as Kodo has made their code base open source and are moving toward the
>> JPA roadmap. From what I know about EJB 3.0, I have heard is that
>> it was written using hibernate.
>> 
>> I would say if you are interested in using Hibernate, the book Hibernate
>> Quickly
>> is one I suggest. I liked that one better than the Pro Hibernate book.
>> 
>> 
>> 
>> 
>> 
>> 
>> For those that don't like Hibernate's learning curve and its
>> requirement that you learn SQL and relational databases (which you are not
>> supposed to have to learn if you are using an API that really offers
>> transparent object persistence), you should consider JDO 2.0. JDO 2.0 is an
>> officially approved JCP standard, there are over a dozen JDO vendors out
>> there competing for your business (Hibernate has proprietary API from a
>> single source), all supporting a binary compatible API.
>> 
>> With JDO you only work with your Java object model, when navigating the
>> database, and when expressing queries. Except for starting and
>> committing transactions, or issueing a query, your application can strictly
>> navigate your object model without using any JDO API at all. In fact most
>> of your application logic never needs to import and directly use any
>> methods provided in the JDO interface. You can even take existing Java
>> object models and application logic and make them supported in JDO
>> without even rebuilding them, you don't have to add any code to them.
>> 
>> If you used Hibernate because it was free and open source, then
>> consider JPOX at jpox.org, it is free, open source, and was the reference
>> implementation for JDO 2.0. It is unfortunate that when JDO 1.0 came out,
>> there was no free, open source relational implementation. Because
>> Hibernate was free at the time, and no one was willing to spend money on
>> software tools at the time, a lot of companies flocked to Hibernate. But
>> many also chose to buy a JDO implementation to use, but most went with
>> the free Hibernate. Well JPOX is a free JDO implementation supported JDO
>> 2.0. Just give it a try for a subset of your object model you did in
>> Hibernate. Then compare for yourself the difference.
>> 
>>> 
>>> From: Larry Karnowski <[email protected]>
>>> Date: 2006/08/15 Tue AM 10:18:05 EDT
>>> To: Richard Hammer <[email protected]>
>>> CC: juglist <[email protected]>
>>> Subject: Re: [Juglist] learning Hibernate
>>> 
>>> We're using OJB from Apache instead.   I didn't make this decision,
>> but 
>>> from what I've heard of Hibernate I think it was a good one.  AFAIK
>> the 
>>> big difference between OJB and Hibernate is that there is *no* query
>>> language in OJB.  It's all object-based, using the Interpreter
>> pattern 
>>> to build a query.
>>> 
>>> OJB is pretty nice because all you have to learn is another XML
>> config 
>>> file and a new API.  Programming nowadays in Java is always about
>>> learning a new XML config file and an API, right?
>>> 
>>> Another nice thing is that OJB plays nice with an older system.
>> We're 
>>> currently moving our old JDBC factory objects over to OJB.  It's nice
>> to 
>>> be able to write JUnit tests against the factory interface, create a
>> new 
>>> OJB implementation that replaces the JDBC impl, and then use Spring
>> to 
>>> determine which one to use at runtime.  We can ensure that the new
>> OJB 
>>> implementation works the same and performs the same as the JDBC impl
>>> with JUnit, and if we have to, we can roll back to the old
>>> implementation.  (We had to do that at one point.  Now we're fixing
>> the 
>>> bug and will be able to move back to OJB in the next release.)  (IoC
>> ftw!)
>>> 
>>> So my caveats -- I'm pretty experienced with SQL, and I'm pretty
>>> inexperienced with Hibernate.  I'm not recommending OJB over
>> Hibernate. 
>>>   I'm just saying that we're having good success with OJB.
>>> 
>>> Hope this helps,
>>> Larry
>>> 
>>> Richard Hammer wrote:
>>>> I have assumed that it would be good to learn Hibernate, mostly
>> because 
>>>> I've seen many job ads in which Hibernate was listed among the
>> desired 
>>>> skills.
>>>> 
>>>> So I've been working at it.  I've run a few very simple
>> applications. 
>>>> I've read a lot of online documentation and half of the book
>> _Hibernate 
>>>> In Action_.
>>>> 
>>>> It is difficult.  Hibernate does not relieve the developer of the
>>>> requirement to understand relational databases and SQL.  Rather it
>> adds 
>>>> to what the developer must know.  And it appears to be quite a lot
>> to 
>>>> know.  At this stage I would say that learning Hibernate (after one
>> has 
>>>> learned relational databases and SQL) is more work than learning
>>>> relational databases and SQL.
>>>> 
>>>> To use Hibernate successfully it seems that one needs to learn to
>> think 
>>>> in the Hibernate way, and you can't do that until you've "grown up"
>> in a 
>>>> Hibernate world.
>>>> 
>>>> At this point I am still assuming that Hibernate must be a great
>> tool, 
>>>> because so many employers ask for it.
>>>> 
>>>> But I have some doubt because, in a parallel development, for years
>> now 
>>>> many job descriptions have asked for experience with EJB.  But does
>> that 
>>>> prove that EJB is a good technology, or only that lots of people
>> have 
>>>> been caught up in EJB hype?  EJB seems to be losing some if its
>> glamor 
>>>> in what I'm reading recently, and I am given doubt that EJB has
>> ever 
>>>> lived up to its promises.  For all I know the enthusiasm over
>> Hibernate 
>>>> may follow the same pattern.
>>>> 
>>>> See, I used the word "pattern".  Now hire me.
>>>> 
>>>> But, if all this leads up to a question, are there people who are
>> using 
>>>> Hibernate successfully in real, working, mission-critical,
>> applications? 
>>>>   Probably that is a dumb question.  But still it would encourage
>> me to 
>>>> receive an affirmative answer from respectable people on this list
>> whom 
>>>> I know.
>>>> 
>>>> Thank you,
>>>> Rich Hammer
>>>> 
>>>> _______________________________________________
>>>> Juglist mailing list
>>>> [email protected]
>>>> http://trijug.org/mailman/listinfo/juglist_trijug.org
>>> 
>>> -- 
>>> Larry Karnowski
>>> HickoryWind.org, Keeps Callin' Me Home
>>> Americana Music News, Reviews, & Personality
>>> www.hickorywind.org
>>> 
>>> 
>>> _______________________________________________
>>> Juglist mailing list
>>> [email protected]
>>> http://trijug.org/mailman/listinfo/juglist_trijug.org
>>> 
>> 
>> _______________________________________________
>> Juglist mailing list
>> [email protected]
>> http://trijug.org/mailman/listinfo/juglist_trijug.org
>> 
> 
> 
> _______________________________________________
> Juglist mailing list
> [email protected]
> http://trijug.org/mailman/listinfo/juglist_trijug.org
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.