Rapid With Spring Roo

433 views

Published on

A brownbag session on Spring roo.

Published in: Education, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
433
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
7
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Rapid With Spring Roo

  1. 1. Rapid with Roo Brownbag 9/13/2013 @MortenLileng
  2. 2. Me • A rusty Java programmer, but … really like to get my hands dirty • Really like good code built on standards • Limited time and desire to build infrastructure code Needed • To build a RESTFul service in hours (off-hours) • A tool that can help me with all infrastructure code, without engineering trade-offs
  3. 3. What is Roo? • Productivity tool • Allows for easy creation of Enterprise Java applications • Runs alongside existing projects • Detects changes made to files, adjusts itself as necessary
  4. 4. What Roo is not • Roo is not a runtime • Roo is not an IDE plugin • Roo is not an annotation processing library • Java EE 6 annotations are not used • Compatible with Java EE 5
  5. 5. Demo roo from scratch $ hint $ persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY $ entity jpa --class ~.domain.Contact --testAutomatically $ field string --fieldName firstName --notNull $ field string --fieldName lastName --notNull $ enum type --class ~.domain.Gender $ enum constant --name FEMALE $ enum constant --name MALE $ field enum --fieldName gender --type ~.domain.Gender --class ~.domain.Contact $ perform eclipse $ controller all --package ~.merkle.roo.web $ perform eclipse $ perform clean package Roo shell commands
  6. 6. Core Technology • Spring Framework • AspectJ
  7. 7. Roo and Spring • Spring Framework is required by Roo • Spring Aspects - using AspectJ definition language • Configurable dependency injection • Other Spring projects may be included – Spring Security – Spring Web Flow – Maven – Java Server Pages • User decides which Spring components to integrate
  8. 8. Roo and Aspects • Aspect Oriented Programming (AOP) framework • Inter-Type Declaration (ITD) • Automatic Code Generation – Interfaces – Methods – Fields
  9. 9. Why use Roo? • Higher Productivity • Compatibility with existing projects • Auto-configuration available: – Java Persistence API (JPA) – Database backend – Dependency injection • Integration with existing technologies – Spring MVC layer – Google Web Toolkit – HTML 5 standard • Easy to pull out – no dependency at a later point
  10. 10. Productivity • Code generated in separate files • Independent from project • ITDs are referenced automatically • Incremental approach to application-building • Technologies and frameworks automatically added on-demand
  11. 11. Compatibility • Compatible with Java EE 5 • SpringSource certified architecture • Automatic maintenance and updates of XML, JSP files
  12. 12. Convenience • Runs in background • Simple command-line interface • Easy to add or remove • Fail-safe, keeps track of changes made to filesystem
  13. 13. References • FX Service checked into SVN • http://www.springsource.org/spring- roo#documentation • http://www.eclipse.org/aspectj/ • http://www.springsource.org/documentation • Slide content: Aleksey Bukin

×