qatsi (qatsi) wrote,

Life is Beer

Book Review: Spring in Action (2nd edition), by Craig Walls
When I first came across the topic of inversion of control I was somewhat sceptical. My main unease came from the idea of not knowing the provenance of an injected dependency, and therefore being exposed to potentially malevolent code. When I realised, of course, that in traditional lookup code, the same problem exists - one merely receives a stub implementing an interface and trusts that it will do what it says - I felt less concerned. Having tried out Spring in a couple of projects, I decided I rather liked it, and should get a fuller understanding.

Whilst the Spring website has thorough documentation, it's useful to have a paper reference, and one that's written with a perspective outside of the development team. The book covers all major aspects of using Spring and has lots of useful examples. My own feeling is that the core Spring dependency injection container and AOP features are useful, but the APIs around them less so - the cost of being tied in to a framework is high, and it's quite ironic given a lot of the "theological" objections to EJB from which Spring arose. Indeed, a lot of the Spring APIs expose developers to the base bean anti-pattern. Fortunately, it's quite possible to avoid the tie-in, and it's quite possible to use Spring effectively within an EJB container too. An area I would have liked more discussion of would have been using non-XML based configuration, as I think we could make very interesting use of that, but it's an advanced topic; the book is already large enough, even with an extra chapter and appendices hived off to a free PDF download from the book's web site.
Tags: books
  • Post a new comment


    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.