Skyway Builder Recipes

6.3.0.0 - 10/23/09

Abstract

The most recent version of all Skyway Builder documentation can be found online at www.skywayperspectives.org.


Table of Contents

1. Spring Generation
1. Generating Spring applications using meta-data programming and code generation
2. Web Layer Recipes
1. Creating the Controller using Spring MVC
2. Creating the Controller using Spring Web Flow
3. Creating the Model for Spring MVC
4. Creating the Model for Spring Web Flow
5. Creating Model Packages
6. Creating Spring Components
7. Creating the View for Spring MVC
8. Scaffolding a Spring MVC application from domain object
9. Scaffolding Spring Security
10. Mapping URLs to Operations and Views
11. Creating Helper Methods using Operations
12. Reusing Operations in Different Contexts
13. Hiding the Implementation Technology
14. Implementing Post/Redirect/Get (PRG) Pattern
15. Restricting Direct Access to JSP Pages
16. Implementing Controller Methods using Actions and Steps
17. Blending Actions with non-generated Java Code
18. Blending Actions with non-generated Spring Beans
19. Implementing an HTML Form in JSP using standard HTML elements
20. Implementing an HTML Form in JSP using Spring Form Tag Library
21. Implementing an HTML Form in JSP using Skyway Tag Library
22. Using Third-Party Tag Libraries
23. Accessing Request and Session Parameters
24. Defining the Scope of Components, Controllers and Services
25. Managing User Session Data
26. Responding to User-Generated Events (Events and Commands)
27. Using Absolute Paths for Images, CSS and Javascript
28. Using CSS
29. Using Javascript
30. Securing Applications - Authentication
31. Securing Applications - Authorization
32. Validating End-User Input on Server using Spring Validator
33. Implementing Client-side Validation using Javascript
34. Implementing File Upload for Spring MVC
35. Implementing File Upload for Spring Web Flow
36. Streaming binary content
3. Service Layer Recipes
1. Creating a Service or Business Facade
2. Creating an Operation
3. Implementing an Operation using Actions and Steps
4. Creating a Contract-First JAX-WS Web service (SOAP)
5. Publishing a JAX-WS Web service (SOAP)
6. Publishing a AJAX service using DWR
7. Consuming a SOAP Web service
8. Consuming a REST Web Service
9. Using Java Code, Spring Beans and Groovy with Services
10. Using Groovy in Actions
11. Accessing Data using Groovy
4. Data Layer Recipes
1. Creating a Domain Object / POJO / JavaBean
2. Creating a Domain Model
3. Defining relationships
4. Creating a Data Access Object (DAO)
5. Table and Field Mapping
6. Relationship Mapping
7. Implementing DAO using JPA
8. Generating Domain Model from an existing database
9. Performing Basic CRUD Operations
10. Performing Complex Queries using JPQL
11. Deciding between Defined versus Derived Data Models
12. Working with Related Data
13. Migrating to a Different DBMS
5. Project Recipes
1. Creating Project-level Variables and Constants
2. Changing JPA Providers
3. Changing JTA Providers
4. JSP Aliases
5. Adding Spring Contexts
6. Creating Eclipse-based Skyway Projects
7. Creating Maven-based Skyway Projects
8. Setup an Eclipse Dynamic Web Project for Skyway Builder
9. Manage project classpath dependencies manually
6. Customizing Code Generation Recipes
1. Customizing Code Generation Configuration
2. Customizing Code Generation Templates
3. Extending the Code Generation Framework

List of Figures

1.1. Spring DSL Model
2.1. Model - View - Controller
2.2. Controller (MVC)
2.3. Controller (MVC)
2.4. Spring Web Flow - Sample Diagram
2.5. Model (MVC)
2.6. Spring MVC Model (Example 1) - Operation Inputs/Outputs
2.7. Spring MVC Model (Example 2) - Operation Inputs/Outputs
2.8. Model (MVC)
2.9. Spring Web Flow Model (Example 1) - Model Config
2.10. View (MVC)
2.11. Action Editor
2.12. Step Palette
2.13. Creating an instance of MyJavaClass using Variables
2.14. Web Events and Commands
2.15. Events and Commands - Properties Panel
2.16. Events and Commands - 1 Event
2.17. Events and Commands - 2 Events
2.18. Security Settings using Spring Security
2.19. Security Settings - Configured Views
2.20. Security Settings - Security Information Source
2.21. Validation
2.22. Event and Commands
3.1. DWR Service - Index Page
3.2. DWR Service - Service Details Page
3.3. Accessing Variables using Groovy
4.1. Creating a domain object using Domain Object Editor
4.2. Book domain object with relationship to Authors
4.3. Author domain object with reverse relationship to Book
4.4. Persistence Mapping
4.5. Relationship Mapping
4.6. CRUD - Modify Data Access Object Examples
5.1. JSP Alias
5.2. Adding Spring Contexts to Project

List of Tables

1.1. Spring/Java, Spring DSL, and UML Stereotype Cross Reference
2.1. URL Mapping Parameters
2.2. Binding HTML Form Controls
2.3. Event Descriptions
2.4. Skyway Commands
2.5. File Upload Suffixes
2.6. URL parameters for streamedBinaryContentView
3.1. Web Service WSDL to Skyway Mappings
4.1. Skyway Basic Data Types
4.2. Relationship Types
4.3. JPA Query Examples
4.4. Comparison of Native and External Data Models
4.5. Scenarios for using external data models

List of Examples

2.1. Annotated Spring Controller (Generated)
2.2. Spring MVC Model (Example 1) - Operation Inputs/Outputs (Generated)
2.3. Spring MVC Model (Example 2) - Operation Inputs/Outputs (Generated)
2.4. URL Mapping - Examples
2.5. URL Mapping - Reusing Actions
2.6. URL Mapping - Hiding Implementation Technology
2.7. URL Mapping - Post/Redirect/Get (PRG)
2.8. Action (Generated)
2.9. Blending Java Code with Actions - MyJavaClass.java
2.10. Invoke Java Step - Variable Invocation (Generated Code)
2.11. Invoke Java Step - Instance Invocation (Generated Code)
2.12. Invoke Java Step - Static Invocation (Generated Code)
2.13. Blending Spring Beans with Actions - MyBean.java
2.14. Spring Context File - mycontext.xml
2.15. Invoke Spring Step - Static Invocation (Generated Code)
2.16. Invoke Spring Step - Dynamic Invocation (Generated Code)
2.17. HTML Form using Standard HTML Controls
2.18. JSP Directive for using Spring Form Tag Library
2.19. HTML Form using Spring Form Tag Library
2.20. HTML Form using <spring:bind> tag
2.21. JSP Directive to include Skyway JSP Tag Library
2.22. HTML Form using Skyway Builder Tag Library
2.23. JSP Directive for using Third-Party Tag Library
2.24. Using Third-Party Tags
2.25. Invoke Java (inline) - accessing Request Parameters
2.26. Model Scope (Generated)
2.27. JSP Directive for using Skyway Tab Library
2.28. Event and Command - JSP Fragment
2.29. JSP Fragment using pageContext.request.contextPath variable for absolute pathing
2.30. HTML fragment with absolute pathing - deployed to http://localhost/myapp
2.31. HTML fragment with absolute pathing - deployed to http://www.myapp.com
2.32. Linking to external CSS files
2.33. Inline javascript
2.34. Linking to javascript libraries
2.35. Validation Class
2.36. Using errors tag of the Spring Form Tag Library (edit.jsp)
2.37. Sample client-side validation using javascript
2.38. File Upload - HTML
2.39. File Upload - Upload Web Control (Skyway TagLib)
2.40. File Upload - HTML
2.41. Spring Web Flow Configuration
2.42. Accessing MultipartFile
2.43. Spring Context file - projectName-generated-web-context.xml
2.44. Image Streaming Example - output only
2.45. Image Streaming Example - with inputs
2.46. Document Streaming Example - with inputs
3.1. Sample java code invoking REST services
3.2. Sample Groovy code invoking REST services
3.3. Using Groovy Code using Invoke Groovy Step
3.4. Accessing data using Groovy
4.1. Domain Object - POJO (Generated)
4.2. Domain Object - Primary Key Class (Generated)
4.3. Code generated for domain object relationships