Layered Architectures The objectives of this chapter are: To understand the principles and importance of Layered Architectures To explain the structure.

Slides:



Advertisements
Similar presentations
Introduction to the Spring Framework
Advertisements

Distributed Systems Architectures
Design Validation CSCI 5801: Software Engineering.
Chapter 13 Review Questions
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 9 Distributed Systems Architectures Slide 1 1 Chapter 9 Distributed Systems Architectures.
1 Layers Data from IBM-Rational and Craig Larman’s text integrated into these slides. These are great references… Slides from these sources have been modified.
Computer Monitoring System for EE Faculty By Yaroslav Ross And Denis Zakrevsky Supervisor: Viktor Kulikov.
8.
Events and the AWT The objectives of this chapter are: To understand the principles of the Java 1.1 event model To understand how the event model is used.
2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software1 Layers Data from IBM-Rational and Craig Larman…
Distributed Systems Architectures
Introduction to Web Database Processing
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Software development process: Problem decomposition and analysis.
CMPT 370: Information Systems Design Instructor: Curtis Cartmill, Simon Fraser University – Summer 2003 Lecture Topic: Layered Architecture Class Exercise:
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
Logical Architecture and UML Package Diagrams
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 1.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
N-Tier Architecture.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
JDBC Session 5 Tonight: Data Access Patterns 1.J2EE Architecture & Design Patterns 2.The Data Access Tier 3.Data Access Patterns –DataAccessObject (DAO)
The Design Discipline.
Chapter 13 Starting Design: Logical Architecture and UML Package Diagrams.
© Drexel University Software Engineering Research Group (SERG) 1 Based on the paper by Philippe Kruchten from Rational Software.
Logical Architecture and UML Package Diagrams 徐迎晓 复旦大学软件学院.
Systems Analysis and Design in a Changing World, Fifth Edition
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
An Introduction to Software Architecture
DATABASE PROGRAMMING Lecture on 16 – 05 – PREVIOUS LECTURE QUIZ: - Some students were very creative in transforming 2NF to 3NF. Excellent! - Some.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Architectural Design.
Systems Analysis and Design in a Changing World, 6th Edition
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
Systems Analysis and Design in a Changing World, 6th Edition 1 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH Chapter 11 SATZINGER.
Chapter 13 Logical Architecture and UML Package Diagrams 1CS6359 Fall 2012 John Cole.
JBoss at Work Databases and JBoss Chapter 4 Jeff Schmitt October 26, 2006.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
What to remember from Chap 13 (Logical architecture)
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Design CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2008 Course.
Chapter 8: Aspect Oriented Programming Omar Meqdadi SE 3860 Lecture 8 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
TK2023 Object-Oriented Software Engineering CHAPTER 8 LOGICAL ARCHITECTURE.
Chapter 1 Revealed Distributed Objects Design Concepts CSLA.
©Ian Sommerville 2000, Tom Dietterich 2001 Slide 1 Distributed Systems Architectures l Architectural design for software that executes on more than one.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Databases (CS507) CHAPTER 2.
Chapter 2 Database Environment.
N-Tier Architecture.
Server Concepts Dr. Charles W. Kann.
BTS530: Major Project Planning and Design
The Object Oriented Approach to Design
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Web Application Architectures
Starting Design: Logical Architecture and UML Package Diagrams
An Introduction to Software Architecture
Web Application Architectures
Design Yaodong Bi.
Chapter 2 Database Environment Pearson Education © 2009.
Web Application Architectures
Chapter 2 Database Environment Pearson Education © 2009.
CMPE/SE 131 Software Engineering March 7 Class Meeting
Presentation transcript:

Layered Architectures The objectives of this chapter are: To understand the principles and importance of Layered Architectures To explain the structure of application development in Java

You may have realized that Cohesion is one of the most important aspects of Object Oriented Software Development Classes have few, well defined responsibilities Each class's responsibilities should be logically related When classes are developed in this manner, the complexity of a system shifts from the classes to the communication between objects Classes are not complex How objects communicate becomes more complex so it must be managed Managing communication between objects now becomes an added responsibility for the system Understanding the communication between discrete components is defined as architecture Many design patterns specifically address these types of problems Cohesion

Unfortunately, calling oneself a "Software Architect" is a new "in" term. Many people call themselves software architects, but do not develop architectures Architectures must be defined early within the development process; however, they must remain flexible. The initial architecture is almost always wrong, if it cannot be adjusted, the project will fail. Early architectures can be regarded as "rough cuts". They aren't correct, but they drive the process forward. Most successful architectures are based upon a layered approach The Gartner 3-layer model is a good starting point Layers are logical Each layer has a defined purpose The communication between layers is well-defined Architecture

The Gartner group has identified 3 types of logic which exist within the typical business application Presentation: How is data presented to the User Application: How is data processed Data Management: How is data stored and retrieved In order to have flexibility between the layers, the layers must be loosely coupled rather than tightly coupled. The Gartner 3-layer Model -Revisited Presentation Logic Application Logic Data Management Logic

It is important to remember that each layer is logical "Presentation" is a high level layer The presentation layer can be composed of many sub-layers, each of which having a lower level of abstraction Breaking down high level layers into logical sub layers is the essence of N-Tier architecture: N-Tier Presentation Logic Application Logic Data Management Logic Gui System Log Gui Controllers Transaction Processing AuditingSecurity Data Access Input Validation User Management Persistence Management Business Rules

The previous slide shows that architectures can have high level components and low level components. Architecture is always higher level than code As one goes deeper into the architecture, one will eventually identify objects. In order for this approach to work, the communication between each layer must be defined. One must define how the communication is to occur Are the layers deployable within an Intranet? Are the layers deployable across the Internet? One must define what is to be communicated (each layer must have an interface) Which layers are coupled? What are the functional requirements of a layer? What messages are sent between layers? Communication between Layers (Tiers)

Many people remember the old days of spaghetti code Subroutine calls from everywhere, to everywhere This is a symptom of focusing ones attention at a very low level of abstraction This happens when one is focused on the code and not the design Unfortunately, it is possible to create spaghetti objects Every object communicates with every other object Coupling is too high If the domain model contains cohesive objects, coupling is likely to remain low. Hint: keep your objects cohesive If the communication between layers is defined at the high level, the coupling between layers is likely to remain low Hint: define communication between layers at a high level of abstraction Cohesion and Coupling issues

If the communication between layers is defined at the high level, the implementation should follow suit. Objects communicate through messages. There should be messages (methods) which match the high level definitions of the interface But how do we map high level messages into low level actions? Controller objects fulfil this purpose. Controller objects have a high level interface Controller objects don't actually do the work to fulfil the interface Controller objects delegate the responsibility of fulfilling a request to other objects Controllers coordinate other objects Each layer will have one or more controller objects The interface for the layer is defined by the interface implemented by the layer's controller objects. Implementing Layer Communication

Layer Example Employee Info User clicks employee name in employee list diplayEmployeeInfo(id = 5) Employee Manager > getEmployee(id = 5) EmployeeList Listener > getObject("Employee", id=5) EmployeeTable SqlGenerator generateSql(id=5) executeSQL() resultSet EmployeeBuilder buildEmployeeObject(resultSet) Table Manager > EmployeeList DBController > displayEmployee

When an application executes, objects are stored in memory When the application terminates, those objects disappear Most business entities require persistence They must be accessible upon successive executions of the application Object persistence could be implemented using object serialization Many businesses have invested large amounts of money in relational (sql) databases It is possible to put objects into a database The data within a class model is often equivalent to a 3 rd normal form data model (inheritance must be addressed) Dealing with Object Persistence

Object Persistence: Layers Application Layer Process Employee Objects Data Access Layer Map Objects to Relational DB (generate SQL) Map Relational Tables to Objects (generate SQL) Database Connectivity Layer Manage connections to database possibly connection pool getObject() storeObject() insert select update delete This layer only ever deals with Objects. NO SQL This layer maps between the object world and the relational DB world This layer manages data