Concise Learning - Why less is more?
Technology never stop evolving during tough time in GFC and even in stock market flash crash in 2010. Spring in Action, as always good quality as other "in Action" series books from Manning, is in its 3rd generation now. It's not only a revised book, but also recharging your Spring knowledge.
Based on the latest Spring 3.0 technology, Spring in Action adds some fresh contents built only in release 3 that I'm looking for:
• Native support RESTful service
• New Spring Expression Language (SpEL)
• New annotations to reduce configuration and poison XML files
• Last but not least, seamlessly integrated with Spring MVC, Spring Web Flow and Spring Security
All these original and additional Spring contents in a just over 400 pages book is quite amazing. This is another confirmation and confidence Spring team has given that you can build an Enterprise level application in ultra lightweight Spring fashion.
Happy reading!
The problem is that some people don't like XML. Which is OK. If Spring changed to their own DSL to replace the XML that would be fine by me too. What's important is being able to view the config in one place and gain a near immediate understanding of what beans will be live at runtime.
The rule of thumb I reckon is to mix using them:
For configuration that keep changing, e.g., environment depended setting, put into XML; configuration you only write once and never want to see it again, use Annotation. A good example is Annotation in unit test.
For the "auto black magic" scenario, up to you either refactor code with Annotation, make them more intuitive. Or if it's hard, put the configuration into XML and into one place.