Download
3 tier web application architecture n.
Skip this Video
Loading SlideShow in 5 Seconds..
3-Tier Web Application Architecture PowerPoint Presentation
Download Presentation
3-Tier Web Application Architecture

3-Tier Web Application Architecture

312 Vues Download Presentation
Télécharger la présentation

3-Tier Web Application Architecture

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. 3-Tier Web Application Architecture

  2. HTTP request Name/Value pairs HTTP response HTML/XML/XSLT Client App Server Simple Log-in public String button1_action() { // TODO: Process the button click action. Return value is a navigation // case name where null will return to the same page. if (textField1.getText().toString().equalsIgnoreCase("itkstu") && textField2.getText().toString().equals("student")) return "OK"; else return "NotOK"; Don’t do this here! (Why?)

  3. Why do we need Beans? • Things generally are not so simple (thus, should not be hard-coded) • Generally database access is required • Bean contains the business logic • (Data access) bean acts as a bridge between GUI and DB in the middle tier

  4. SQL Result set App. Server HTTP request Name/Value pairs Client Tier 2 (Domain Layer) Database Server Tier 1 (View Layer) Tier 3 (Data Layer) HTTP response HTML/XML/XSLT Using Beans Bean / Business Logic (Getters & Setters) + Servlets/JSP/JSF/ VB.NET/Perl (Dynamic Content) HTML, CSS, JS, Applet (Static Content) +

  5. Object Responsibilities • View Layer • Display electronic forms and reports • Capture input (events) • Displays data fields • Accept input data • Edit and validate input data • Forward input data to the domain layer classes • Startup and shutdown the system From Object-Oriented Analysis and Design and the Unified Process

  6. Object Responsibilities (cont’d) • Domain Layer • Create domain (persistent) classes • Process all business rules • Prepare persistent classes for storage to the DB • Data Access Layer • Establish and maintain DB connection • Contain all SQL statements • Process result sets into appropriate domain classes • Disconnect gracefully from the DB From Object-Oriented Analysis and Design and the Unified Process