Download presentation
Presentation is loading. Please wait.
Published byNathan Wells Modified over 9 years ago
1
3-Tier Web Application Architecture
2
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"; HTTP request Name/Value pairs HTTP response HTML/XML/XSLT Client App Server 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
Using Beans Client App. Server Database Server HTML, CSS, JS, Applet (Static Content) Servlets/JSP/JSF/ VB.NET/Perl (Dynamic Content) + HTTP request Name/Value pairs HTTP response HTML/XML/XSLT SQL Result set Bean / Business Logic (Getters & Setters) Tier 1 (View Layer) Tier 2 (Domain Layer) Tier 3 (Data Layer) +
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 5 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 6 From Object-Oriented Analysis and Design and the Unified Process
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.