Architecture of Enterprise Systems: Domain Model and Database layer

Slides:



Advertisements
Similar presentations
ICS 434 Advanced Database Systems
Advertisements

Database Systems: Design, Implementation, and Management Tenth Edition
Introduction to Databases
.NET Database Technologies: Open-Source Frameworks.
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
File Systems and Databases
Chapter 13 Physical Architecture Layer Design
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
1 PATTERNS FOR AUTOMATIC INTEGRATION OF THE DOMAIN-DATA LAYERS IN ENTERPRISE-SYSTEMS Mira Balaban Joint work with Lior Limonad Ben Gurion University Beer-Sheva,
Introduction to Databases Transparencies
The Architecture of Transaction Processing Systems
Software Architecture Patterns (2). what is architecture? (recap) o an overall blueprint/model describing the structures and properties of a "system"
Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Client/Server Software Architectures Yonglei Tao.
Data Access Patterns. Motivation Most software systems require persistent data (i.e. data that persists between program executions). In general, distributing.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
Chapter 10 Architectural Design
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Introduction. 
1 J2EE Components. 2 Application Servers relieve the programming burden for business distributed components. They provide support for system level services.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
CSC271 Database Systems Lecture # 4.
Client Server Technologies Middleware Technologies Ganesh Panchanathan Alex Verstak.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Entity Beans BMP Celsina Bignoli
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
Container-Managed Persistence (CMP) Entity Beans Lesson 3A / Slide 1 of 42J2EE Server Components Objectives In this lesson, you will learn to: Identify.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
 Chapter 6 Architecture 1. What is Architecture?  Overall Structure of system  First Stage in Design process 2.
1 Another group of Patterns Architectural Patterns.
Design Patterns: Structural Design Patterns
Information System Development Courses Figure: ISD Course Structure.
2-Tier,3-Tier datawarehouse Submitted by Manisha Dubey & Akanksha Agrawal.
Intro – Part 2 Introduction to Database Management: Ch 1 & 2.
Database Architectures Database System Architectures Considerations – Data storage: Where do the data and DBMS reside? – Processing: Where.
© 2005 Prentice Hall10-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
5 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
1 Mapping to Relational Databases Presented by Ramona Su.
Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Architectural Patterns Professor Sara Stoecklin Director of Software Engineering-
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
EJB Enterprise Java Beans JAVA Enterprise Edition
DOMAIN DRIVEN DESIGN Dave 12 May WHAT IS DDD? Set of principles to aid in building complex systems Enables us to focus on core problem domain NOT.
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
IT 5433 LM1. Learning Objectives Understand key terms in database Explain file processing systems List parts of a database environment Explain types of.
Structure of a web application
MVC and other n-tier Architectures
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Enterprise Architecture Patterns
Introduction to Databases Transparencies
Web Application Architectures
Evaluating Compuware OptimalJ as an MDA tool
Web Application Architectures
Developing and testing enterprise Java applications
Database System Concepts and Architecture
Terms: Data: Database: Database Management System: INTRODUCTION
Web Application Architectures
CMPE/SE 131 Software Engineering March 7 Class Meeting
Database management systems
Presentation transcript:

Architecture of Enterprise Systems: Domain Model and Database layer Worshop in Software Engineering Project Department of Computer Science Ben-Gurion university Workshop in SE project

Structure of layered systems: With 2 or more tiers: Presentation layer: Command line, GUI, Web, Phone Communication layer Service layer: Facade API, controllers, transactional actions Domain layer: Platform free object model Data source layer: Data mappers, DB administration, transaction managers, DB communication Database Workshop in SE project

Structure of layered systems: With 2 or more tiers: Presentation layer: Command line, GUI, Web, Phone Communication layer Service layer: Facade API, controllers, transactional actions Domain layer: Platform free object model Data source layer: Data mappers, DB administration, transaction managers, DB communication Database Benefits of layered structure – for applications with Changing requirements Expectations for long life Strong efficiency requirements on management Workshop in SE project

Structure of layered systems: Imagine: Millions of members in your Forums system, concurrently accessing the same forums; Specifications change frequently: New interactivity requirements; Changing functionalities: A group of members can post a message, owned by all; Meta-search and message organization by message topic; Member benefits: Club, points, social network; Buy-sell forums; member bills; Layer separation is essential for survival! Workshop in SE project

Domain model vs. DB layer 2 tier: Presentations on top of DB. Not appropriate for rich functionalities Data source layer: A must for handling Db access and actions. Used for data mappers – that save explicit SQL management Domain model: Platform independent Application independent “Revealed” from tests about the domain, e.g., use cases Requirements – constraints, non-functional specifications, descriptions A stable reflection of the real domain! Independent from the DB model! Workshop in SE project

Domain model vs. DB layer rich with Object aggregation Class hierarchy Interfaces Multiplicity constraints Association classes Complex values Inter-association constraints Implementation Embeds object constraints in code Adds design and implementation classes and interfaces DB: Tables of interconnected entities Integrity constraints Stored procedures Workshop in SE project

Interaction between the Domain model and the DB The Domain model cannot be a reflection of the DB  a poor domain model! Assume that we design also the Data mode (DB). What are the timing relationships? DB and then Domain Model, possibly by automatic translation? Domain model and then data model using some standard data mapping techniques? Independent design + mapping interaction Data access mappers Workshop in SE project

Problems of Domain model – DB coexistence co-existence of storage and in-memory objects Mixture – ingoing and outgoing references: Ingoing: In-memory  Persistent Availability Outgoing: Persistent  In-memory Reference preservation So let’s talk about the meaning of partial persistency… Handling linkage of persistent to non-persistent objects This mixture causes problems of ingoing/outgoing references. Ingoing complication exposes the problem of availability: whenever an in-memory Object is the client of an in-memory one, we want to make sure that the persistent Object is available whenever it is required by the in-memory one. Outgoing complication exposes the problem of reference preservation: whenever a persistent Object is store, how to make sure it is reconnected to an assosiated in-memory object When it is reloaded. Not loosing in-memory objects. For example: In the picture: Element1 & Elements3 are stored objects.

Problems of Domain model – DB coexistence Duplication handling: Consistency– Inter-layer – Duplication of objects (Identity maps handling) Duplicated references Intra-layer – preventing duplication of objects So let’s talk about the meaning of partial persistency… Handling linkage of persistent to non-persistent objects This mixture causes problems of ingoing/outgoing references. Ingoing complication exposes the problem of availability: whenever an in-memory Object is the client of an in-memory one, we want to make sure that the persistent Object is available whenever it is required by the in-memory one. Outgoing complication exposes the problem of reference preservation: whenever a persistent Object is store, how to make sure it is reconnected to an assosiated in-memory object When it is reloaded. Not loosing in-memory objects. For example: In the picture: Element1 & Elements3 are stored objects.

Current Technologies – e.g., J2EE / Hibernate Support: Mapping: may be generated automatically Intra-layer Consistency Availability – handled by the environment EJB container Workshop in SE project

Current Technologies – e.g., J2EE / Hibernate Necessary manual work: Modification of persistent classes Adhering to standards (e.g. EntityBean interface) Mixture handling Handle ingoing and outgoing references e.g. serialization Interlayer consistency Object consistency Manual invocation of, e.g., session.save(obj), session.load(class,id), ejbLoad() / ejbStore() / ejbCreate() / db.bind(…) / db.deletePersistent(…) Reference consistency e.g. between two stored objects Workshop in SE project

Example: Application Development Process Example: an e-Mail client system Workshop in SE project

Fowler’s Active Record Pattern Problems: Partial persistency Preserving references between objects Preservation of object availability DB services imposed on the persistent class Workshop in SE project

Fowler’s Data Mapper pattern Problems: Partial persistency Preserving references between objects Preservation of object availability DB services imposed on the data mappers Workshop in SE project

Proxy Data Mapper Pattern Application precondition: message has a factory method Automatic application: Extract subclass “MessageImp” Move implementation: Message  MessageImp Add a MessageDataMapper Add a MessageProxy Turn Message to be abstract Redirect the factory method

Transactional activities Can be in-memory No explicit handling of transactions Can be in the service layer Brings to memory all necessary stored objects Stores at the end Persistence is transparent to domain layer Risk: Messy service layer, thin domain model Workshop in SE project