Você está na página 1de 21

J2EE APPLICATION UNDERSTANDING

Petshop.vertigo.com

INTRODUCTION
Internet

Access and share information Huge network of computers Reach person without restriction and delay Easy navigation Simple location of information's Visually appealing Consistency in design
Interactive like buttons, text boxes, drop down list, check boxes Fill out forms

Good Website

Basic features

Application Modules
Check out

Sign up

Wish list

Petshop.vertigo. com
Sign in

Payment

Profile

petshop.vertigo.com Functional areas


selecting products adding to wish list adding to shopping cart providing authentication billing and shipping address payment options confirmation

Non functional areas


24*7 availability security

Client

Network

Server

Technology
Basic java HTTP Advanced java J2EE components (servlets,jsps,ejbs) Hibernate DBMS servers

Java EE 5 Components
Dynamic HTML Pages Client Tier

Client Machine

Servlets
Web Tier

JSP Pages

Java EE Appliaction Server


Business Tier

Enterprise Beans

Database

EIS Tier

Database Server

Architecture

Tasks performed by the web container


J2EE App Server Request Web Container
Loads the Servlet Class

First Client Request

Instantiate the Sevlet


Initialize the Servlet Class Pass request to the Servlet Interface

Response

Servlet Response

Pet shop application working with technology

Continue..
Sessions
o o o o Cookies hidden form values servlet session API Url rewriting

Web services Frame work

Login process
Login.html Transfer of parameters Login.java Response from web container for first request Get parameters from Login.html Select of registered data Comparison Action forward with proper authentication Session start Validation Client side validation Sever side validation

Why Validate?
Security Protect against script injection and other attacks Correctness Ensure the system doesnt process invalid data Enforce business rules Ensure user input is compatible with internal structures, data schemas and external systems Responsiveness Flag invalid data before performing expensive processing tasks

Registration form
Java script Data elements Special characters Pin code validation Phone number validation Email validation Finally how this will be processed Persistence

Search Box
Enter search information Compare in search engine database Find respective documents

Sorting
Sort documents Use algorithms Rank pages

Ranking
Based on access Popularity Investment

Working of Pet shop Search Engine


Stores Words Index Search Engine Looks in Index Sends Query

Gets Matches Indexer Gets words Sends Formatted Results User Selects required page Results Page User views Retrieved Page Web Site Documents Retrieved Page Search Form

Shopping cart
Adding required item in shopping cart Update Currency validation Wishing list Deleting wishing list Check out

Banking aspects of pet shop


Registering for web service Choice of bank accounts for payment Secure transfer of account details Independent mark up language EJB features to implement ACID properties Transaction management

Acid properties
Atomicity ensures that the individual actions are bundled together and appear as one single unit of work. A transaction that changes or updates the data in the database must ensure that the data remains in the consistent state, whether the transaction succeeded or failed.

ACID properties
The isolation property of the transaction states how the concurrent transactions that act on the same resource behave. This property of transaction guarantees that updates to the resource (database records) survive failures.

Banking aspects of pet shop


No bank account connectivity No actual transaction happens Validation of credit card and expiry date confirmation

Você também pode gostar