Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6

Similar documents
Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Adobe ColdFusion level 1 course content (3-day)

1 Software Architecture

Application Architectures, Design Patterns

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns

COURSE 9 DESIGN PATTERNS

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Java EE Patterns 176

Appendix A - Glossary(of OO software term s)

********************************************************************

DESIGN PATTERN - INTERVIEW QUESTIONS

Java Enterprise Edition

The Strategy Pattern Design Principle: Design Principle: Design Principle:

"Charting the Course... Agile Database Design Techniques Course Summary

Work groups meeting 3

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

Object Oriented Paradigm

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8

CS342: Software Design. November 21, 2017

Web Presentation Patterns (controller) SWEN-343 From Fowler, Patterns of Enterprise Application Architecture

The Design Patterns Matrix From Analysis to Implementation

Introduction to Software Engineering: Object Design I Reuse & Patterns

Spring Persistence. with Hibernate PAUL TEPPER FISHER BRIAN D. MURPHY

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST III

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns

Work groups meeting 3

An Introduction to Patterns

J2EE AntiPatterns. Bill Dudney. Object Systems Group Copyright 2003, Object Systems Group

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

Object Persistence Design Guidelines

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master

STARCOUNTER. Technical Overview

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader...

Design Patterns Reid Holmes

Object-Oriented Design

Topics in Object-Oriented Design Patterns

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

CASE TOOLS LAB VIVA QUESTION

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

Modeling Process. Rich Hickey

Java EE Architecture, Part Two. Java EE architecture, part two 1

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

Java J Course Outline

Patterns Of Enterprise Application Architecture

A Reconnaissance on Design Patterns

An Introduction to Software Architecture. David Garlan & Mary Shaw 94

Java EE Patterns. Student Guide - Volume 1. SL-500 Rev C.0.1. D61856GC10 Edition 1.0 D62465

Software Design COSC 4353/6353 D R. R A J S I N G H

Inheritance STL. Entity Component Systems. Scene Graphs. Event Systems

Table of Contents. Introduction... xxi

COURSE 2 DESIGN PATTERNS

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Microsoft Dynamics Road To Repeatability Technical Deep Dive Server Extensibility in Microsoft Dynamics NAV. Vjekoslav Babić, MVP

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

Advanced WCF 4.0 .NET. Web Services. Contents for.net Professionals. Learn new and stay updated. Design Patterns, OOPS Principles, WCF, WPF, MVC &LINQ

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software

A domain model-centric approach to J2EE development. Keiron McCammon CTO Versant Corporation

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

Java SE7 Fundamentals

Lightweight J2EE Framework

DOT NET Syllabus (6 Months)

Design Patterns. SE3A04 Tutorial. Jason Jaskolka

CAS 703 Software Design

Development of E-Institute Management System Based on Integrated SSH Framework

Hippo Software BPMN and UML Training

Object oriented programming. Encapsulation. Polymorphism. Inheritance OOP

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool

/ / JAVA TRAINING

PATTERN-ORIENTED SOFTWARE ARCHITECTURE

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

Component-Based Software Engineering. ECE493-Topic 5 Winter Lecture 26 Java Enterprise (Part D)

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

INTRODUCTION TO.NET. Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.)

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

SOFTWARE ENGINEERING SOFTWARE DESIGN. Saulius Ragaišis.

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p.

Database Management

"Web Age Speaks!" Webinar Series

Basic Properties of Styles

Design Patterns. Gunnar Gotshalks A4-1

I, J. Key-value observing (KVO), Label component, 32 text property, 39

"Charting the Course... MOC A Developing Data Access Solutions with Microsoft Visual Studio Course Summary

Design Patterns. An introduction

CHAPTER 9 DESIGN ENGINEERING. Overview

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Course Introduction & Foundational Concepts

Summary of the course lectures

Towards a Theory of Genericity Based on Government and Binding

04 Webservices. Web APIs REST Coulouris. Roy Fielding, Aphrodite, chp.9. Chp 5/6

Improve SSIS Delivery with a Patterns-Based Approach. Meagan Longoria July 19, 2017

Using Design Patterns in Java Application Development

Review Software Engineering October, 7, Adrian Iftene

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Developing Data Access Solutions with Microsoft Visual Studio 2010

Java Training For Six Weeks

Transcription:

Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6 Some Terms: Architecture the manner in which the components of a computer or computer system are organized and integrated (Webster) OOP Object Oriented Programming: representing the parts of an application as Objects that interact with each other. Objects typically represent real world entities. OOP languages typically support Classes, Objects, Messages, Inheritance, and Polymorphism. UML Unified Modeling Language: an industry standard vocabulary for defining software structure. There are many types of UML diagrams: use case, class, collaboration, sequence, activity, deployment, and more. Design Pattern A recurring solution to a recurring problem Anti-Pattern Recurring mistake made in software designs Aspect Oriented Programming (AOP) Software components represent crosscutting concerns which are then woven it is the next generation school of thought for software development. Notes on Terms:

Some Topics: An application has many tiers. Typical tiers are: Client-side presentation - presents UI to user Server-side presentation feeds data to client-side presentation tier Server-side Business Logic perform actions Server-side domain model the entities Integration Tier talks to other systems Why Patterns? Design patterns define ways to represent components in a system. Breaking a component into several smaller components, which are broken into several smaller components, etc. becoming more specialized as they become smaller. This allows changes in one component to not effect other components and allows components to be reused more easily. This is commonly known as encapsulation and loose coupling. What makes an application a good one? There are four categories by which we measure success as developers: Scalability how well does an application perform as load (requests) is increased? Reliability does the application behave as expected all of the time? Extensibility - how easily are changes accommodated? Timeliness is the application delivered in a reasonable amount of time? OOP and patterns helps with all of these things largely by use of centralized, decoupled, reusable functionality and components. What entities do we commonly have to consider? CFM pages Custom Tags CFCs Database File System RIA Interfaces External Applications Other technologies Additional Notes:

Design Patterns There are thousands of design patterns and dozens of ways to categorize them all. Common general categories are Presentation Tier, Business Tier, Messaging, and Anti-Patterns. I like to also categorize them as: Factory, Delegate, Hub, Façade, Filter, and Controller because many patterns are based on these concepts. Always remember: there are many patterns that solve a problem which is best depends on requirements and how you define success. Also remember that not all patterns are applicable (relevant) in CFML development, though the majority are. Pattern Purpose Description Separate presentation tier into separate components Model-View- Controller (MVC) Front Controller Decorator Composite Entity A single central component performs common functions Allows functionality to be dynamically added to a Front Controller. Efficiently represent Domain Model Entities by aggregating data Controller receives and processes user input, updates Model, and selects view. View presents UI and uses Model data. Model stores data and performs business logic. Front controller receives all requests and performs common functions like logging, passes data to page (request) controller which talks with Model. Page controller then selects a View. Decorator object is a configurable filter that intercepts requests and hands control and data (including a chain definition) to first decorator. That decorator hands control to next decorator in the chain, etc. Model is broken into many small objects in the back, aggregated data is

Domain Object Model Data Transfer Objects (DTO) Data Transfer Hash Row Set DTO Data Access Object (DAO) DAO Factory isdirty from many smaller objects. Use objects to represent the business logic/application concepts Improve performance by reducing the number of objects passed between application tiers Improve performance by reducing the number of objects passed between application tiers Improve performance by returning recordset data to the presentation tier. Separate persistence from code that processes data Hide DAO creation/selection from presentation/business tiers. Prevent unnecessary writing to the database presented to the View. Objects in Model are connected to each other in ways that represent business relationships. Smaller data container objects are passed from the business tier to the view. Structures (Hash variables) are passed from the business tier to the view Queries are returned directly to the presentation tier for use rather than returning Objects. Business object or Presentation tier Object has a DAO that it uses to access and update data. DAO talks with persistence layer via other data objects. Business or presentation tier object requests a DAO from a factory. Factory decides how to create the DAO DAO tracks whether or not data has changed and when passed to Model, the Model determines whether or not to write to the

Lazy Load Procedure Access Object (PAO) Service to Worker (Dispatcher) Composite View View Helper Avoid unnecessary database access Leverage Stored Procedures Decouple navigation from Front Controller Build a view from several sub-views Avoid over specialized views database. Client requests data from object, object calls DAO methods just to get that data no extra data ever returned. Properties are set on the PAO, execute() method then passes those properties to a stored procedure which then sends new values back (if appropriate) to the PAO Front Controller gets request, performs common functions, then passes request to dispatcher object. Dispatcher determines what actions to perform and uses it s internal Model for persistence and logic. Dispatcher chooses view and uses it s Model to populate it. Dispatcher builds structure of leaf views then forwards request to a composite view which replaces generic leaf view names with actual views. View uses view helper objects to translate Model data into more usable data model. Either view or helper transforms that data into

Asynchronous Page Caching Filter Resource pool Serializable Entity Table Inheritance Tuple Table Business Delegate Cache remote data efficiently Minimize page generation Decrease repetition of object instantiations Persist objects to database Offer simple mapping between database and objects Store objects in a database so that they re readable and extensible Encapsulate how to locate, connect to, and interact with business objects in the presentation tier something useful (HTML, XML, etc. Subscriber object retrieves data from publisher when it s changed or at intervals. Subscriber transfers that data to the Model. View reads from the Model Cache filter intercepts requests and determines whether or not to return a cached version. All objects requested from a pool. New instance is created and returned if necessary, otherwise an available object is returned (and locked until released). Data passed to a DAO the DAO serializes the object data as binary stream and stores it in the database Every object has a corresponding database table. Tuple table DAO stores data properties as name/vale pairs in database one row per pair. Methods of business delegate are called delegate locates and connects with

Business Delegate Factory Service Adaptor Session Facade ACID Transaction Lockable Object Lock Manager Simplify use of business delegates Simplify working with foreign data formats Increase performance by presenting remote business objects in an optimal way Perform actions on resources while ensuring they stay in proper state Implement simple locking in shared resource Create central point for managing locks appropriate service. Business delegate manipulates return values and returns them to the client Factory controls what business delegate handles request creates new ones as needed. Service adaptor connects with remote resources and formats return data in easy to use native format. Request goes to the remote façade, façade works with local objects and returns data All business and data access logic routes through transaction manager it is a gateway to persistence that ensures permanent data changes are Atomic (single action), Consistent (with business rules), Isolated (don t interfere), and Durable (committed) Before any data modification can occur, object s lock() method is called. Lock is released when actions complete. DAO and delegates request a lock on a resource from a manager.

Version Number Content Aggregator Provide simple way to track when an object changes Allow single handler to process data that is similar but in a variety of formats Manager accepts a primary key and/or identifier. Objects have a version number which is incremented when properties change. Other objects use this to deal with concurrency Content aggregator receives data in any one of a number of formats and formats it one way before passing it along. Excessive Layering Leak Collection Overstuffed Scopes Magic Template Everything is a CFC Anti-Patterns Unnecessary layers make application inefficient. Objects, locks, and other resources aren t properly released Objects with too short or too long life spans are stored in the wrong memory scope CFM or Custom Tag does all the work of Model, View, and Controller CFCs are great and everything but too many of them is overkill Notes on Patterns and Anti-Patterns: