SlideShare a Scribd company logo
1 of 23
Download to read offline
Extreme Web Productivity
with Spring Roo
Stefan Schmidt - SpringSource
Agenda

•  Example Application
•  Roo Web Features & Details
•  Add-on Demonstrations
•  Spring Roo Roadmap




              SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Agenda

•  Example Application
  •  Roo Pizza Shop
•  Roo Web Features
•  Add-on Demonstrations
•  Spring Roo Roadmap




              SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Pizza Shop Domain Model




          SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Roo Pizza Shop Script
  project --topLevelPackage com.springsource.pizzashop
  persistence setup --provider HIBERNATE --database MYSQL
  database properties set --key database.url --value jdbc:mysql://localhost:3306/pizza
  database properties set --key database.username --value root
  entity --class ~.domain.Topping --testAutomatically
  field string --fieldName name --notNull --sizeMin 2
  entity --class ~.domain.Base --testAutomatically
  field string --fieldName name --notNull --sizeMin 2
  entity --class ~.domain.Pizza --testAutomatically
  field string --fieldName name --notNull --sizeMin 2
  field number --type java.lang.Double --fieldName price --min 0 --primitive
  field reference --type ~.domain.Base --fieldName base --notNull
  field set --element ~.domain.Topping --fieldName toppings --cardinality MANY_TO_MANY
  entity --class ~.domain.PizzaOrder –testAutomatically
  field string --fieldName name --notNull --sizeMin 2
  field string --fieldName address --sizeMax 50
  field date --type java.util.Date --fieldName deliveryDate --class ~.domain.PizzaOrder
  field set --element ~.domain.Pizza --fieldName pizzas --sizeMin 1
  field number --type java.lang.Double --fieldName total --min 0 --primitive
  controller all --package ~.web
  logging setup --level DEBUG --package WEB
  selenium test --controller com.springsource.pizzashop.web.BaseController
  finder add --finderName findPizzasByToppingsAndPriceLessThan --class ~.domain.Pizza
  security setup
  controller scaffold --class ~.web.PublicPizzaController --path /public/pizza --disallowedOperations create,update,delete --entity
        ~.domain.Pizza
  web flow




                                   SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Demonstration
Creating the domain model




          SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Agenda

•  Example Application
•  Roo Web Features & Details
  •  Web Architecture
  •  Web Artifacts
  •  Commands
  •  Directory Layout
  •  REST URI Mappings
•  Add-on Demonstrations
•  Spring Roo Roadmap



              SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Web Architecture

•  Controllers interact with Domain entities
•  OpenEntityManagerInViewFilter
  •  "Open EntityManager in View" pattern
  •  JPA EntityManager bound to the thread for the entire
     processing of the request
  •  allow for lazy loading in web views
  •  original transactions already being completed
•  Service layer optional
  •  used for business logic spanning multiple entities




                 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Web Artifacts

•  Java & Aspects
   •  Spring MVC @Controllers
   •  Property Editors
•  JSPX
   •  clear format and structuring
   •  fully XML compliant
•  Spring JS & Dojo
   •  client-side validation
   •  form usability improvements




                  SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Web Artifacts (cont.)

•  CSS
   •  flexible UI customization
•  Apache Tiles
   •  flexible templating of jspx pages
•  Tags
   •  reusable pagination
   •  theme selectors
   •  language selectors
•  URLRewrite Filter
   •  simplification of URIs




                  SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Web Artifacts (cont.)

•  XML
   •  configuration of various technologies
      •  Spring MVC & WebFlow application contexts
      •  Tiles configurations
      •  web.xml
•  Properties Files
   •  internationalization support via message properties
   •  theming configuration




                   SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Roo Web Commands

•  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




                 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Demonstration
The Web directory




          SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Web Project Directory Layout

•  All web-related artifacts in src/main/webapp




               SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Web Project Directory Layout

Directory                                       Purpose
/styles                                         style sheets (CSS)
/images                                         graphics
/WEB-INF/classes/*.properties theme configurations
/WEB-INF/spring/*.xml                           Web-related Spring application contexts
/WEB-INF/i18n/*.properties                      internationalization message files
/WEB-INF/layouts/layout.jspx                    Tiles definition for master layout
/WEB-INF/tags/*.tagx                            Tag libraries (pagination, language, etc)
/WEB-INF/views/**/*                             Tiles and other view artifacts
/WEB-INF/web.xml                                Web application context
/WEB-INF/urlrewrite.xml                         URL rewrite filter configuration


                   SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
REST URI Mapping

Resource                 GET                                           PUT                          POST                 DELETE
                                                                                                    Create a new
                         List the members of
                                                                                                    topping in the
Collection URI such as   the collection. For
                                                                                                    collection where
http://domain.com/       example list all the                          Not used.                                         Not used.
                                                                                                    the ID is assigned
pizzashop/topping/       toppings available in
                                                                                                    automatically by
                         the application.
                                                                                                    the collection.
                                                                       Update the                                        Delete the
Member URI such as
                         Retrieve the addressed                        addressed                                         addressed
http://domain.com/                                                                                  Not used.
                         topping with id=5                             topping with                                      topping
pizzashop/topping/5
                                                                       id=5.                                             with id=5.
Member URI such as       Create Form - returns
http://domain.com/       an initialized, but
                                                                       Not used.                    Not used.            Not used.
pizzashop/topping/       empty topping for form
form                     binding.
Member URI such as       Update Form returns
http://domain.com/       the topping resource
                                                                       Not used.                    Not used.            Not used.
pizzashop/topping/5/     which is pre-populated
form                     for form binding




                             SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Agenda

•  Example Application
•  Roo Web Features & Details
•  Add-on Demonstrations
  •  Selenium Tests
  •  Dynamic Finders
  •  Spring Security
  •  Web Flow
•  Spring Roo Roadmap




                SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Demonstration
Selenium Tests
Dynamic Finders
Spring Security
Spring Web Flow




         SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
@RooWebScaffold

@RooWebScaffold(
         path = "public/order",
         automaticallyMaintainView = true,
         formBackingObject = PizzaOrder.class,
         update = false,
         delete = false,
         create = true,
         exposeFinders = true,
         dateFormat = “dd-MM-yyyy”)
@RequestMapping("/public/order/**")
@Controller
public class PublicPizzaOrderController {
}!

roo> controller scaffold --name ~.web.PublicPizzaOrderController --entity ~.domain.PizzaOrder --
    path public/pizza --disallowedOperations update,delete --dateFormat dd-MM-yyyy




                            SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Agenda

•  Example Application
•  Roo Web Features & Details
•  Testing & Securing Views
•  Web Flow
•  Spring Roo Roadmap




              SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Roadmap

•  Ordering & sorting of entities
•  Form field & menu ordering
•  Ajax (partial page refresh)
•  Content negotiation
•  UI usability and look & feel enhancements
•  Drop-in templating
•  Spring Blaze DS & Flex UI
•  Google Web Toolkit UI
•  Comet & Bayeux

                                        Note: The information on the roadmap is intended to outline our general product direction and should not be incorporated into any contract.
                                                    Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.




                SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Project Resources

•  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
  •  #roo hash key
  •  follow @schmidtstefan & @benalexau


                 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Q&A




      SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.

More Related Content

Viewers also liked

Analysis Of Opening Film Techniques Employed
Analysis Of Opening Film Techniques EmployedAnalysis Of Opening Film Techniques Employed
Analysis Of Opening Film Techniques Employed
Leon Thomas
 
Adab Menjaga Fitrah Lelaki & Perempuan
Adab Menjaga Fitrah Lelaki & PerempuanAdab Menjaga Fitrah Lelaki & Perempuan
Adab Menjaga Fitrah Lelaki & Perempuan
uia
 

Viewers also liked (20)

Structural terms
Structural termsStructural terms
Structural terms
 
Källkritikinternet
KällkritikinternetKällkritikinternet
Källkritikinternet
 
cciskolan
cciskolancciskolan
cciskolan
 
Upphovsrätt skola
Upphovsrätt skolaUpphovsrätt skola
Upphovsrätt skola
 
Question four
Question fourQuestion four
Question four
 
upphovsrätt och elever
upphovsrätt och eleverupphovsrätt och elever
upphovsrätt och elever
 
Extreme Fat Loss
Extreme Fat LossExtreme Fat Loss
Extreme Fat Loss
 
Internetiskolanpitea
InternetiskolanpiteaInternetiskolanpitea
Internetiskolanpitea
 
Switzerland 09 (1 Of 4)
Switzerland 09 (1 Of 4)Switzerland 09 (1 Of 4)
Switzerland 09 (1 Of 4)
 
Paris 09 (1 Of 2)
Paris 09 (1 Of 2)Paris 09 (1 Of 2)
Paris 09 (1 Of 2)
 
Google Adm
Google   AdmGoogle   Adm
Google Adm
 
Settdagarna2014
Settdagarna2014Settdagarna2014
Settdagarna2014
 
Digitaldelaktighet
DigitaldelaktighetDigitaldelaktighet
Digitaldelaktighet
 
Twitter Importance
Twitter ImportanceTwitter Importance
Twitter Importance
 
Analysis Of Opening Film Techniques Employed
Analysis Of Opening Film Techniques EmployedAnalysis Of Opening Film Techniques Employed
Analysis Of Opening Film Techniques Employed
 
Mr. Lothar Szych
Mr. Lothar SzychMr. Lothar Szych
Mr. Lothar Szych
 
Adab Menjaga Fitrah Lelaki & Perempuan
Adab Menjaga Fitrah Lelaki & PerempuanAdab Menjaga Fitrah Lelaki & Perempuan
Adab Menjaga Fitrah Lelaki & Perempuan
 
hi
hihi
hi
 
Agency of the Future - Summary Findings
Agency of the Future - Summary FindingsAgency of the Future - Summary Findings
Agency of the Future - Summary Findings
 
Kildekritikk
KildekritikkKildekritikk
Kildekritikk
 

Similar to Extreme Web Productivity with Spring Roo

Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02
arghya007
 
Build Database Applications for SharePoint!
Build Database Applications for SharePoint!Build Database Applications for SharePoint!
Build Database Applications for SharePoint!
Iron Speed
 
Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePoint
Iron Speed
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
Spiffy
 

Similar to Extreme Web Productivity with Spring Roo (20)

T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
4 basic api design guidelines
4 basic api design guidelines4 basic api design guidelines
4 basic api design guidelines
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Docker based Architecture by Denys Serdiuk
Docker based Architecture by Denys SerdiukDocker based Architecture by Denys Serdiuk
Docker based Architecture by Denys Serdiuk
 
Use case 1 - for Sitecore Automation Module
Use case 1 - for Sitecore Automation ModuleUse case 1 - for Sitecore Automation Module
Use case 1 - for Sitecore Automation Module
 
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Creating a modern web application using Symfony API Platform, ReactJS and Red...Creating a modern web application using Symfony API Platform, ReactJS and Red...
Creating a modern web application using Symfony API Platform, ReactJS and Red...
 
Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02
 
Getting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online developmentGetting started with SharePoint 2013 online development
Getting started with SharePoint 2013 online development
 
Redmine Betabeers SVQ
Redmine Betabeers SVQRedmine Betabeers SVQ
Redmine Betabeers SVQ
 
Build Database Applications for SharePoint!
Build Database Applications for SharePoint!Build Database Applications for SharePoint!
Build Database Applications for SharePoint!
 
Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePoint
 
Adm02. IBM Connections Adminblast
Adm02. IBM Connections AdminblastAdm02. IBM Connections Adminblast
Adm02. IBM Connections Adminblast
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
 
The-Power-Of-Recon (1)-poerfulo.pptx.pdf
The-Power-Of-Recon (1)-poerfulo.pptx.pdfThe-Power-Of-Recon (1)-poerfulo.pptx.pdf
The-Power-Of-Recon (1)-poerfulo.pptx.pdf
 
Philly Spring UG Roo Overview
Philly Spring UG Roo OverviewPhilly Spring UG Roo Overview
Philly Spring UG Roo Overview
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
 
InterMine Infrastructure LF Meeting 20150428
InterMine Infrastructure LF Meeting 20150428InterMine Infrastructure LF Meeting 20150428
InterMine Infrastructure LF Meeting 20150428
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2
 
Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play Framework
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Extreme Web Productivity with Spring Roo

  • 1. Extreme Web Productivity with Spring Roo Stefan Schmidt - SpringSource
  • 2. Agenda •  Example Application •  Roo Web Features & Details •  Add-on Demonstrations •  Spring Roo Roadmap SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 3. Agenda •  Example Application •  Roo Pizza Shop •  Roo Web Features •  Add-on Demonstrations •  Spring Roo Roadmap SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 4. Pizza Shop Domain Model SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 5. Roo Pizza Shop Script project --topLevelPackage com.springsource.pizzashop persistence setup --provider HIBERNATE --database MYSQL database properties set --key database.url --value jdbc:mysql://localhost:3306/pizza database properties set --key database.username --value root entity --class ~.domain.Topping --testAutomatically field string --fieldName name --notNull --sizeMin 2 entity --class ~.domain.Base --testAutomatically field string --fieldName name --notNull --sizeMin 2 entity --class ~.domain.Pizza --testAutomatically field string --fieldName name --notNull --sizeMin 2 field number --type java.lang.Double --fieldName price --min 0 --primitive field reference --type ~.domain.Base --fieldName base --notNull field set --element ~.domain.Topping --fieldName toppings --cardinality MANY_TO_MANY entity --class ~.domain.PizzaOrder –testAutomatically field string --fieldName name --notNull --sizeMin 2 field string --fieldName address --sizeMax 50 field date --type java.util.Date --fieldName deliveryDate --class ~.domain.PizzaOrder field set --element ~.domain.Pizza --fieldName pizzas --sizeMin 1 field number --type java.lang.Double --fieldName total --min 0 --primitive controller all --package ~.web logging setup --level DEBUG --package WEB selenium test --controller com.springsource.pizzashop.web.BaseController finder add --finderName findPizzasByToppingsAndPriceLessThan --class ~.domain.Pizza security setup controller scaffold --class ~.web.PublicPizzaController --path /public/pizza --disallowedOperations create,update,delete --entity ~.domain.Pizza web flow SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 6. Demonstration Creating the domain model SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 7. Agenda •  Example Application •  Roo Web Features & Details •  Web Architecture •  Web Artifacts •  Commands •  Directory Layout •  REST URI Mappings •  Add-on Demonstrations •  Spring Roo Roadmap SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 8. Web Architecture •  Controllers interact with Domain entities •  OpenEntityManagerInViewFilter •  "Open EntityManager in View" pattern •  JPA EntityManager bound to the thread for the entire processing of the request •  allow for lazy loading in web views •  original transactions already being completed •  Service layer optional •  used for business logic spanning multiple entities SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 9. Web Artifacts •  Java & Aspects •  Spring MVC @Controllers •  Property Editors •  JSPX •  clear format and structuring •  fully XML compliant •  Spring JS & Dojo •  client-side validation •  form usability improvements SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 10. Web Artifacts (cont.) •  CSS •  flexible UI customization •  Apache Tiles •  flexible templating of jspx pages •  Tags •  reusable pagination •  theme selectors •  language selectors •  URLRewrite Filter •  simplification of URIs SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 11. Web Artifacts (cont.) •  XML •  configuration of various technologies •  Spring MVC & WebFlow application contexts •  Tiles configurations •  web.xml •  Properties Files •  internationalization support via message properties •  theming configuration SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 12. Roo Web Commands •  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 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 13. Demonstration The Web directory SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 14. Web Project Directory Layout •  All web-related artifacts in src/main/webapp SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 15. Web Project Directory Layout Directory Purpose /styles style sheets (CSS) /images graphics /WEB-INF/classes/*.properties theme configurations /WEB-INF/spring/*.xml Web-related Spring application contexts /WEB-INF/i18n/*.properties internationalization message files /WEB-INF/layouts/layout.jspx Tiles definition for master layout /WEB-INF/tags/*.tagx Tag libraries (pagination, language, etc) /WEB-INF/views/**/* Tiles and other view artifacts /WEB-INF/web.xml Web application context /WEB-INF/urlrewrite.xml URL rewrite filter configuration SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 16. REST URI Mapping Resource GET PUT POST DELETE Create a new List the members of topping in the Collection URI such as the collection. For collection where http://domain.com/ example list all the Not used. Not used. the ID is assigned pizzashop/topping/ toppings available in automatically by the application. the collection. Update the Delete the Member URI such as Retrieve the addressed addressed addressed http://domain.com/ Not used. topping with id=5 topping with topping pizzashop/topping/5 id=5. with id=5. Member URI such as Create Form - returns http://domain.com/ an initialized, but Not used. Not used. Not used. pizzashop/topping/ empty topping for form form binding. Member URI such as Update Form returns http://domain.com/ the topping resource Not used. Not used. Not used. pizzashop/topping/5/ which is pre-populated form for form binding SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 17. Agenda •  Example Application •  Roo Web Features & Details •  Add-on Demonstrations •  Selenium Tests •  Dynamic Finders •  Spring Security •  Web Flow •  Spring Roo Roadmap SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 18. Demonstration Selenium Tests Dynamic Finders Spring Security Spring Web Flow SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 19. @RooWebScaffold @RooWebScaffold( path = "public/order", automaticallyMaintainView = true, formBackingObject = PizzaOrder.class, update = false, delete = false, create = true, exposeFinders = true, dateFormat = “dd-MM-yyyy”) @RequestMapping("/public/order/**") @Controller public class PublicPizzaOrderController { }! roo> controller scaffold --name ~.web.PublicPizzaOrderController --entity ~.domain.PizzaOrder -- path public/pizza --disallowedOperations update,delete --dateFormat dd-MM-yyyy SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 20. Agenda •  Example Application •  Roo Web Features & Details •  Testing & Securing Views •  Web Flow •  Spring Roo Roadmap SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 21. Roadmap •  Ordering & sorting of entities •  Form field & menu ordering •  Ajax (partial page refresh) •  Content negotiation •  UI usability and look & feel enhancements •  Drop-in templating •  Spring Blaze DS & Flex UI •  Google Web Toolkit UI •  Comet & Bayeux Note: The information on the roadmap is intended to outline our general product direction and should not be incorporated into any contract. Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 22. Project Resources •  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 •  #roo hash key •  follow @schmidtstefan & @benalexau SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
  • 23. Q&A SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.