Peter Hinrichsen TechInsite Pty Ltd www.techinsite.com.au Rolling your own Object Persistence Framework (OPF) Please consider the following questions:

Slides:



Advertisements
Similar presentations
Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Advertisements

Lecture plan Information retrieval (from week 11)
Chapters 14 & 15 Internet Databases. E-Commerce  Bringing new products, services, or ideas to market, supporting and enhancing business operations 
Objectives In this session, you will learn to:
Building Applications using ASP.NET and C# / Session 1 / 1 of 21 Session 1.
Network Management Overview IACT 918 July 2004 Gene Awyzio SITACS University of Wollongong.
Database Systems Presented by Rubi Boim 1.  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on.
CSLA Presenter Sergey Barskiy, senior consultant at Magenic Technologies your questions Send an in order.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
DATABASE APPLICATION DEVELOPMENT SAK 3408 The Web and DBMS.
Chapter 9: The Client/Server Database Environment
Firefox 2 Feature Proposal: Remote User Profiles TeamOne August 3, 2007 TeamOne August 3, 2007.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Chapter 14 Database Connectivity and Web Technologies
12-1 © Prentice Hall, 2004 Chapter 12: Design Elements Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
The Client/Server Database Environment
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.
Web Content Management Systems. Lecture Contents Web Content Management Systems Non-technical users manage content Workflow management system Different.
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
Tim Leung SQL Bits October  Features and Advantages  Architecture  Installation  Creating Reports.
SDPL 2001Notes 7: XML Web Sites1 7 XML Web-Site Architectures n How (and why) to apply XML techniques in the implementation of Web sites? 7.1 XML, Databases,
Database Architecture Introduction to Databases. The Nature of Data Un-structured Semi-structured Structured.
Enticy GROUP THE A Framework for Web and WinForms (Client-Server) Applications “Enterprise Software Architecture”
HTML+JavaScript M2M Applications Viewbiquity Public hybrid cloud platform for automating and visualizing everything.
COLD FUSION Deepak Sethi. What is it…. Cold fusion is a complete web application server mainly used for developing e-business applications. It allows.
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.
2. Database System Concepts and Architecture
Fundamentals of Database Chapter 7 Database Technologies.
M1G Introduction to Database Development 6. Building Applications.
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
 Chapter 6 Architecture 1. What is Architecture?  Overall Structure of system  First Stage in Design process 2.
National Center for Supercomputing Applications NCSA OPIE Presentation November 2000.
Unit – I CLIENT / SERVER ARCHITECTURE. Unit Structure  Evolution of Client/Server Architecture  Client/Server Model  Characteristics of Client/Server.
SQL Server User Group Meeting Reporting Services Tips & Tricks Presented by Jason Buck of Custom Business Solutions.
Universal Data Access and OLE DB. Customer Requirements for Data Access Technologies High-Performance access to data Reliability Vendor Commitment Broad.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
DEV-05: Ratcheting up your OpenEdge™ Development Productivity Sunil S Belgaonkar Principal Software Engineer.
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
1 Welcome to CSC 301 Web Programming Charles Frank.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
Developing Applications with the CSI Framework A General Guide.
© 2013, published by Flat World Knowledge Chapter 10 Understanding Software: A Primer for Managers 10-1.
WEB SERVER SOFTWARE FEATURE SETS
Object storage and object interoperability
Chapter 9  Definition of terms  List advantages of client/server architecture  Explain three application components:
Navigation Framework using CF Architecture for a Client-Server Application using the open standards of the Web presented by Kedar Desai Differential Technologies,
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
Generating XML Data from a Database Eugenia Fernandez IUPUI.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
The Holmes Platform and Applications
The Client/Server Database Environment
Software Design and Architecture
The Client/Server Database Environment
Created by Kamila zhakupova
The Client/Server Database Environment
Chapter 9: The Client/Server Database Environment
Web Engineering.
Microsoft Office Illustrated
Chapter 16 Designing Distributed and Internet Systems
Design and Maintenance of Web Applications in J2EE
Introduction to Databases Transparencies
Tiers vs. Layers.
Brian Kotek INDUS Corporation
Presentation transcript:

Peter Hinrichsen TechInsite Pty Ltd Rolling your own Object Persistence Framework (OPF) Please consider the following questions: What do you expect from an OPF? What do you expect from this tutorial?

Tutorial Topics n Part 1: What is an OPF? What can an OPF do for me? n Part 2: The core principles of the tiOPF. n Part 3: A worked example of using the tiOPF

What is an OPF? n What is an OPF? What do you expect from an OPF? n Demo of an OPF application. n Why build an OPF. RAD vs OPF. n Ambler, Jedi-Obiwan and my design requirements of an OPF. n Architecture of the tiOPF

What do you expect from an OPF? n How long have you used Delphi? n What do you build with Delphi? n How to you currently build your apps? n What is an OPF? What do you expect from an OPF? n 1. n 2.

What is an OPF? n What is an OPF? What do you expect from an OPF? n Demo of an OPF application. n Why build an OPF. RAD vs OPF. n Ambler, Jedi-Obiwan and my design requirements of an OPF. n Architecture of the tiOPF

Demonstration - the address book application

What is an OPF? n What is an OPF? What do you expect from an OPF? n Demo of an OPF application. n Why build an OPF. RAD vs OPF. n Ambler, Jedi-Obiwan and my design requirements of an OPF. n Architecture of the tiOPF

Definitions: RAD and OPF n RAD: TDataModule, TQuery, TDatabase, TClientDataSet and data aware controls. OPF: Custom persistence layer, custom business objects and custom edit controls 

Advantages of RAD & Data Aware Controls 4Good for prototypes. 4Good for simple, single tier apps. 4Good for seldom used forms, like one-off setup screens that may be used to populate a new database with background data. 4Plenty of third party controls available.  Can re-configure themselves as the database schema changes (sometimes) 

Disadvantages of RAD & Data Aware Controls 6Higher maintenance and debugging costs. 6Higher network traffic. 6Can not be used to edit custom file formats, registry entries or data that is not contained in a TDataSet. 6Harder to develop data aware controls than regular controls. 6Hard to use when the DB does not map directly into the GUI ie, a well normalised database.  Difficult to make extensive reuse of code 

When do I use RAD and data aware controls? 4Low end customers (small businesses with few user). 4Throw away prototypes. 4Data maintenance apps that my customers will not see. 4Systems where I have total control over the database design.  When the user wants the app to look and perform as if it were written in VB 

Advantages of an OPF 4Good for complex applications. 4Lower network traffic. 4When the database is storing non text data like multi- media, or perhaps scientific data which must be manipulated with complex algorithms. 4Decouple GUI from database - multiple databases  Lower total cost of ownership 

Disadvantages of an OPF 6More skilled development team. 6Higher up front development cost. 6Many reporting tools take input from a TDataSet. Some extra code would be needed to connect the persistence framework to the reporting tool.  Must re-build what comes out of the box with Delphi 

When do I use an OPF? 4High end (corporate) customers with many users where performance is important. 4Systems that have complex data models that I have little control over. 4Systems that require a TreeView, ListView look and feel.  Systems that must be database vendor independent 

What is an OPF? n What is an OPF? What do you expect from an OPF? n Demo of an OPF application. n Why build an OPF. RAD vs OPF. n Ambler, Jedi-Obiwan and my design requirements of an OPF. n Architecture of the tiOPF

Ambler, Obiwan & PWH’s requirements of an OPF #1 n Who or what are Ambler & Obiwan? n Object Persistence – Storage and retrieval of object data & object relationships n Multiple architectures – Single-tier, two-tier (client-server), multi-tier & internet enabled n Object Identity - All objects must be uniquely identified n Proxies or primary key objects – For performance optimisation and human navigation

Ambler, Obiwan & PWH’s requirements of an OPF #2 n Data as objects, or TDataSet – For use with reporting tools n Layering of application - Separation of Business Logic and User Interface n Several types of persistence mechanism – SQL databases, flat files, XML, legacy systems. n Various database versions and/or vendors.

Ambler, Obiwan & PWH’s requirements of an OPF #3 n Generic or native database drivers – Generic (ODBC, BDE, ADO) or native (DOA, IBX, MSDOM) n Multiple connections - Multiple connections to multiple databases in a thread safe way. n Transactions – Database transactions, and object – database transaction relationships Auto generated SQL and DBA optimised SQL 

What is an OPF? n What is an OPF? What do you expect from an OPF? n Demo of an OPF application. n Why build an OPF. RAD vs OPF. n Ambler, Jedi-Obiwan and my design requirements of an OPF. n Architecture of the tiOPF

Three layer architecture of the tiOPF n 1. Business objects layer: Manipulate data in the application as objects. Based on GoF’s Composite Pattern. n 2. Persistence layer: Persist objects to a variety of data stores including SQL-RDBMSs, XML, CSV. Based on GoF’s Visitor, Template Method and Adaptor Patterns. 3. Presentation layer: Provide a family of controls to simplify user interaction with the BOM 

The tiOPF can be configured in 5 ways n Single-tier, single user, files based application n Two-tier, client server application n Multi-tier, internet enabled application n HTML / browser based application System to system data pump application (We will look at three of these) 

Two-tier, client-server application Presentation Win32 Application PerMgr Mapps BOM to persistence plugin BOM Persistent Store (Database) PerPlugin Saves data to choosen database

Multi-tier, Internet enabled application PerMgr Mapps BOM to persistence plugin Win32 ApplicationServer app BOM PerMgr Mapps BOM to persistence plugin Presentation Persistent Store (Database) PerPlugin Saves data to choosen database PerPlugin Saves data using XML over HTTP

HTML, Browser based application Persistent Store (Database) Framework to map BOM into HTML or XML & XSL Presentation Web server Presentation Browser PerMgr Mapps BOM to persistence plugin PerPlugin Saves data to choosen database BOM

System to system, data pump application Win32 Application PerMgr Mapps BOM to persistence plugin BOM PerMgr Mapps BOM to persistence plugin Persistent Store ‘B’ (Database) PerPlugin Saves data to choosen database PerPlugin Saves data to choosen database Persistent Store ‘A’ (Database)

Steps to understanding this architecture n To achieve this architecture, we require: n An abstract business object model n A way of traversing the model n A swappable database connection layer n Some GUI controls to make building the presentation layer easier These will be developed in the next part: The core principles of the tiOPF 

Tutorial Topics n Part 1: What is an OPF? What can an OPF do for me? n Part 2: The core principles of the tiOPF. n Part 3: A worked example of using the tiOPF

A walk through of the framework source n Where to download: n How to install: n Directory structure Applications - In tiPerFramework project group 

A walk through the documentation n What is an OPF (chapter 1) n The Visitor pattern framework (chapter 2) n The Visitor and SQL databases (chapter 3) n Building an abstract BOM (chapter 4) n Installing the tiOPF (chapter 5) n A worked example (chapter 6) The Adaptor pattern and database independence (chapter 7) And now, a detailed look at chapter 2 

The core principles of the tiOPF Aim: To come up with a generic way of performing a family of related tasks on some objects in a list. The task we perform may be different depending on the internal state of each object. We may not perform any tasks at all, or we may perform multiple tasks on multiple list objects. (The Visitor Pattern framework) 

Tutorial Topics n Part 1: What is an OPF? What can an OPF do for me? n Part 2: The core principles of the tiOPF. n Part 3: A worked example of using the tiOPF

A worked example of using the tiOPF n Demonstration...

Source code on the web n The source from this presentation, and the latest version of the documentation n can be found at: n Peter Hinrichsen TechInsite Pty Ltd