a tour through spring 3 - developing web applications
TRANSCRIPT
![Page 1: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/1.jpg)
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
A Tour through Spring 3
Keith Donald, Principal Engineer
![Page 2: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/2.jpg)
2
CONFIDENTIALCONFIDENTIAL
2
Topics
MVC
Ajax
Web Flow
Security
Integration
Flex
Tools and Getting Started
![Page 3: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/3.jpg)
3
CONFIDENTIALCONFIDENTIAL
3
Getting Demo Source
Spring Samples Repository
• http://src.springsource.org/svn/spring-samples
Petcare
• http://src.springsource.org/svn/spring-samples/petcare/trunk
Spring Travel
• http://src.springsource.org/svn/spring-samples/travel/trunk
![Page 4: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/4.jpg)
I ♥ spring
![Page 5: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/5.jpg)
I ♥ spring
![Page 6: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/6.jpg)
6
CONFIDENTIALCONFIDENTIAL
6
MVC
![Page 7: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/7.jpg)
7
CONFIDENTIALCONFIDENTIAL
7
Key Features
@Controller programming model
• For developing web applications and web services
• Configuration namespace
REST support
• URI Templates
• HTML, JSON, XML, ATOM/RSS representations
• Content Negotiation
• Support for PUT and DELETE requests
Data Binding and Type Conversion
Declarative Validation
• JSR-303
![Page 8: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/8.jpg)
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
MVC Demo
![Page 9: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/9.jpg)
9
CONFIDENTIALCONFIDENTIAL
9
Ajax
![Page 10: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/10.jpg)
10
CONFIDENTIALCONFIDENTIAL
10
Key Features
Integrates well with leading JavaScript toolkits
• jQuery
• Dojo
Integrates well with popular CSS frameworks
• Blueprint CSS
• 960 Grid
Spring JavaScript Module (part of Web Flow)
• Server-side partial page rendering built on Tiles composite view system
• Client-side progressive enhancement API built on Dojo
• Widget decorations
• Ajax event decorations
• Client-side validation
![Page 11: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/11.jpg)
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
Ajax Demo
![Page 12: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/12.jpg)
12
CONFIDENTIALCONFIDENTIAL
12
Web Flow
![Page 13: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/13.jpg)
13
CONFIDENTIALCONFIDENTIAL
13
Key Features
Lets you define flows that guide users through business processes
• Single module, e.g. “Loan Application”, encapsulating all process steps
• Navigation rules strictly enforced server-side
Manages conversational state
• Isolated from other users
• Local to current window, tab, or dialog
• Cleaned up when flow completes or expires
Agile development experience
• Change flows without restarting the server
![Page 14: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/14.jpg)
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
Web Flow Demo
![Page 15: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/15.jpg)
15
CONFIDENTIALCONFIDENTIAL
15
Security
![Page 16: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/16.jpg)
16
CONFIDENTIALCONFIDENTIAL
16
Key Features
Multiple authentication mechanisms
• Basic, Form, OpenID
Pluggable user data stores
• In Memory, Database, LDAP
Multiple levels of security
• Web (URL-based, enforced by ServletFilter)
• @Secured method (enforced by AOP)
Role-based authorization
• Flexible security expressions with Spring EL
• JSP tag library for conditional rendering
SSL channels
![Page 17: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/17.jpg)
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
Security Demo
![Page 18: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/18.jpg)
18
CONFIDENTIALCONFIDENTIAL
18
Integration
![Page 19: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/19.jpg)
19
CONFIDENTIALCONFIDENTIAL
19
Key Features
Allows you to add an integration layer to your application
• Connect your application to other systems in a loosely coupled way
• Think messaging!
Comprehensive support for enterprise integration patterns
• Channel, Router, Filter, Transformer, Splitter, Channel Adapter
• High-level configuration DSL built around these patterns
Extensive library of channel adapters
• JMS, File, Mail, HTTP, FTP
Support for asynchronous / parallel workloads
![Page 20: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/20.jpg)
I ♥ spring
global appointments
Message
Gateway
Logger
appointment
message router
Admin
Client
Admin
Client
Admin
Client
asyncMailer
doctorMail
Transformer
Doctor
Integration Pipeline
![Page 21: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/21.jpg)
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
Integration Demo
![Page 22: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/22.jpg)
22
CONFIDENTIALCONFIDENTIAL
22
Flex
![Page 23: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/23.jpg)
23
CONFIDENTIALCONFIDENTIAL
23
Key Features
Export Spring Beans to Flex Clients
• Over AMF (RPC), HTTP (REST)
Security
• Utilizing Spring Integration
Integration
• Utilizing Spring Integration; push messages to Flex clients
Built on top of Spring MVC
• Configuration namespace simplifies setup and configuration
• Plugs into DispatcherServlet processing lifecycle
Spring ActionScript
• DI / MVC framework for Flex clients
![Page 24: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/24.jpg)
24
CONFIDENTIALCONFIDENTIAL
24
Tools and Getting Started
![Page 25: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/25.jpg)
25
CONFIDENTIALCONFIDENTIAL
25
Key Features
SpringSource Tool-Suite
• New Project Templates (can create your own)
• Essential plugins pre-integrated (Spring IDE, WTP, m2Eclipse, AJDT, Roo, etc)
• Convenient “Spring Extensions” Install
• e.g. install Groovy tooling add-on in one click!
• Content assist / auto-completion
• Visualization
• Embedded tc Server Developer Edition, including Spring Insight
Roo
• Code generation with round tripping
• Reduced Java ceremony (@RooJavaBean, @RooToString)
• Support for Active Record pattern (@RooEntity)
• UI Scaffolding
• Intelligent command-line shell interface
![Page 26: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/26.jpg)
26
CONFIDENTIALCONFIDENTIAL
Getting Started with Spring
Download SpringSource Tool Suite
• http://www.springsource.com/products/sts
Create your first Spring MVC Project
• New -> Spring Template Project -> Spring MVC Project
Experience Roo
• New -> Roo Project -> Open Roo Shell -> type “hint”
Study the sample applications
• Checkout Petcare, Spring Travel, import into STS and run on Tomcat
26
![Page 27: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/27.jpg)
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
© 2010 SpringSource, A division of VMware. All rights reserved
CONFIDENTIAL
Roo Demo
![Page 28: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/28.jpg)
28
CONFIDENTIALCONFIDENTIAL
Coming in Spring 3.1
Conversation Scope, Flash Map
Comet (long-polling) support
Java @Flow Definitions
Static resources handler
OAuth support
Roo Add-ons
• “Open Web” (HTML/CSS/JS) improvements
• Flex (new)
• GWT (new)
28
![Page 29: A Tour Through Spring 3 - Developing Web Applications](https://reader035.vdocuments.us/reader035/viewer/2022081403/5571f9ab497959916990260e/html5/thumbnails/29.jpg)
29
CONFIDENTIALCONFIDENTIAL
Resources
Spring articles and documentation
• http://www.springsource.org/documentation
Roo webinar and video
• http://www.springsource.org/node/2479
• http://s3.springsource.com/MRKT/roo/2010-01-Five_Minutes_Roo.mov
Get involved
• Forums: http://forum.springsource.org
• JIRA: http://www.springframework.org
29