Monday, June 27, 2011

Spring roo cookbook review by Alex

Thanks to Alex McLintock for writing the first review of Spring Roo Cookbook.
The review is available here: http://www.owal.co.uk/a/springroocookbook

Sunday, June 12, 2011

Roo is for developers

Since Spring Roo 1.0 I've used it in implementing multiple PoC (Proof of Concepts) and applications. I've found it most useful when you understand the underlying Spring and related frameworks, that form part of your application. Roo only generates CRUD operations and UIs, which is not necessarily the case in most real-world applications. Also, you may not use JPA to implement your persistence layer (though Roo is making big leaps towards incorporating support for NoSQL and graph databases). Still, in its current form, it does a lot of heavy lifting to save time in implementing any PoC or application in which Spring plays an important role in the middle-tier.

In many many cases, I used Roo to generate a Spring Web MVC application against a throw-away JPA layer and I moved out of Roo, and  modified the roo-generated application as described here:
1. Deleted the JPA layer, and instead used an in-memory cache or a NoSQL database. Added my own DAO layer for interaction with the cache or NoSQL database.
2. Deleted UI layer of the application, as it was not required in some cases.
3. Modified roo-generated web-tier controllers as per the application requirements. The controllers were accessed via Spring remoting or via HttpClient for sending/receiving JSON objects.
4. Created service layer of the application.
5. Modified pom.xml to not use compile-time weaving and removed or added maven plugins that I needed in the application.
 
It's amazing how fast you can go about developing applications if the boilerplate code and configurations are generated by a tool like Spring Roo, and all you need to do is to tweak the code/configuration to quickly get started with doing what is important, and this is - writing business logic.

Saturday, June 11, 2011