1. Trang chủ
  2. » Công Nghệ Thông Tin

Bài giảng lập trình mạng architecture GV nguyễn xuân vinh

90 341 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • J2EE ARCHITECTURE

  • Objectives

  • PowerPoint Presentation

  • Building a Departmental Store

  • Challenges of Enterprise Application Development

  • Enterprise Application Process

  • Prototype Development Process

  • Final Application Process

  • Diverging Standards

  • Challenges Faced

  • Restructuring/Redeployment

  • Scalability

  • Managing System Resources

  • Integrating Existing Systems

  • Freedom to Choose

  • Security

  • Java EE Objectives

  • Slide 18

  • Java EE 6 PlatformHighlights

  • J2EE Application Model

  • Distributed Multitiered Applications

  • Slide 22

  • Slide 23

  • Java EE Components

  • Java EE Clients

  • Slide 26

  • Slide 27

  • Slide 28

  • Slide 29

  • Slide 30

  • Java EE Server Communications

  • Web Components

  • Slide 33

  • Slide 34

  • Business Components

  • Slide 36

  • Enterprise Information SystemTier

  • Java EE Containers

  • Container Services

  • Slide 40

  • Container Types

  • Slide 42

  • Slide 43

  • Web Services Support

  • Slide 45

  • Slide 46

  • XML

  • SOAP Transport Protocol

  • WSDL Standard Format

  • Slide 50

  • UDDI and ebXML Standard Formats

  • Java EE Application Assembly and Deployment

  • Slide 53

  • Slide 54

  • Packaging Applications

  • Slide 56

  • Types of deployment descriptors

  • Types of Java EE modules

  • Development Roles

  • Java EE Product Provider

  • Tool Provider

  • Application Component Provider

  • Slide 63

  • Slide 64

  • Application Assembler

  • Application Deployer and Administrator

  • Slide 67

  • Java EE 5 APIs

  • Java EE 6 APIs

  • Java EE APIs in the Web Container

  • Java EE APIs in the EJB Container

  • Java EE APIs in the Application Client Container

  • Enterprise JavaBeans Technology

  • Slide 74

  • Java Servlet Technology

  • JavaServer Faces Technology

  • Slide 77

  • JavaServer Pages StandardTag Library (JSTL)

  • Java Persistence API (JPA)

  • Java Transaction API (JTA)

  • Java API for RESTfulWeb Services

  • Others

  • Slide 83

  • Java EE 6 APIs in the Java Platform, SE 6.0

  • Java Database Connectivity (JDBC) API

  • Java Naming and Directory Interface API

  • Slide 87

  • Slide 88

  • JNDI Example – Lookup.java

  • HỎI ĐÁP

Nội dung

KHOA CÔNG NGHỆ THÔNG TIN OF 90 05/12/15 MÔN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM J2EE ARCHITECTURE Presenter: Nguyễn Xuân Vinh Information Technology Faculty Nong Lam University OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Objectives  Understand Enterprise Application  Know some type of Architectural Models  Understand Web Service Architecture  Determine Service-Oriented Architecture  Understand and use some Web Service technologies  Build a Simple Web Service s e r p Two-Tier Client Ear Server Business Logic in middleware services 0s ly TMS Client Thin clients INTERNET OR B s MOM Server OF 90 05/12/15 MÔN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Building a Departmental Store Pay more attention to: $$ Pay less attention to: Location Constructing building Appropriate Items Interiors Discounts Electrical Connections Customer Satisfaction Your focus: Customer Satisfaction Employ experts to handle specific tasks OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Challenges of Enterprise Application Development Increase in number of users Change in vendor Client i ty v i t c e Conn s Issue Server Different programming models MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Enterprise Application Process Conception Secure OF 90 05/12/15 Prototype Usability F e e d b a c k + re vi e w Enterprise Application OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Prototype Development Process User Requirements Functionality of the Application Prototype Design Prototype OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Final Application Process Prototype Design Enterprise Application Design Enterprise Application Reviewed Functionality of the Application MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM Diverging Standards HTML WML 05/12/15 HDML OF 90 KHOA CÔNG NGHỆ THÔNG TIN Application Server Database Same data can be presented in a variety of ways, to a variety of devices 10 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Challenges Faced  Whether the application is capable of understanding different standards  Efforts required to understand the different standards  Efforts required to adapt to future standards 76 OF 90 05/12/15 MÔN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN JavaServer Faces Technology  JavaServer Faces technology is a user interface framework for building web applications  The main components of JavaServer Faces technology are:  A GUI component framework  A Renderer object generates the markup to render the component and converts the data stored in a model object to types that can be represented in a view  A standard RenderKit for generating HTML/4.01 markup  The following features support the GUI components:  Input validation  Event handling  Data conversion between model objects and components  Managed model object creation  Page navigation configuration  Expression Language (EL) 77 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN JavaServer Faces Technology  In the Java EE platform, new features of JavaServer Faces include the following:  The ability to use annotations instead of a configuration file to specify managed beans  Facelets, a display technology that replaces JavaServer Pages (JSP) technology using XHTML files  Ajax support  Composite components  Implicit navigation 78 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN JavaServer Pages StandardTag Library (JSTL)  The JavaServer Pages Standard Tag Library (JSTL) encapsulates core functionality common to many JSP applications  Use a single, standard set of tags  JSTL can use tag for  Handling low control  Manipulating XML documents  Internationalization tags  Accessing databases using SQL  Some commonly used functions 79 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java Persistence API (JPA)  The Java Persistence API is a Java standards-based solution for persistence  Persistence uses an object/relational mapping approach to bridge the gap between an object-oriented model and a relational database  Java Persistence consists of the following areas:  The Java Persistence API  The query language  Object/relational mapping metadata 80 OF 90 05/12/15 MÔN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java Transaction API (JTA)  Java Transaction API (JTA) provides a standard interface for demarcating transactions  Provides a default auto commit to handle transaction commits and rollbacks 81 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java API for RESTfulWeb Services  The Java API for RESTfulWeb Services (JAX-RS) defines APIs for the development of web services built according to the Representational State Transfer (REST) architectural style  JAX-RS application is a web application that consists of classes that are packaged as a servlet in a WAR ile along with required libraries 82 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Others  Managed Beans: specification is part of the Java EE platform specification (JSR 316)  Contexts and Dependency Injection for the Java EE Platform(JSR 299): defines a set of contextual services, provided by Java EE containers  Dependency Injection for Java (JSR 330): defines a standard set of annotations (and one interface) for use on injectable classes  BeanValidation: defines a metadata model and API for validating data in JavaBeans components  JavaMessage Service API: is amessaging standard that allows Java EE application components to create, send, receive, and read messages It is loosely coupled, reliable, and asynchronous 83 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Others  Java EE Connector Architecture  JavaMail API  Java Authorization Contract for Containers  Java Authentication Service Provider Interface for Containers 84 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java EE APIs in the Java Platform, SE 6.0  JavaDatabase Connectivity (JDBC) API  Java Naming and Directory Interface (JNDI) API  Java Beans Activation Framework (JAF)  Java API for XML Processing (JAXP)  Java Architecture for XML Binding (JAXB)  SOAP with Attachments API for Java (SAAJ)  Java API for XMLWeb Services (JAX-WS)  Java Authentication and Authorization Service (JAAS) 85 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java Database Connectivity (JDBC) API  The Java Database Connectivity (JDBC) API lets you invoke SQL commands from Java programming language methods  The JDBC API has two parts:  An application-level interface used by the application components to access a database  A service provider interface to attach a JDBC driver to the Java EE platform 86 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java Naming and Directory Interface API  Provide naming and directory functionality, enabling applications to access multiple naming and directory services  Include existing naming and directory services, such as LDAP,NDS,DNS, andNIS 87 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java Naming and Directory Interface API  A Java EE component can locate its environment naming context by using JNDI interfaces  A component can create a javax.naming.InitialContext object and look up the environment naming context in InitialContext under the name java:comp/env  A component’s naming environment is stored directly in the environment naming context or in any of its direct or indirect subcontexts 88 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java Naming and Directory Interface API 89 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN JNDI Example – Lookup.java package service; import java.util.Properties; import javax.naming.*; public class Lookup { public static void main(String[] args) { String name = ""; if (args.length > 0) name = args[0]; try { // Create a Properties object and set properties appropriately Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"); props.put(Context.PROVIDER_URL, "file:///"); // Create the initial context from the properties we just created Context initialContext = new InitialContext(props); // Look up the object Object obj = initialContext.lookup(name); if (name.equals("")) System.out.println("Looked up the initial context"); else System.out.println(name + " is bound to: " + obj); } catch (NamingException nnfe) { System.out.println("Encountered a naming exception"); } } } 90 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM HỎI ĐÁP KHOA CÔNG NGHỆ THÔNG TIN ... MÔN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM Figure Figure Multitiered MultitieredApplications Applications 24 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH. .. 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM Figure Figure Server ServerCommunication Communication 32 OF 90 05/12/15 MÔN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG... 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XN VINH TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM Figure Figure Business Businessand andEIS EISTiers Tiers 37 OF 90 05/12/15 MƠN: LẬP TRÌNH MẠNG GV: NGUYỄN XUÂN VINH TRƯỜNG

Ngày đăng: 04/12/2015, 20:22

TỪ KHÓA LIÊN QUAN