1 / 22

Layers & Tiers

Layers & Tiers. Lec - 41. 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

iona-norman
Download Presentation

Layers & Tiers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Layers & Tiers 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 Client machine browser Presentation Layer Web server Web Layer Server machine Application server Business Layer DB machine DB server EIS Layer

  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. Layers Support in Java Java/J2EE Technology Layers 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: • 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 TierCommunication 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 MatrixDAO Data layer

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

More Related