| |
| |
| |
|
|
|
Mastering the Struts 2 Framework |
|
Duration:
4 Days |
|
|
This course is intended for web developers who already have experience with building
Java-based web applications and want to learn how to build the next generation of web applications using Struts 2.
- Experienced web developers
| |
Attendees must be proficient in Java and web application programming in order to do the labs.
In particular, attendess should be proficient in Java Servlets and JSP.
|
|
|
Description
|
Apache Struts 2 is a robust, extensible framework for building
enterprise-class Java-based web applications that uses Inversion of Control
(IoC) and the proven architectural pattern, Model-View-Controller (MVC).
Struts 2 is also ideally suited for developing visually rich and highly
interactive Web 2.0 applications since the support for AJAX is
built right in to the framework.
Struts 2 builds upon the popular Struts framework. Like Struts, its goals
are to make web application development more effcient, extensible,
maintainable and scalable. Struts 2, however, also enables Aspect-Oriented
Programming (AOP) using Interceptors leading to extremely modular
code. It also adds powerful features such as a plugin framework, JavaServer Faces
(JSF) integration, and XML-free configuration.
This 4-day course covers everything you need to design, develop and deploy
Struts 2 based web applications. Topics covered include architecture, design patterns,
configuration, implementing actions, custom tag libraries, validation,
internationalization, Web 2.0 development and migration from Struts.
This course is very hands-on and focuses on the practical issues of professional
Web (and Web 2.0) development.
|
|
Objectives
|
Upon completion of this course, attendees will be able to:
- Understand Struts 2 Architecture
- Configure a Struts 2 based Web Application using annotations
-
Understand and implement Actions, Interceptors and Type Convertors
- Implement visually rich interfaces using the custom tags and other Struts 2 UI components
- Incorporate Web 2.0 funcationality using AJAX in Struts 2 applications
- Use Open Graph Navigation Language (OGNL) to script your web pages
- Use the Struts 2 validation framework
- Build internationalized and localized web interfaces in Struts 2
- Extend Struts 2 using the Plugin architecture
- Understand test-driven development in Struts 2
- Profile Struts 2 applications for performance optimization
- Understand the issues in migrating applications from Struts
- Learn the best practices and design and architectural patterns for effective Struts 2 applications
- Integrate Struts 2 with the Spring Framework
|
|
Course Outline
|
Struts 2 - Overview
- The Big picture - Why and What of Struts 2
- Architecture - Identifying the key components
- MVC and Struts 2
- Workflow: Request-Response lifecycle
- Anatomy of a Struts 2 application
- Installation and configuration
- Configuring Struts 2 with Spring
- Configuring eclipse for Struts 2 development
Application Development with Struts 2
- Key concepts
- The Action objects
- Configuration
- Dependency Injection
- Debugging
Action
- The Action interface
- The ModelDriven interface
- The ActionSupport class
- Implementing Actions
- Chaining Actions
- Configuring Actions
Results
- The Result interface
- Chain Result
- Dispatcher Result
- HttpHeader Result
- Redirect Result
- Redirect Action Result
- Stream Result
- XSL Result
- PlainText Result
- Tiles Result
- PreResultListener
- Multipage Forms
- Handling large result lists with pagination
Introduction to Ajax
- The problem with traditional web applications
- Contacting the server without page refreshing
- The XmlHttpRequest object
| |
Presentation with Struts Tags
- Generic Tags
- UI Tags
- Themes and Templates
- Ajax Tags
- OGNL
- Tabular inputs
- HTML form buttons
- Using Checkboxes
- Iterator tag
- Formatting dates and numbers
- Skinning
- Multiple Submit Buttons
- Tabular inputs with HashMap
Interceptors
- Introduction to AOP
- The Interceptor interface
- Implementing aspects using interceptors
- Configuring interceptors in struts.xml
- Interceptor Order
- File Upload Interceptor
- ExecuteAndWait Interceptor (for Hibernate and Spring)
Test-driven Development
- JUnit
- Using Spring mock objects
- Writing unit tests
- Test Actions
Validation
- Basic Validation
- Client Validation
- AJAX Validation
- Using Field Validators
- Using Non Field Validators
- Using Visitor Field Validator
Type Conversion
- Built in Type Conversion Support
- Implementing a custom Type Converter
- Advanced Type Conversion
- Null Property Handling
- Type Conversion Error Handling
|
|
|
|