Presentation is loading. Please wait.

Presentation is loading. Please wait.

Layers & Tiers Umair Javed Lec - 41.

Similar presentations


Presentation on theme: "Layers & Tiers Umair Javed Lec - 41."— Presentation transcript:

1 Layers & Tiers Umair Javed Lec - 41

2 Layers & Tiers Layers are merely logical groupings of the software components that make up the application or service. Whereas tiers refer to the physical residence of those layers (hardware) In general, Layers – represents logical view of application Tiers – represents physical view of application However, both terms are used interchangeably.

3 Layers Figure shows a simplified view of one application and its layers.

4 Tiers Presentation Layer Web Layer Business Layer EIS Layer browser
Client machine Web server Web Layer Server machine Application server Business Layer DB server EIS Layer DB machine

5 Layers [1] Presentation layer Collects user inputs
Validates user inputs Presents the results of a computation Controls the screen flow

6 Layers [2] Business Layer
Concerned with the application specific functionality Used to implement business rules and to perform business tasks For example, in a banking system, banking functions such as opening an account, calculation of Tax, etc.

7 Layers [3] Data Layer Concerned with the management of the data & data sources of the system. Data sources can be database, XML , web services, flat file etc. Encapsulates data retrieval & storage logic For example, the address book application needs to retrieve all person records from a database to display them to the user

8 Frameworks(Struts,JSF etc)
Layers Support in Java Layers Java/J2EE Technology Client Presentation HTML/Applets JSP / Servlets Frameworks(Struts,JSF etc) Server Presentation Business JavaBeans / EJB Data DAO / Connectors

9 Java 2 Enterprise Edition (J2EE)

10 What is J2EE? Open and standard based platform for:
Development & deployment of n-tier web based and component based enterprise applications Reusability, enhance-ability, scalability & interoperability

11 J2EE Suite Core technology: Web Technology Platform services
Container infrastructure, language and environment support Web Technology Java Servlets JavaServer Pages (JSP) JavaServer Pages Standard Tag Library (JSTL) JavaServer Faces (JSF) Platform services Security Transactions Resources Connectors Java Message Service And extensive support for XML technology Enterprise Java Bean (EJB) technology etc.

12 J2EE Distributed Multi-tiered Applications

13 J2EE : Multi-tiered Applications

14 J2EE : Multi-tiered Applications

15 J2EE : Multi-tiered Applications
servlets

16 Client Tier Communication Options

17 Communication with Business Tier

18 Case Study: Matrix Multiplication
Using Layers

19 Case Study: Matrix Multiplication
Problem Statement Calculate product of two matrices of order 2 * 2 Result of multiplication should be stored in DB as well as shown to the user.

20 Case Study: Matrix Multiplication
Format Input format input will be in 4,2,6,5 format separated by commas where 4,2 represents entries of the first row Display format Displays the matrix as a square Storage format Matrix will be stored as a string

21 Matrix Multiplication: Layer by Layer View
Client side Presentation layer HTML Matrixresult .jsp Matrixinput .jsp Server side Presentation layer MatrixBeann ControllerServlet Controller layer MatrixMultiplier Business layer Data layer MatrixDAO

22 Case Study: Matrix Multiplication
Example Code netBeans4.1 Project


Download ppt "Layers & Tiers Umair Javed Lec - 41."

Similar presentations


Ads by Google