SlideShare a Scribd company logo
Chicago, October 19 - 22,
2010
Next Generation Spring MVC
with Spring Roo
Stefan Schmidt & Keith Donald
Agenda
•  Mastering Spring MVC with Spring Roo
•  Keeping up with project domain changes
•  View scaffolding & customization
•  How social is your application?
•  Does your application speak Spanish?
•  How secure is your application?
•  Going with the flow
Mastering Spring MVC
with Spring ROO
Master Spring MVC with Spring Roo
•  Best-practice Spring MVC out of the box
–  REST support
–  Round tripping of View artifacts
–  Strong Templating support
–  Theming support
–  Pagination support
–  i18n & i11n built-in
–  Form validation based on JSR 303
–  Tested on popular Web browsers & Web containers
REST Support - Form Handling
Resource GET PUT POST DELETE
Collection URI such as
http://tld.com/pizzashop/
toppings
List members of
the collection
(pagination
possible)
Not used. Create
new
resource
Not used.
Member URI such as
http://tld.com/pizzashop/
toppings/5
Retrieve addressed
resource
Update the
addressed
resource
Not used. Delete the
addressed
resource
Member URI such as
http://tld.com/pizzashop/
toppings?form
Creates a initialized
but empty form for
the resource
(create use-case)
Not used. Not used. Not used.
Member URI such as
http://tld.com/pizzashop/
toppings/5?form
Creates an
initialized form pre-
populated with data
of resource (update
use-case)
Not used. Not used. Not used.
REST Support - Customizable JSON Binding
•  Roo offers two methods for integrating JSON binding:
–  Option 1: Spring MVC detects Jackson
•  @RequestBody & @ResponseBody
•  ContentNegotiatingViewResolver
–  Option 2: Built-in JSON handling managed in domain layer
•  Customizable FlexJson integration
Spring Roo MVC Scaffolding Options
•  Generation of Web artifacts
–  controller scaffold
•  generate a controller for a given entity
–  controller all
•  generate controllers for all entities without an existing
controller
–  controller class
•  generate a simple Spring @MVC controller with a post and a
get method
DEMO
View scaffolding
Keeping up with project
domain changes
Keeping up with project domain changes
Past: Roo 1.0.x all-or-nothing approach
–  either manage view templates manually after initial scaffold,
–  or abstain from customization of JSP view artifacts
Future: Roo 1.1.x intelligent round-tripping
–  introduction of customizable tag library
–  reduction of JSP code by ~90%
–  JSPs are now user editable
JSP View Round-Tripping
•  Customizable Tag libraries
–  every tag has three common attributes
•  ‘id’ is used by Roo to identify tags via Xpath (required)
•  ‘z’ is used to store a hash code which determines who ‘owns’
the tag (required)
•  ‘render’ can be used to omit form rendering of the tag
JSP View Round Tripping Cont.
Example jspx file:
<form:update	
  id="fu_com_foo_Person"	
  modelAttribute="person"	
  path="/people"	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  z="3lX+WZW4CQVBb7OlvB0AvdgbGRQ=">	
  
	
  	
  <field:datetime	
  dateTimePattern="${person_birthday_date_format}"	
  field="birthDay"	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  id="c_com_foo_Person_birthDay"	
  z="dXnEoWaz4rI4CKD9mlz+clbSUP4="/>	
  
	
  	
  <field:select	
  field="car"	
  id="c_com_foo_Person_car"	
  itemValue="id"	
  items="${cars}"	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  path="/cars"	
  z="z2LA3LvNKRO9OISmZurGjEczHkc="/>	
  
	
  	
  <field:select	
  field="cars"	
  id="c_com_foo_Person_cars"	
  itemValue="id"	
  items="${cars}"	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  multiple="true"	
  path="/cars"	
  z="c0rdAISxzHsNvJPFfAmEEGz2LU4="/>	
  
</form:update>	
  
Hash Key Calculation
Things included in hash code
calulation
Things not included in hash key
calculation
Element name (name only, not
namespace)
Name space of element names
Attribute names present in element White spaces used in the element
Attribute values present in the element Potential child elements
The ‘z’ attribute and its value
Any attribute (and value) whose name
starts with '_'
The order of the attributes does not
contribute to the value of a hash key
DEMO
View round-tripping
View Scaffolding &
Customization
View Scaffolding & Customization
•  Roo MVC views offer numerous customization points:
–  Spring Theming support via CSS (and graphics)
–  Global template structural adjustments via Tiles
–  Page structure changes in JSP pages
–  Portable templates through JSP tag library
– 
Roo Default Tag Library
•  Spring JavaScript
•  Dojo Toolkit
•  Easy XML-based tags (no .java required)
•  Tags for
–  form handling
–  field rendering
–  util (pagination, page decoration, language selection, …)
DEMO
View customization
How social is your application?
Embedding Social Features
Embedding Social Features
Roo offers two shell commands to install features:
•  Option 1
–  web mvc embed generic --url http://www.youtube.com/watch?v=Gb1Z0lfl52I
–  automatic detection of social feature based on domain name
–  easiest way to get a feature embedded
•  Option 2
–  web mvc embed map --provider GOOGLE_MAPS --location "Sydney,
Australia”
–  web mvc embed finances --stockSymbol VMW
–  specification of type of social feature
–  better supported through tab completion
DEMO
Embedding Social Features
Does your app speak
Spanish?
i18n & l11n Support
•  Roo MVC scaffolding now defaults to locale ‘en’
–  install more languages with ‘web mvc install --language es’
command
–  choice between 6 languages
–  very easy publishing of new languages
•  addon create i18n --topLevelPackage com.foo.ru --locale ru --messageBundle
<path-to>/messages_fr.properties
•  see slides for session ‘Hello, RooBot: Writing and Distributing Your Own
Spring Roo Add-Ons’
i18n & l11n Support
•  Roo MVC scaffolding uses two artifacts for managing
localization (l11n) & internationalization (i18n)
–  application.properties
•  application / domain specific messages
•  managed by Roo round tripping
–  messages_XX.properties
•  non- application / domain specific messages
•  never touched by Roo after initial install
How secure is your
application?
Integrating Spring Security
•  One simple command
–  security setup
–  URL-based security with applicationContext-security.xml
<http	
  auto-­‐config="true"	
  use-­‐expressions="true">	
  
	
  	
  <form-­‐login	
  login-­‐processing-­‐url="/resources/j_spring_security_check"	
  login-­‐	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  page="/login"	
  authentication-­‐failure-­‐url="/login?login_error=t"/>	
  
	
  	
  <logout	
  logout-­‐url="/resources/j_spring_security_logout"/>	
  
	
  	
  <intercept-­‐url	
  pattern="/choices/**"	
  access="hasRole('ROLE_ADMIN')”/>	
  	
  
	
  	
  <intercept-­‐url	
  pattern="/resources/**"	
  access="permitAll"	
  />	
  
	
  	
  <intercept-­‐url	
  pattern="/**"	
  access="permitAll"	
  />	
  
</http>	
  
Going with the Flow
Spring Web Flow
•  One simple command
–  web flow
–  integrates Spring Web Flow into application
DEMO
Securing Your Application
Spring Web Flow
Selenium Tests
Resources & Links
•  Home → http://www.springsource.org/roo
–  Contains links to all other resources
•  Forum → http://forum.springsource.org
–  Roo team actively monitor forum and answer queries
•  Issues → http://jira.springframework.org/browse/ROO
•  Twitter → @SpringRoo
–  Follow for updates, or include in tweets so we see them
•  Contact details
–  Keith Donald @kdonald, kdonald@vmware.com
–  Stefan Schmidt @schmidtstefan, schmidts@vmware.com
Q&A

More Related Content

PDF
Structured web apps
Sheng Tian
 
PPTX
Ruby on rails for beginers
shanmukhareddy dasi
 
PDF
Avik_RailsTutorial
tutorialsruby
 
PPTX
Server-side Web development via Ruby on Rails
g3ppy
 
PPT
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Antonio Peric-Mazar
 
PPTX
Laravel Eloquent ORM
Ba Thanh Huynh
 
PPTX
SPCA2013 - SharePoint Hosted Apps and Javascript
NCCOMMS
 
PPTX
Laravel ppt
Mayank Panchal
 
Structured web apps
Sheng Tian
 
Ruby on rails for beginers
shanmukhareddy dasi
 
Avik_RailsTutorial
tutorialsruby
 
Server-side Web development via Ruby on Rails
g3ppy
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Antonio Peric-Mazar
 
Laravel Eloquent ORM
Ba Thanh Huynh
 
SPCA2013 - SharePoint Hosted Apps and Javascript
NCCOMMS
 
Laravel ppt
Mayank Panchal
 

What's hot (20)

PDF
Introduction to asp.net
SHADAB ALI
 
PPTX
Laravel introduction
Simon Funk
 
PPTX
ASP.NET - Introduction to Web Forms and MVC
Bilal Amjad
 
PPTX
Java Server Pages
Shah Nawaz Bhurt
 
PPT
Be project ppt asp.net
Sanket Jagare
 
PPTX
Yii 2.0 overview - 1 of 2
Cassiano Surek
 
PPTX
MVC - Introduction
Sudhakar Sharma
 
PPTX
Integrating Alfresco with Portals
Piergiorgio Lucidi
 
PPTX
Introduction to ASP.NET
Peter Gfader
 
PPTX
Single Page Applications on JavaScript and ASP.NET MVC4
Yuriy Shapovalov
 
PPTX
Introduction to laravel framework
Ahmad Fatoni
 
PDF
OpenCms Days 2015 Advanced Solr Searching
Alkacon Software GmbH & Co. KG
 
PPT
What Is Hobo ?
Evarist Lobo
 
PDF
Sightly - AEM6 UI Development using JS and JAVA
Yash Mody
 
PDF
Building RESTful applications using Spring MVC
IndicThreads
 
PPTX
Asp .net folders and web.config
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Java server pages
Apoorv Anand
 
PDF
20jsp
Adil Jafri
 
Introduction to asp.net
SHADAB ALI
 
Laravel introduction
Simon Funk
 
ASP.NET - Introduction to Web Forms and MVC
Bilal Amjad
 
Java Server Pages
Shah Nawaz Bhurt
 
Be project ppt asp.net
Sanket Jagare
 
Yii 2.0 overview - 1 of 2
Cassiano Surek
 
MVC - Introduction
Sudhakar Sharma
 
Integrating Alfresco with Portals
Piergiorgio Lucidi
 
Introduction to ASP.NET
Peter Gfader
 
Single Page Applications on JavaScript and ASP.NET MVC4
Yuriy Shapovalov
 
Introduction to laravel framework
Ahmad Fatoni
 
OpenCms Days 2015 Advanced Solr Searching
Alkacon Software GmbH & Co. KG
 
What Is Hobo ?
Evarist Lobo
 
Sightly - AEM6 UI Development using JS and JAVA
Yash Mody
 
Building RESTful applications using Spring MVC
IndicThreads
 
Asp .net folders and web.config
baabtra.com - No. 1 supplier of quality freshers
 
Java server pages
Apoorv Anand
 
20jsp
Adil Jafri
 
Ad

Viewers also liked (20)

PPTX
Växjö13
Kristina Alexanderson
 
PPTX
InternetiskolanSETT2012
Kristina Alexanderson
 
PPTX
Extreme Fat Loss
Partha Pratim Chowdhury
 
PPTX
Internet-webbstjärnan
Kristina Alexanderson
 
PDF
Cv John Smits 101212
johnsmits37
 
PPT
RCSS General Slides Low Res
stevefinnie
 
PPTX
Geekgirls_creativecommons
Kristina Alexanderson
 
PPTX
Västerås, om webbstjärnan
Kristina Alexanderson
 
PPT
Humanely Speaking
Jeanne Winstead
 
PPTX
cciskolan
Kristina Alexanderson
 
PPT
Adab Menjaga Fitrah Lelaki & Perempuan
uia
 
PDF
Twelve Hotel 2007 Press Book
Twelve Hotel Galway
 
PPTX
Sociala medier läromedel
Kristina Alexanderson
 
PPTX
Question four
Leon Thomas
 
PPTX
upphovsrätt och elever
Kristina Alexanderson
 
PPTX
Pandemics Week 3 Presentation Summary 1 D
guest7a4f92
 
PPTX
kreativitetggm12
Kristina Alexanderson
 
PDF
1263482098bsb00000533
guest3c97158
 
InternetiskolanSETT2012
Kristina Alexanderson
 
Extreme Fat Loss
Partha Pratim Chowdhury
 
Internet-webbstjärnan
Kristina Alexanderson
 
Cv John Smits 101212
johnsmits37
 
RCSS General Slides Low Res
stevefinnie
 
Geekgirls_creativecommons
Kristina Alexanderson
 
Västerås, om webbstjärnan
Kristina Alexanderson
 
Humanely Speaking
Jeanne Winstead
 
Adab Menjaga Fitrah Lelaki & Perempuan
uia
 
Twelve Hotel 2007 Press Book
Twelve Hotel Galway
 
Sociala medier läromedel
Kristina Alexanderson
 
Question four
Leon Thomas
 
upphovsrätt och elever
Kristina Alexanderson
 
Pandemics Week 3 Presentation Summary 1 D
guest7a4f92
 
kreativitetggm12
Kristina Alexanderson
 
1263482098bsb00000533
guest3c97158
 
Ad

Similar to Next Generation Spring MVC with Spring Roo (20)

PDF
Building Next-Gen Web Applications with the Spring 3 Web Stack
Jeremy Grelle
 
PDF
REST based web applications with Spring 3
Oliver Gierke
 
PDF
Spring roo-docs
Kamlesh Singh
 
PDF
Resource Handling in Spring MVC 4.1
Rossen Stoyanchev
 
KEY
Multi Client Development with Spring
Joshua Long
 
PDF
Multi Client Development with Spring - Josh Long
jaxconf
 
PDF
Philly Spring UG Roo Overview
krimple
 
PPT
Spring Roo and the Cloud (Tutorial) [5th IndicThreads.com Conference On Java,...
IndicThreads
 
PDF
Confess_2011 - Rapid Rich Client Development with Spring Roo and GWT
Kai Wähner
 
PDF
gvNIX Rapid Application Development for Java
DISID
 
PDF
Spring MVC to iOS and the REST
Roy Clarkson
 
PDF
Spring mvc
Guo Albert
 
PDF
RESTful web
Alvin Qi
 
PPT
Indic threads java10-spring-roo-and-the-cloud
Shekhar Gulati
 
PPTX
RESTful design
Robert MacLean
 
PDF
Spring Roo Add-On Development & Distribution
Stefan Schmidt
 
PDF
Sping roo intro_2013
Darren Rogan
 
PDF
Building Flexible APIs with Spring HATEOAS
VMware Tanzu
 
PDF
Rest
Brian Kaney
 
PPTX
A Deep Dive into RESTful API Design Part 2
VivekKrishna34
 
Building Next-Gen Web Applications with the Spring 3 Web Stack
Jeremy Grelle
 
REST based web applications with Spring 3
Oliver Gierke
 
Spring roo-docs
Kamlesh Singh
 
Resource Handling in Spring MVC 4.1
Rossen Stoyanchev
 
Multi Client Development with Spring
Joshua Long
 
Multi Client Development with Spring - Josh Long
jaxconf
 
Philly Spring UG Roo Overview
krimple
 
Spring Roo and the Cloud (Tutorial) [5th IndicThreads.com Conference On Java,...
IndicThreads
 
Confess_2011 - Rapid Rich Client Development with Spring Roo and GWT
Kai Wähner
 
gvNIX Rapid Application Development for Java
DISID
 
Spring MVC to iOS and the REST
Roy Clarkson
 
Spring mvc
Guo Albert
 
RESTful web
Alvin Qi
 
Indic threads java10-spring-roo-and-the-cloud
Shekhar Gulati
 
RESTful design
Robert MacLean
 
Spring Roo Add-On Development & Distribution
Stefan Schmidt
 
Sping roo intro_2013
Darren Rogan
 
Building Flexible APIs with Spring HATEOAS
VMware Tanzu
 
A Deep Dive into RESTful API Design Part 2
VivekKrishna34
 

Recently uploaded (20)

PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
PPTX
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
GYTPOL If You Give a Hacker a Host
linda296484
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPT
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Software Development Company | KodekX
KodekX
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
GYTPOL If You Give a Hacker a Host
linda296484
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Doc9.....................................
SofiaCollazos
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Software Development Company | KodekX
KodekX
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 

Next Generation Spring MVC with Spring Roo

  • 1. Chicago, October 19 - 22, 2010 Next Generation Spring MVC with Spring Roo Stefan Schmidt & Keith Donald
  • 2. Agenda •  Mastering Spring MVC with Spring Roo •  Keeping up with project domain changes •  View scaffolding & customization •  How social is your application? •  Does your application speak Spanish? •  How secure is your application? •  Going with the flow
  • 4. Master Spring MVC with Spring Roo •  Best-practice Spring MVC out of the box –  REST support –  Round tripping of View artifacts –  Strong Templating support –  Theming support –  Pagination support –  i18n & i11n built-in –  Form validation based on JSR 303 –  Tested on popular Web browsers & Web containers
  • 5. REST Support - Form Handling Resource GET PUT POST DELETE Collection URI such as http://tld.com/pizzashop/ toppings List members of the collection (pagination possible) Not used. Create new resource Not used. Member URI such as http://tld.com/pizzashop/ toppings/5 Retrieve addressed resource Update the addressed resource Not used. Delete the addressed resource Member URI such as http://tld.com/pizzashop/ toppings?form Creates a initialized but empty form for the resource (create use-case) Not used. Not used. Not used. Member URI such as http://tld.com/pizzashop/ toppings/5?form Creates an initialized form pre- populated with data of resource (update use-case) Not used. Not used. Not used.
  • 6. REST Support - Customizable JSON Binding •  Roo offers two methods for integrating JSON binding: –  Option 1: Spring MVC detects Jackson •  @RequestBody & @ResponseBody •  ContentNegotiatingViewResolver –  Option 2: Built-in JSON handling managed in domain layer •  Customizable FlexJson integration
  • 7. Spring Roo MVC Scaffolding Options •  Generation of Web artifacts –  controller scaffold •  generate a controller for a given entity –  controller all •  generate controllers for all entities without an existing controller –  controller class •  generate a simple Spring @MVC controller with a post and a get method
  • 9. Keeping up with project domain changes
  • 10. Keeping up with project domain changes Past: Roo 1.0.x all-or-nothing approach –  either manage view templates manually after initial scaffold, –  or abstain from customization of JSP view artifacts Future: Roo 1.1.x intelligent round-tripping –  introduction of customizable tag library –  reduction of JSP code by ~90% –  JSPs are now user editable
  • 11. JSP View Round-Tripping •  Customizable Tag libraries –  every tag has three common attributes •  ‘id’ is used by Roo to identify tags via Xpath (required) •  ‘z’ is used to store a hash code which determines who ‘owns’ the tag (required) •  ‘render’ can be used to omit form rendering of the tag
  • 12. JSP View Round Tripping Cont. Example jspx file: <form:update  id="fu_com_foo_Person"  modelAttribute="person"  path="/people"                                  z="3lX+WZW4CQVBb7OlvB0AvdgbGRQ=">      <field:datetime  dateTimePattern="${person_birthday_date_format}"  field="birthDay"                                            id="c_com_foo_Person_birthDay"  z="dXnEoWaz4rI4CKD9mlz+clbSUP4="/>      <field:select  field="car"  id="c_com_foo_Person_car"  itemValue="id"  items="${cars}"                                            path="/cars"  z="z2LA3LvNKRO9OISmZurGjEczHkc="/>      <field:select  field="cars"  id="c_com_foo_Person_cars"  itemValue="id"  items="${cars}"                                            multiple="true"  path="/cars"  z="c0rdAISxzHsNvJPFfAmEEGz2LU4="/>   </form:update>  
  • 13. Hash Key Calculation Things included in hash code calulation Things not included in hash key calculation Element name (name only, not namespace) Name space of element names Attribute names present in element White spaces used in the element Attribute values present in the element Potential child elements The ‘z’ attribute and its value Any attribute (and value) whose name starts with '_' The order of the attributes does not contribute to the value of a hash key
  • 16. View Scaffolding & Customization •  Roo MVC views offer numerous customization points: –  Spring Theming support via CSS (and graphics) –  Global template structural adjustments via Tiles –  Page structure changes in JSP pages –  Portable templates through JSP tag library – 
  • 17. Roo Default Tag Library •  Spring JavaScript •  Dojo Toolkit •  Easy XML-based tags (no .java required) •  Tags for –  form handling –  field rendering –  util (pagination, page decoration, language selection, …)
  • 19. How social is your application?
  • 21. Embedding Social Features Roo offers two shell commands to install features: •  Option 1 –  web mvc embed generic --url http://www.youtube.com/watch?v=Gb1Z0lfl52I –  automatic detection of social feature based on domain name –  easiest way to get a feature embedded •  Option 2 –  web mvc embed map --provider GOOGLE_MAPS --location "Sydney, Australia” –  web mvc embed finances --stockSymbol VMW –  specification of type of social feature –  better supported through tab completion
  • 23. Does your app speak Spanish?
  • 24. i18n & l11n Support •  Roo MVC scaffolding now defaults to locale ‘en’ –  install more languages with ‘web mvc install --language es’ command –  choice between 6 languages –  very easy publishing of new languages •  addon create i18n --topLevelPackage com.foo.ru --locale ru --messageBundle <path-to>/messages_fr.properties •  see slides for session ‘Hello, RooBot: Writing and Distributing Your Own Spring Roo Add-Ons’
  • 25. i18n & l11n Support •  Roo MVC scaffolding uses two artifacts for managing localization (l11n) & internationalization (i18n) –  application.properties •  application / domain specific messages •  managed by Roo round tripping –  messages_XX.properties •  non- application / domain specific messages •  never touched by Roo after initial install
  • 26. How secure is your application?
  • 27. Integrating Spring Security •  One simple command –  security setup –  URL-based security with applicationContext-security.xml <http  auto-­‐config="true"  use-­‐expressions="true">      <form-­‐login  login-­‐processing-­‐url="/resources/j_spring_security_check"  login-­‐                                    page="/login"  authentication-­‐failure-­‐url="/login?login_error=t"/>      <logout  logout-­‐url="/resources/j_spring_security_logout"/>      <intercept-­‐url  pattern="/choices/**"  access="hasRole('ROLE_ADMIN')”/>        <intercept-­‐url  pattern="/resources/**"  access="permitAll"  />      <intercept-­‐url  pattern="/**"  access="permitAll"  />   </http>  
  • 29. Spring Web Flow •  One simple command –  web flow –  integrates Spring Web Flow into application
  • 30. DEMO Securing Your Application Spring Web Flow Selenium Tests
  • 31. Resources & Links •  Home → http://www.springsource.org/roo –  Contains links to all other resources •  Forum → http://forum.springsource.org –  Roo team actively monitor forum and answer queries •  Issues → http://jira.springframework.org/browse/ROO •  Twitter → @SpringRoo –  Follow for updates, or include in tweets so we see them •  Contact details –  Keith Donald @kdonald, [email protected] –  Stefan Schmidt @schmidtstefan, [email protected]
  • 32. Q&A