March 200592.3913 R McFadyen1 Object Relational Mapping example TopLink Part of Oracle environment Provides an Object/Relational Mapping Layer References:

Slides:



Advertisements
Similar presentations
Copyright ©2010 Oracle Corporation Made available under Creative Commons Attribution-Share Alike 3.0 Unported EclipseLink Runtime Architecture Data Source.
Advertisements

3 Copyright © 2005, Oracle. All rights reserved. Designing J2EE Applications.
Objectives In this session, you will learn to:
March Ron McFadyen1 Command The command pattern encapsulates a request or unit of work into an object. An invoker will ask a concrete command.
IS6112 Application Modelling and Design Introduction.
Spring 2010ACS-3913 Ron McFadyen1 Command The complex remote control (many pairs of buttons; null command) Undo … pages 216+ Macro … pages 224+
1 Introduction The Database Environment. 2 Web Links Google General Database Search Database News Access Forums Google Database Books O’Reilly Books Oracle.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
February Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Pronunciation: -"fi-z&m.
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 17 Client-Server Processing, Parallel Database Processing,
CSE 190: Internet E-Commerce
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.
Fall 2009ACS-3913 Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Date: 1753 an interpretation.
Client-Server Processing and Distributed Databases
Session-01. Hibernate Framework ? Why we use Hibernate ?
Client/Server Computing. Information processing is distributed among several workstations and servers on a network, with each function being assigned.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Data Access Patterns. Motivation Most software systems require persistent data (i.e. data that persists between program executions). In general, distributing.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
Design I: Web Application Architecture and Patterns Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September.
Chapter 13 Starting Design: Logical Architecture and UML Package Diagrams.
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.
Fall CIS 764 Database Systems Design L18.1 Miscellaneous Notes.
CS 160: Software Engineering October 8 Class Meeting
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
Case study concerning architecture development Emil Doychev, Georgi Cholakov, University of.
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.
M1G Introduction to Database Development 6. Building Applications.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
SE-02 COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require.
Hibernate Persistence. What is Persistence Persist data to database or other storage.  In OO world, persistence means persist object to external storage.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
OOPSLA 2001 Choosing Transaction Models for Enterprise Applications Jim Tyhurst, Ph.D. Tyhurst Technology Group LLC.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Data Access with Spring.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
The Business of IT ® Austin Code Camp ‘08 Prescriptive Data Access Development in.NET 3.5 Austin, TX May 17, 2008 Brian Orrell.
Architecture Overview Server Database (can be on the server or separate ) Client1 Client2 Client3 HTTP  View ppt notes pages for discussion!
Unit of Work Edmonton Code Camp Oct 2007 Presenter: Neil Bourgeois.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Object Relational Mapping example
Structure of a web application
The Client/Server Database Environment
Pragmatic Event-Driven Microservices
Hibernate Bayu Priyambadha, S.Kom.
Introduction to Databases Transparencies
Tiers vs. Layers.
Topics Covered in COSC 6340 Data models (ER, Relational, XML)
Starting Design: Logical Architecture and UML Package Diagrams
.NET vs. J2EE Architecture
Presented by: Francisco Martin-Recuerda
Understanding and Designing with EJB
School of Computer Science
COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding.
Enterprise Java Beans.
UFCEUS-20-2 Web Programming
Presentation transcript:

March R McFadyen1 Object Relational Mapping example TopLink Part of Oracle environment Provides an Object/Relational Mapping Layer References: pages from: Oracle Toplink Unit of Work Primer Patterns of enterprise application architecture 2003 Martin Fowler Addison-Wesley

March R McFadyen2 Patterns of enterprise application architecture A book on enterprise application design Layering Domain/business logic Web user interface Object to relational mapping Session state in a stateless environment Distribution

March R McFadyen3 Patterns of enterprise application architecture - Architecture Two common elements to architecture: Highest-level breakdown of a system into its parts Decisions that are hard to change page 2: “The architectural pattern I like the most is that of layers” “Most nontrivial enterprise applications use a layered architecture of some form”

March R McFadyen4 Patterns of enterprise application architecture Unit of Work Pattern Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems Mentions 3 variations: caller registration, object registration, unit or work controller (e.g. Toplink)

March R McFadyen5 Unit of Work Pattern unit of work controller variation: UoW makes a copy (clone) Application works on the copy UoW compares object and clone at commit time and issues necessary SQL to database …

March R McFadyen6 Based on Primer pages 7, 8 Code shows how a Java program collaborates with Toplink to ensure a new object persists in the relational database The application gets a Unit of Work. Application creates a new Pet object, but the application works on a clone. At commit time, Toplink issues the necessary SQL based on difference between clones and originals. UnitOfWork uow = session.acquireUnitOfWork(); Pet pet new Pet(); Pet petClone = (Pet)uow.registerObject(pet); petClone.setId(100); petClone.setName(“Fluffy”): petClone.setType(“Cat”); uow.commit(); At commit time Toplink sends the following to the database Insert into Pet (ID, Name, Type, Pet_Own_Id) Values (100, ‘Fluffy’,’Cat’, Null)

March R McFadyen7 Based on Primer pages 7, 8 :Client pet:Pet :session :UnitOfWork petClone:Pet setID(100) setName(Fluffy) setType(Cat) acquireUnitOfWork() new() registerObject(pet) petClone new() commit() At commit time, the UnitOfWork submits the SQL statement: Insert into Pet (ID, Name, Type, Pet_Own_Id) Values (100, ‘Fluffy’,’Cat’, Null) new()