Spring Books RoundupOct 10, 2005 · 4 minute read · Comments
Spring is hip these days, so I decided to learn a bit more about it. I had used Avalon a while ago, I was attracted by its design by component and the way it seemed to lay out a proper infrastructure to build a server application. In the end, I was a bit disappointed, it required a bit too much glue code for my taste and did not provide that much in exchange. I don’t remember if, at that time, it was advertised as IoC (Inversion Of Control) container. This experience is one of the reasons why I did not jump on the Spring ship.
I have read 3 books, here is what I thought of them, briefly:
- Spring: A Developer’s Notebook, by O’Reilly: I enjoyed reading that book, because it is well written and has a good structure. It explains what is dependency injection by doing it without Spring, with Spring. But for a more complete understanding, I would recommend Fowler article. There is an interesting chapter on Swing with Spring. Minor drawbacks is that it does not talk about Spring Timers and has very little on Remoting. But I would recommend that book.
- Spring In Action, by Manning: I was disappointed by that one, because there is not much more information than in O’Reilly, it is a bit less practical to use. While it is a bit more detailed than O’Reilly, I did not find the extra information very useful in general. Remoting is better covered here than in O’Reilly, but there is nothing on Swing.
- Professional Java Development With The Sring Frampework, by Wrox: I liked that one better than Manning, but again information inside is very similar. I find the explanations more complete. Inversion Of Control is well presented (it is even comparing constructor injection with method injection). It gives examples of alternatives to XML configuration. Remoting is covered in greater details than Manning. I would recommend it over Manning anytime, and if it included a Swing chapter, I would recommend it over O’Reilly as well.
Those books showed me Spring could be useful in some projects:
- if you want remoting.
- if you want to promote clean code, then you can promote the “Spring way”. It is a good one.
- if you want to use JSF. Spring makes JSF easy and natural to use.
I am not convinced about Spring when it comes to:
- JDBC or database use: while Spring has a well done framework, Hibernate or iBatis have a very good API that makes Spring abstraction useless.
- MVC: it is does seem that much better than alternatives, nor much less intrusive (OK you can test it easily). Anyway I am not that big a fan of web MVC after having seen real world .NET projects without strict MVC well maintainable. I find the JSF backing beans at least as good and more flexible. Continuation frameworks are interesting too, but I am worried of their performance impact and scalability.
- Transactions: I just don’t think manual transactions are that bad or ugly or less maintainable. But using Spring for them is not necessarily a bad idea either.
Categories: java, spring, book, review