当前位置:文档之家› J2EE层次设计架构典型的三层结构表示层(present.

J2EE层次设计架构典型的三层结构表示层(present.

基础架构层 (infrastructure) 存储持久数据
2018/9/15 School of Software, Sichuan University 1
基 于 J2EE 的 开 发 技 术
目前常见J2EE的API
* * * * * * * * * * * * JavaServer Pages(JSP)技术1.2 Java Servlet技术2.3 JDBC API 2.0 Java XML处理API(JAXP)1.1 Enterprise JavaBeans技术2.0 Java消息服务(JMS)1.0 Java命名目录接口(JNDI)1.2 Java事务API(JTA) 1.0 JavaMail API 1.2 JavaBeans激活架构(JAF)1.0 J2EE连接器体系结构(JCA)1.0 Java认证和授权服务(JAAS)1.0
• Controller:Java Servlets __ *controller.java to processes the user's input
• The separation of tasks allows for easily maintainable systems
2018/9/15 School of Software, Sichuan University 7
基 于 J2EE librarian (ssn, fname, lname, street, city, state, 的 pcode, phone, email, passwd) 开 发 booktitle (callnumber, name, author, edition, isbn, 技 year, publisher) 术 hold (ssn, callnumber, holddatetime) 阮 树 骅
基 • Model View Controller (MVC) architecture 于 J2EE • Model:JavaBeans __ *.java in library package 的 to represent the data and logic of the subset of 开 the external world used in the program 发 技 • View:Java Server Pages __ *.jsp 术 to manages the output of a user interface 阮 树 骅
member (ssn, driverlicstate, driverlicnum, fname, lname, street, city, state, pcode, phone, email, passwd)
book (bookid, callnumber, borrowerssn, duedate, librarianssn)
J2EE层次设计架构 基 于 J2EE 的 开 发 技 术 典型的三层结构 表示层 (presentation) 主要处理用户和软件的交互 * 视窗图形界面(VB,PB)(Client) * 基于html的界面 (Server)
阮 树 骅
领域层 (domain)(业务逻辑层)(Server or Client) 对输入和存储数据的计算 * Transation Script (属于结构性思维) * Domain Model(属于OO思维)
2018/9/15 University 4
阮 树 骅
2018/9/15
School of Software, Sichuan University
5
2018/9/15
School of Software, Sichuan University
6
iCarnegie Library Project
Data Tier
2018/9/15
EJB Entity Bean
JDBC/SQLJ JDBC/SQLJ
Existing System
Database
3
School of Software, Sichuan University
MVC(Model-View-Controller)软件设计模式 基 1、模型(Model) 于 模型是应用程序的主体部分。 J2EE 模型表示业务数据,或者业务逻辑。 的 开 2、视图(View) 发 视图是应用中与用户界面相关的部分。 技 是用户看到并与之交互的界面。 术 3、控制器(Controller) 控制器处理用户的输入。 控制用户界面数据显示和更新Model对象状态。 实现了功能模块和显示模块的分离; 提高了应用系统的可维护性、可扩展性、可移植性 和组件的可复用性。School of Software, Sichuan
Tier connector
RMI/IIOP
Presentation Tier
HTML Client
Java Applet/Java Applications
CORBA Client
Simplified J2EE Architecture
CORBA/IIOP
EJB Session Bean
阮 树 骅
School of Software, Sichuan Univers2
基 HTTP 于 Web Server J2EE HTML/XML 的 Servlets 开 Java Server Pages (JSPs) 发 RMI/IIOP 技 术 Business Application Server
webuser:select on all tables/update on book
2018/9/15 School of Software, Sichuan University 8
Library Objects 基 JavaBeans 于 J2EE · Member, Librarian, Hold, Book and BookTitle 的 a copy of the information in the database 开 发 · BookSet, BookTitleSet and HoldSet 技 a set of Book, BookTitle and Hold objects 术 · LibraryMember, LibraryLibrarian, LibraryBook and LibraryBookTitle instantiate the lightweight objects
相关主题