• No results found

JEE Web Applications Jeff Zhuk

N/A
N/A
Protected

Academic year: 2021

Share "JEE Web Applications Jeff Zhuk"

Copied!
17
0
0

Loading.... (view fulltext now)

Full text

(1)

© ITS, Inc. [email protected]

JEE Web Applications

Jeff Zhuk

From the book and beyond

“Integration-Ready

Architecture and Design”

Cambridge University Press

Software Engineering With

XML, Java, .NET,

Wireless,

Speech and Knowledge

Technologies

(2)

© ITS, Inc. [email protected]

Services

Facility management with Geo Info System

Instant Share Voice and Video Service

Distributed Knowledge Framework

Partner Integration Framework

Document Handling Services

Business Data Integrator

Remote Control Service

VoiceXML/SALT/SRS Clients WinCE/TabletPC/J2SE/J2ME/Applets/Apps/JWS

Integration

with other

systems

Service

Registry

Centers

XML Rules Descriptor Natural Language Interpreter Knowledge Engine

Wireless or PDA Clients: 802.11; Bluetooth;WiFi; etc

HTML/WML/cHTML/XML Clients

SRS

WAP I-mode

Knowledge Engine

Data and Service Valuation

Enterprise Services and

Presentation Layers

(3)

© ITS, Inc. [email protected]

Client

Container

Browser or

mail client

Client

Device

With

Embedded

Application

Multi-tier Enterprise Architecture

802.11

Bluetooth

Mail Server

Web Server

ASP.NET

Or

JSP/Servlet

Dynamic

Content

Engines

Service

Container

(App

Server)

Message

Queue

Business

Services

Connectors

Device and

data drivers

XML rules

and

descriptors

Data and

Remote

Systems

LDAP

RDBMS

DS, NS

Control

Devices

Legacy

Apps

(4)

© ITS, Inc. [email protected]

A multi-tier Open Enterprise architecture

• A multi-tier open Java based enterprise architecture is built as a set of extensible services-frameworks with ability to add/customize services run-time

• Tier 1 – Client requests services via XML based service API

- Client types: 1) partner application running on a workstation, 2)Web Browser with JavaTM Applet , 3)Wireless device with embedded WML browser or VoiceXML

interpreter, 4)Java card technology device, etc.

- Tier 2 – Web Container with J2EE Servlet and JSP engines where servlet is responsible for session tracking and request distribution, and JSPs provide presentation layer back to the client. Tier 2 can be considered as a

communication tier that in the case of HTTP serves as a Web Container

- Tier 3 – worker beans providing services. Worker beans can be (not necessary) implemented as EJBs to gain advantage of security and transaction monitoring services provided by EJB containers.

- Tier 4 – Connectors to Data, Remote Systems, etc. (XML API to Tier5)

- Unified JNDI based approach is used for data integration describing data types, rules, and structure with XML descriptors. A master controller with XML based API is created to describe a set of operations on device controllers.

(5)

© ITS, Inc. [email protected]

Java Enterprise Services

Naming and Directory

– allows programs to locate services and components through

the Java Naming and Directory Interface (JNDI) API

Authentication

– enforces security by requiring users to log in

HTTP

– enables Web browsers to access servlets and JavaServer

Pages (JSP) files

EJB

– allows clients to invoke methods on enterprise beans

JMS

(6)

© ITS, Inc. [email protected]

JEE Implementations of

Model-View-Controller (MVC) Design Pattern

Web Applications before MVC:

-Common Gateway Interface (CGI)

MVC Model 1 (Page-centric Architecture) JSP-to-JSP

MVC Model 2 (Servlet-centric Architecture

Open Source Web application frameworks: Struts and

more

Standard-based Web application framework: Java

Server Faces (JSR-127)

(7)

© ITS, Inc. [email protected]

Common Gateway Interface (CGI)

A Mix of Presentation and Business Logics

With Generous Use of Resources

Client(s)

Web

Browser

Http

Post/Get

Web Server

IIS

Apache

Etc.

Database

Submit

Form

Request

Display

Page

Response

Each client request fires up a program (process) on the server side that

performs business logic and sends a dynamic HTML page back to the client

On the server side

VB/Perl/Java/exe

Program that

performs business

logics, works with

data, and

generates HTML

Print “<html>”

(8)

© ITS, Inc. [email protected]

MVC Model 1

Page-Centric Architecture

Client(s)

Web

Browser

Http

Post/Get

Web Tier

JSPs / ASPs

with

to execute

business

logic and

provide data

access

Database

Submit

Form

Request

Display

Page

Response

Interrelated JSP pages provide presentation, control, and business processing

with scriplets and embedded Java beans encouraging “spaghetti” code in JSP.

Embedded Java Beans

Other

Enterprise

Applications

<html> <% a= b + c %>

(9)

© ITS, Inc. [email protected]

MVC Model 2 - Better Separation of

Business and Presentation Layers

Client(s)

Web

Browser

Http

Post/Get

Web Tier

JSPs are

forming

The

View

Database

Submit

Form

Request

Display

Page

Response

Servlet and JSP work together. Servlet and related classes, like Struts Action,

c

ontrol application logic and interact with services while JSP forms the presentation

Model

Java Beans Service Layer

Other

Enterprise

Applications

Web Tier

Servlet

Controller

(10)

© ITS, Inc. [email protected]

Current Enterprise Web Applications

with Struts and other Frameworks

Client Request: Service= “mail” Action= “get” Type= “wml”

ASCX or

Servlet

Controller

ASP/JSP View

Multiple Layers:

wml html vxml etc.

Model Components: Service Beans or Actions

Persistent

Data

DataService Semantics

Frameworks by ITS, Inc.

Complementary To

Struts and Portlets

App Server

EJBs

EJBs

EJBs

MVC Design Pattern (J2EE/ASP.Net)

Multiple Presentation Factories

(HTML/WML/etc.)

Struts

Spring

Hibernate

AJAX

(11)

© ITS, Inc. [email protected]

Self-Healing Well Packaged

Applications

Use existing frameworks to:

- Deliver basic operation statistics

- Monitor application health

- Validate application data

- Prepare application for work

(Leave only DDL in your release

notes, use app services to prepare

data)

- Provide testing facilities

Provide standard ways for data exchange

(12)

© ITS, Inc. [email protected]

e-Business e-Government e-Training

Common Portal Use Cases

User Profile

Change User Roles

Policy Maker Admin

Change Business Rules

Search Member Customize Registration Content Management Registrar User Login Knowledgebase Collaboration Content Management

Authoring, Update, Versioning Forms, Permits, Applications Scheduling events/facilities Workflow Routing

Planning and Approval Document/Photo Imaging Task Tracking and Reporting Data and Service Evaluation

Search

Search for Data and Services GIS (Maps and Routes)

Linking Related Cases Content-based Subscription

Collaboration

Email

Conferencing Instant Messaging

Privilege-based Data/Service Sharing

Access Rules:

Accessibility Single Sign-On Role based Access User Privacy Control Device Independence

Recognize Common

Problems and Use

(13)

© ITS, Inc. [email protected]

Summary/Repetition

Web Application Architectures

• 1 No MVC = CGI

• 2 ?

• 3 ?

• 4 ?

• 5 ?

(14)

© ITS, Inc. [email protected]

Summary/Repetition

Web Application Architectures

• 1 No MVC = CGI

• 2 MVC Model 1 – Page-Centric Architecture

• 3 ?

• 4 ?

• 5 ?

(15)

© ITS, Inc. [email protected]

Summary/Repetition

Web Application Architectures

• 1 No MVC = CGI

• 2 MVC Model 1 – Page-Centric Architecture

• 3 MVC Model 2 - Better Separation of Business and

Presentation Layers

• 4 ?

• 5 ?

(16)

© ITS, Inc. [email protected]

Summary/Repetition

Web Application Architectures

• 1 No MVC = CGI

• 2 MVC Model 1 – Page-Centric Architecture

• 3 MVC Model 2 - Better Separation of Business and

Presentation Layers

• 4 Struts and Other Frameworks reduce generic code

(17)

© ITS, Inc. [email protected]

Summary/Repetition

Web Application

Architectures

• 1 No MVC = CGI

• 2 MVC Model 1 – Page-Centric Architecture

• 3 MVC Model 2 - Better Separation of Business and

Presentation Layers

• 4 Struts and Other Frameworks reduce generic code

References

Related documents

Title A single-center analysis of the survival benefits of adjuvant gemcitabine chemotherapy for biliary tract

Using the results from a large number of simulations we compared the evolutionary his- tories of the resulting planetary systems with the following three properties of the

Wearing of suitable protect- ive equipment (including personal protective equipment referred to under Section 8 of the safety data sheet) to pre- vent any contamination of skin,

◆ Guidelines for planning, implementing, and reviewing a comprehensive maintenance training program ◆ Easy-to-use techniques for improving your “Maintenance IQ” and your value to

Six validated tools were used to screen for the full range of mental health disorders including developmental disorders like Personality Disorder, Attention Deficit

Center The Patient Center window includes the following enhancements: • If you are using Eyefinity EHR, the ExamWRITER button is no

Old Habit: Paper CRF Process Primary Investigator Source Document CRC CRFs CRFs DB1 Double Data Entry Master Clinical 6 Query Report Form Site Sponsor Query Report Form CDM

It has previously been shown that recombinant antimicrobial peptides (AMP) are a possible source of increased resistance to fungal plant pathogens when expressed in a variety