Hi all. I heared a lot about Spring framework and hibernate and I really want to play with them. but I have some questions : 1. are they an easy to learn technologies ? 2. can I relay on their documentation to learn these technologies. I don't want to spend some money right now on some books. 3. is hibernate a replacement for JDBC and spring a replacement for EJB ? thanks.
In order: 1. as any tech they need some attention from the developer. Hibernate is not putting very much presure on dev and following the quick indications found in the documentation will help you to have it working painless. As for Spring, if you feel comfortable with lightweight container you will make it.
2. Hibernate and Spring have the best documentations I ever seen on open source projects.
3. Hibernate is an ORM (Object/Relational Mapping framework) helping the developer to concentrate on Object world (decoupling the OO from relational world - SQL). Spring is a lightweight container and so in a way could be seen as a replacement of application server (containers).
Having been playing with Hibernate for a while now (I'm in the progress of rewriting an application to use it), I can say it is very easy to learn. I did, however, pick up a book - Hibernate: A Developer's Notebook - to get a jump-start on it, but from having perused the documentation and forums on the website, they seem to give enough information to get one going quickly.
It really is very easy to learn, so much so that you'll be surprised.
Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
1. both, spring and hibernate, are easy to start with. might get more complicated if you get over the "hello world" stuff and try to solve some real world problems with 'em. 2. both projects have good documentation, i would even say that they are among the best docs i've seen for open source / non commercial projects. i know from myself that writing docs is not the fun part so i really appreciate the docs hibernate and spring team created. (i would not go for the "developers notebook" since it only covers the easy things you can also get from the (excelent) hibernate docs. i dont know about the "hibernate in action" yet (i ordered it on bookpool but they are out of stock) but i guess you get more insights.) 3. hibernate builds upon JDBC. it can be a replacement for your own persistence code if you need to persist Object to a RDBMS (how many times have you written the same stupid try/catch/finally PreparedStatement-ResultSet stuff over and over in your code ?)
Joined: Jul 12, 2004
Originally posted by pascal betz: [...] (how many times have you written the same stupid try/catch/finally PreparedStatement-ResultSet stuff over and over in your code ?)
LOL. You will still need some try/catch/finally in Hibernate2 to manage the Session (to solve the HibernateExceptions ;-)). This is changed only in Hibernate3 where HibernateException is now runtime exception.
Originally posted by John Todd: Hi all. I heared a lot about Spring framework and hibernate and I really want to play with them. but I have some questions : 1. are they an easy to learn technologies ? thanks.
Both technology is easy to learn Because both tectnology have several tutorial/document on the internet.
Originally posted by John Todd: Hi all. I heared a lot about Spring framework and hibernate and I really want to play with them. but I have some questions :
2. can I relay on their documentation to learn these technologies. I don't want to spend some money right now on some books.
Yes, you can.
But you shoulde be have some book, it better than..
Originally posted by John Todd: Hi all. I heared a lot about Spring framework and hibernate and I really want to play with them. but I have some questions : 3. is hibernate a replacement for JDBC and spring a replacement for EJB ? thanks.
Hibernate is a powerful, ultra-high performance object/relational persistence and query service for Java. Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based Criteria and Example queries. Hibernate is now the most popular object/relational mapping solution for Java.
Java/J2EE application framework based on [Expert One-on-One J2EE Design and Development] by Rod Johnson. Includes JavaBeans-based configuration, an AOP framework, declarative transaction management, JDBC and Hibernate support, and a web MVC framework.
Java Developer, Thailand
Joined: Jun 19, 2001
LOL. You will still need some try/catch/finally in Hibernate2 to manage the Session (to solve the HibernateExceptions ;-)). This is changed only in Hibernate3 where HibernateException is now runtime exception
Mind if I second the opinions voiced above? My team is an early Spring adopter. We have used both Spring and Hibernate on some chunky projects and are very happy with both of them.
are they an easy to learn technologies ? Well, how much do you already know, what parts of Spring do you want to adopt, and are you an easy learner? The transparent persistence of O/R mappers (Hibernate, in this case) can throw you initially if you're just used to JDBC. It will take a bit of time for you to get the hang of producing a good O/R mapping. The Spring framework is actually a multitude of frameworks. It's huge. Fortunately it's all independent, so you can pick the stuff you're interested in and learn it bit by bit. What might take you a bit of time is getting to grips with AOP concepts, but fortunately you can use declarative transaction support without understanding AOP. Similarly, the flexibility of the MVC framework might confuse you: compared to, say, Struts, it can be elusive because it is so much less rigid. It's worth it though.
can I relay on their documentation to learn these technologies. I can only echo what has already been said: documentation for both projects is well above average. Do buy a few books, though, certainly if you're working in a commercial setting: they will quickly earn themselves back.
is [...] spring a replacement for EJB? It is and it isn't. It does not attempt to replace EJBs in the things they were designed for, specifically distributed systems and MDBs; it complements and enhances EJBs in such cases. However, it does provide an alternative for a couple of common situations where EJBs are a less than perfect fit, for example the business tier in a collocated (single-JVM) system where you might use EJBs simply to give structure to your code and benefit from their declarative transactions. In such situations, Spring does a much better job than EJBs used to do.
Do explore the Spring/Hibernate stack; in my opinion & experience, they do live up to the hype for a broad range of problems.
- Peter [ September 03, 2004: Message edited by: Peter den Haan ]