Upload
guo-albert
View
1.071
Download
1
Tags:
Embed Size (px)
Citation preview
A L B E R T K U O A L B E R T _ K U O @ C H T . C O M . T W
NIG系統開發指引 1
Agenda 2
� 文件閱讀順序 � Web Application Layering � Spring MVC Application Layers � Resources
文件閱讀順序 3
15C+Schema
Document 23H 24H (If
Any) VB/Cobol
文件擺放位置 4
文件名稱 文件位置
15C/23H/24H trunk\SDS\deliverable
Schema Document trunk\SDS\schema\index.html
VB trunk\SDS\source code\client\[功能代號]
Cobol trunk\SDS\source code\server
Web Application Layering 5
Crosscutting Aspects
Domain Model Business Objects
UI Layer
Spring MVC
JSP, tiles.xml
Business Layer
Spring IoC
Spring AOP Transaction
Mgmt.
Business Service Classes
JPA Session Mgmt.
Persistence Layer
JPA
DataSource / Connection
Pool
Query Language
Application Context DAO Classes
Spring MVC Application Layers 6
Persistence
Business/Service
Web
User Interface
Dom
ain
Mod
el
AO
P
Spring MVC Application Layers與NIG專案的關係 7
Spring MVC Application Layers與NIG專案的關係 – cont.
8
Business / Service Layer 9
Add @Service annotation is a must 1 Create manager interface
2 Create manager implementation Your business logic will be defined in manager implementation class
Declare the DAOs you will use in this function and add @Autowired annotation
Persistence Layer 10
Daoand domain class had been generated via code generator. You may need to add findXXX method in dao class
Spring MVC Architecture 11
Spring Dispatcher
Servlet
NIG005Controller
NIG010Controller
NIG015Controller
NIG020Controller
NIGXXXController
request
Apache Tiles
response View
User Interface / Web Layer 12
Spring Dispatcher
Servlet
NIG005Controller
NIG010Controller
NIG015Controller
NIG020Controller
NIGXXXController
request
Apache Tiles
response View
1 Create NIGxxxW.jsp
2 Create nig.nigxxxw.js
3 Update jsp file path to header.jsp
4 Update file path to tiles-front.xml
5 Create NIGxxxController.java
6 Create NIGxxxDataBean.java
User Interface / Web Layer – cont. 13
Add @Controller annotation is a must
Autowired manager interface
Resources 14
� Spring – www.springframework.org � J2EE without EJB – Rod Johnson / Jurgen Hoeller � Better, Faster, Lighter Java – Bruce Tate � Spring in action – Craig Walls with Ryan Breidenbach
� Wiring your Web Application with Open Source Java http://www.onjava.com/pub/a/onjava/2004/04/07/wiringwebapps.html