wood burning stoves*
The moose likes Spring and the fly likes My questions for Ashish Sarin about Roo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "My questions for Ashish Sarin about Roo" Watch "My questions for Ashish Sarin about Roo" New topic
Author

My questions for Ashish Sarin about Roo

Jochen Szostek
Ranch Hand

Joined: Mar 23, 2008
Posts: 42

Hello Ashish,

I've got some Roo minded questions for you:

1) How does Roo scaffolding basically work? What goes on behind the scenes when I create a domain model class with some properties?

2) Domain driven scaffolding is awesome. But technological evolution goes fast. So I wonder which technologies (e.g. AspectJ) must I comprehend to further extend Roo using new technologies?

3) How would I generally go about creating a Roo addon? What steps should I undertake?

Thanks a lot in advance,

Jochen Szostek
Ashish Sarin
author
Ranch Hand

Joined: Nov 20, 2000
Posts: 432
    
    5
Hi Jochen,

Let's say you execute controller all command to scaffold Spring Web MVC controllers corresponding to JPA entities in your Roo project. The command is passed to the Spring Web MVC add-on of Roo, which is responsible for processing the command. The Spring Web MVC add-on creates a controller corresponding to each JPA entity in the project. So, the scaffolding in Spring Roo is performed by add-ons.

Coming to the specific example in which you create a JPA entity and define certain properties. If you have created a JPA entity manually, you need to inform Roo that you want Roo to generate the CRUD operations for the entity. You can do so by simply annotating your JPA entity with @RooEntity annotation. When you annotate the JPA entity with @RooEntity annotation, Spring Roo comes to know that this particular JPA entity needs to be managed by Roo. So, Roo goes ahead and informs the add-on which deals with @RooEntity annotation. The add-on then creates the ApectJ ITD file which contains identifier definition, CRUD operations, getters/setter, and so on.

To extend Roo, you need to understand AspectJ ITDs. But, most importantly you need to understand Roo architecture (which includes add-on architecture and core modules of Spring Roo) and gain some understanding about OSGi and maven.

To go about creating an add-on, you need to get conversant with Spring Roo architecture. Spring Roo 1.1 Cookbook talks in detail about creating a simple and advanced Roo add-on. The Spring Roo reference also talk to some extent about creating simple add-ons.

regards
ashish


Author of
Getting started with Spring Framework
Portlets in Action
Spring Roo 1.1 Cookbook
Portlets blogSpring Roo blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My questions for Ashish Sarin about Roo