• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

My questions for Ashish Sarin about Roo

 
Ranch Hand
Posts: 42
Android Google Web Toolkit Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic