Asta4D Framework User Guide

Authors

Rui Liu , Shunsuke Otani

Version: 1.1-Xmas

Last update at: 2015-12-25 02:40


Table of Contents

I. Introduction
1. Overview
1.1. Why Asta4D
1.2. How Asta4D helps us
1.3. What does the name of "Asta4D" mean
II. User Guide
2. Flexible template
2.1. Inheritable template
2.2. Parametrized embedding
3. Renderer: easy to use, secure, testable
3.1. Split rendering logic from template
3.2. Render data to page
3.3. Immune from cross-site hole
3.4. Test your rendering logic
4. View first URL mapping and variable injection
4.1. View first
4.2. The grammer of URL rule and path variable
4.3. Variable Injection
5. Side effect and request handler
5.1. The role with responsibility to http request: Request Handler
5.2. Side effect of system operations
5.3. Isolate side effect and multi thread rendering
6. Impement request handler and url mapping
6.1. @RequestHandler
6.2. delcare url rule for request handler
6.3. Default request handler
6.4. Global forward/redirect
7. Advanced usage of request handler
7.1. Advanced MVC architecture
7.2. Normalize page url patterns
7.3. Restful and ajax
7.4. Handle static resouce files
7.5. Handle generic path template files
8. Built in form flow
8.1. Startup
8.1.1. Form and form field
8.1.2. Form handler
8.1.3. HTML template of form
8.1.4. Form snippet
8.1.5. Cascade form POJO and array field
8.2. Advanced
8.2.1. Validation
8.2.2. Message rendering
8.2.3. Customize form field annotation
8.2.4. A sample of defining a new flow rule
9. Best practice
9.1. Division of responsibilities between request handler and snippet
9.1.1. Do update by request handler
9.1.2. Normalize page condition by request handler
9.2. Common usage of form flow
9.3. The best way of implementing a snippet
9.3.1. Perform queries as simple as possible
9.3.2. Make use of ParallelRowRender
9.3.3. Cache your data
9.3.4. Avoid duplicated query
9.3.5. Prepare snippet instance(set default value) by InitializableSnippet
9.3.6. "x-" convention selector
9.3.7. Remove contents rather than add contents for conditional rendering
III. Reference
10. Details of Template
10.1. Supported tags
10.1.1. afd:extension
10.1.2. afd:block
10.1.3. afd:embed
10.1.4. afd:snippet
10.1.5. afd:group
10.1.6. afd:comment
10.1.7. afd:msg
10.2. Additional
11. Details of snippet class
11.1. Rendering APIs
11.1.1. Create and add Renderer instance
11.1.2. CSS Selector
11.1.3. Render text
11.1.4. Render DOM attribution
11.1.5. Clear an Element
11.1.6. Render raw Element
11.1.7. Arbitrary rendering for an Element
11.1.8. Recursive rendering
11.1.9. Debug renderer
11.1.10. Missing selector warning
11.1.11. List rendering
11.2. Other things about snippet and rendering
11.2.1. Nested snippet
11.2.2. InitializableSnippet
11.2.3. Component rendering
11.2.4. SnippetInterceptor
11.2.5. SnippetExtractor
11.2.6. SnippetResolver
11.2.7. SnippetInvoker
12. Variable injection
12.1. Context
12.1.1. Context/WebApplicationContext
12.1.2. Scope
12.1.3. ContextBindData
12.2. Injection
12.2.1. @ContextData
12.2.2. @ContextDataSet
12.2.3. ContextDataFinder
12.2.4. DataConvertor
12.2.5. ContextDataHolder
13. URL rule
13.1. Rule apis
13.1.1. UrlMappingRuleInitializer
13.1.2. Handy rules
13.2. Request handler result process
13.2.1. Content provider
13.2.2. Result transforming
13.2.3. Request handler chain
14. details of form flow
15. i18n
15.1. message stringization
15.1.1. I18nMessageHelper
15.1.2. MessagePatternRetriever
15.1.3. Default locale
15.1.4. afd:msg
15.2. file search order
16. Asta4dServlet and configuration
16.1. Asta4dServlet
16.2. Configuration file
17. Integration with Spring
17.1. Integrate with Spring IOC
17.2. Integrate with Spring MVC