Explanation of PetStore Structure (1)

xiaoxiao2021-03-06  17

PetStore: The installer in the zip package uses Ant to compile it.

You need to modify /src/bulid.properties before compiling PetStore

Compilation method and step reference http://java.sun.com/bopeprints/code/jps131/docs/building.html

Special configuration: You can use J2EE's deploymentTool (save after modifying it, you don't need to recompile it?) Or re-compiling the published description file (XML configuration file)

Localization: Add a new JSP page Create a local screen definition file Add new directory data (Modify /src/apps/petstore/src/docroot/populate/populate-utf8.xml)

Database configuration: You can replace the default Cloudscape with other databases, mainly modify a series of XML files.

Above: http://java.sun.com/boeprints/code/jps131/docs/configuring.html

Four modules of PetStore:

E-Commerce Web Site: Web Application

PetStoreAdmin (Manager): Rich Client transmitted using XML messages instead of using brower

OPC (Order Processing Center): Process-based application

Receive and process XML document data (including orders) via JMS

Using the XML message via HTTP to provide a management program including order data

Send an order notification to the customer using JavaMail

Send XML order documentation to customers via JMS

Maintenance order database

Supplier service: Process, management goods - procedures for customer transport

Get an XML format order from OPC via JMS

Shipping products to customers

Provide manual cargo management via Web

Maintain cargo database

PetStore's documentation: http://java.sun.com/blueprints/guidelines/deSigning_Enterprise_Applications_2e/sample-app/sample-app1.3.1a3.html

Advanced design choice:

Application Framework: MVC

Business logic VS Enterprise Beans Components: Business Logic Separation

Local and distributed architecture

Can describe VS programmatic transfer control? Refers to the application deployment to control or use the program to control the consistency of the data.

Synchronization and non-synchronous communication: If the return to the directory results are synchronized (real time), the transmission of the order is as unconventional;

The structure of the PetStore:

WAF (Web Application Framwork): Request Filtering and Distribution Appearance Template Inheritance Replies Custom Tag Screen Flow Control

Model design:

Control: The WAF is implemented as a WAF extension (unique model that is directly interacting with the user); any type of Response; maintenance; business logic can be modified;

Shopping basket: user choice

Login: Login to confirm and manage the process after login

Message delivery: Pass the order to OPC, non-synchronous

Directory: Provides page views based on user search purposes

Customer: Various customer information

Request Filter: including EncodingFilter and Signonfilter

HTML Action: An interface class defined by developers (implemented com.sun.j2ee.blueprints.waf.controller.Action.htmLAction) Request the processor to receive a request, from the URL corresponding table to find the corresponding table HTML action, then create an instance of this HTML action;

Example of an order Description:

ORDERHTMLACTION creates an order by returning a OrdereEvent containing order data by returning requestProcessor;

RequestProcessor gives this Event to the EJB controller;

The EJB controller uses this event to create and execute an orderRejbAction (actually this action is created by sending an XML message to the order processing center with JMS);

Returns a OrdereventResponse containing an order confirmation;

WAF saves this response in the session.

After the business logic is executed, WAF selects the need to display. The choice of the view relies on the developer's configuration on the screen stream (including the XML document mappings.xml of screen stream management)

The relationship requesting the next view to the next is usually static (you can also control: using a WAF hook: interface com.sun.j2ee.blueprints.waf.controller.web.flow.flowhandler)

WAF includes a series of multiplexed custom labels / with a unified appearance template;

JSP page can be written with template or self-written, template enables Cleanly-structured JSP pages;

Control the transfer function is controlled by the program, through the TemplateServlet

User Login / Registration Management: Only two anonymous support and registered users;

Applications User: User / program defined by the J2EE system; use the latter in the PetStore, belongs to a J2EE system user; other special permissions users are best implemented with J2EE system user function

J2EE system users cannot add programs to automatically

转载请注明原文地址:https://www.9cbs.com/read-40317.html

New Post(0)