Design Patterns. Design patterns are known solutions for common problems. Design patterns give us a system of names and ideas for common problems.

Similar documents
Patterns in. Lecture 2 GoF Design Patterns Creational. Sharif University of Technology. Department of Computer Engineering

JEE Web Applications Jeff Zhuk

Web Container Components Servlet JSP Tag Libraries

REST Client Pattern. [Draft] Bhim P. Upadhyaya ABSTRACT

ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OBJECTS IN WEB APPLICATION

SOACertifiedProfessional.Braindumps.S90-03A.v by.JANET.100q. Exam Code: S90-03A. Exam Name: SOA Design & Architecture

SOA Success is Not a Matter of Luck

Create a single 360 view of data Red Hat JBoss Data Virtualization consolidates master and transactional data

ebay : How is it a hit

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

SOA REFERENCE ARCHITECTURE: WEB TIER

Customer Bank Account Management System Technical Specification Document

SOA Fundamentals For Java Developers. Alexander Ulanov, System Architect Odessa, 30 September 2008

Cloud computing in the Enterprise: An Overview

Service Oriented Architecture 1 COMPILED BY BJ

Enterprise Application Designs In Relation to ERP and SOA

Service-Orientation and Next Generation SOA

enterprise^ IBM WebSphere Application Server v7.0 Security "publishing Secure your WebSphere applications with Java EE and JAAS security standards

Sentinet for BizTalk Server SENTINET

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

zen Platform technical white paper

Java DB2 Developers Performance Best Practices

JBS-102: Jboss Application Server Administration. Course Length: 4 days

OPENIAM ACCESS MANAGER. Web Access Management made Easy

Complementing Your Web Services Strategy with Verastream Host Integrator

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Software Architecture Document

GenericServ, a Generic Server for Web Application Development

SAAS. Best practices for SAAS implementation using an Open Source Portal (JBoss)

Service-Oriented Architectures

David Pilling Director of Applications and Development

Excerpts from Chapter 4, Architectural Modeling -- UML for Mere Mortals by Eric J. Naiburg and Robert A. Maksimchuk

Technical Track Session Service-Oriented Architecture

Service-Oriented Architecture and Software Engineering

SOA-14: Continuous Integration in SOA Projects Andreas Gies

Federal Enterprise Architecture and Service-Oriented Architecture

Eclipse Open Healthcare Framework

Developing Applications for SSO

ARCHITECTURAL DESIGN OF MODERN WEB APPLICATIONS

ActiveVOS Server Architecture. March 2009

Communiqué 4. Standardized Global Content Management. Designed for World s Leading Enterprises. Industry Leading Products & Platform

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Cross-domain Identity Management System for Cloud Environment

White paper. Planning for SaaS Integration

Java EE Web Development Course Program

Agentry SAP Framework. SAP Mobile Platform 3.0

Enterprise Identity Management Reference Architecture

Oracle Platform Security Services & Authorization Policy Manager. Vinay Shukla July 2010

The Service, The Cloud & The Method: The Connection Points

Developing New ATM Network Management Systems with External Partners A White Paper

Enterprise Application Development In Java with AJAX and ORM

HAWAII TECH TALK SDN. Paul Deakin Field Systems Engineer

Oracle Identity Management Concepts and Architecture. An Oracle White Paper December 2003

e-gateway SOLUTION OVERVIEW Financials HCM ERP e-gateway Web Applications Mobile Devices SharePoint Portal

How To Understand A Services-Oriented Architecture

Chapter 3 Chapter 3 Service-Oriented Computing and SOA Lecture Note

Enterprise Digital Identity Architecture Roadmap

Core J2EE Patterns, Frameworks and Micro Architectures

IT Exam Training online / Bootcamp

JOURNAL OF OBJECT TECHNOLOGY

IDEALX Management Console. > Goals & motivations > IMC for sysadmins > IMC for developers > Roadmap & community

Service Governance and Virtualization For SOA

Stock Trader System. Architecture Description

The Role of Cisco SONA in Enterprise Architecture Frameworks and Strategies

Teaching Object-Oriented Software Design within the Context of Software Frameworks

Guiding Principles for Modeling and Designing Reusable Services

Network Virtualization Solutions - A Practical Solution

An Open Policy Framework for Cross-vendor Integrated Governance

CONDIS. IT Service Management and CMDB

BPM for Quality Assurance Systems in Higher Education. Vicente Cerverón-Lleó, Juan Cabotà-Soro, Francisco Grimaldo-Moreno, Ricardo Ferrís-Castell

IBM Information Management

How To Protect Your Computer From Being Hacked On A J2Ee Application (J2Ee) On A Pc Or Macbook Or Macintosh (Jvee) On An Ipo (J 2Ee) (Jpe) On Pc Or

Glassfish, JAVA EE, Servlets, JSP, EJB

A Quick Introduction to SOA

Integration of SAP central user administration with Microsoft Active Directory

Sentinet for BizTalk Server SENTINET 3.1

A Distributed Approach to Business Intelligence Systems Synchronization

IBM Tivoli Directory Integrator

BEA AquaLogic Integrator Agile integration for the Enterprise Build, Connect, Re-use

Enterprise Service Bus Defined. Wikipedia says (07/19/06)

.NET and J2EE Intro to Software Engineering

The Use of Service Oriented Architecture (SOA) for Back Office

Government Service Bus

Liferay Enterprise ecommerce. Adding ecommerce functionality to Liferay Reading Time: 10 minutes

Service Oriented Architectures

2 (18) - SOFTWARE ARCHITECTURE Service Oriented Architecture - Sven Arne Andreasson - Computer Science and Engineering.

MANAGEMENT AND ORCHESTRATION WORKFLOW AUTOMATION FOR VBLOCK INFRASTRUCTURE PLATFORMS

Prof. Dr. Lutz Heuser SAP Research

Oracle Data Integrator 11g New Features & OBIEE Integration. Presented by: Arun K. Chaturvedi Business Intelligence Consultant/Architect

Distributed systems. Distributed Systems Architectures

Data Grids. Lidan Wang April 5, 2007

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

Transcription:

Design Patterns Design patterns are known solutions for common problems. Design patterns give us a system of names and ideas for common problems. What are the major description parts?

Design Patterns Descriptions Design Patterns consist of the following parts: - Problem Statement - Solution - Impact ------------------------------------------------------- There are several Levels and Types of the Design Patterns. What Levels and Types do you know?

Design Patterns Levels and Types There are different types and levels of design patterns. For example, the MVC is the architectural level of design pattern while the rest of the patterns from the list above are component level design patterns. The basic types are Behavior, Creational, Structural, and System design patterns. Names are extremely important in design patterns; they should be clear and descriptive. More types: Enterprise and SOA Design Patterns Christopher Alexander The first book on Design Patterns Classics: "Design Patterns: Elements of Reusable Object- Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (GOF) Among other good books: Integration-Ready Architecture and Design or Software and Knowledge Engineering

Here is an example of creating a new Design Pattern What: Application development or even modification require longer and longer projects Why: Growing applications become more complex and rigid; too firm and inflexible in spite of the name Software Special efforts are needed

Industry Lessons Learned Design Patterns Business-Driven Architecture How can technology be designed to remain in alignment with changing business goals and requirements? Technology Technology Good Alignment Business Business Bad Alignment Duplications Code branches Maintenance Cost

Business-Driven Solution Architecture Business and architecture analysis is conducted as collaborative efforts on a regular basis Impact To keep technology in alignment with the business that is changing over time, it will require a commitment in time and cost to govern

Design Pattern - MVC Controller MVC (Model View Controller) is well known pattern Name MVC Model Problem Complex object involves user interface and data. Need to simplify structure View Solution Data in one part (Model), user View in another part (View), interaction logic in a third part (Controller) Model maintains state. Notifies view of changes in state. Controller uses state information (in Model?) and user request to determine how to handle request, tells view what to display View must correctly display the state of the Model Consequences Allows "plug in" modules eg. swap out Model to allow different ways of holding data Requires separate engineering of the three parts, communication between them through interfaces

Factory Method Problem Need to create a family of similar but different type objects that are used in standard ways. Solution Creator class has a "getter" method which instantiate the correct subclass, i.e. ConcreteProduct, Subclass is used through generic interface, i.e. Product Impact Extra time for analysis and modeling

Factory Method & Servlet Best Practices New services can be added run time as new JSPs/ASPs or Java /.NET classes //servicename and servicedetails are to be populated // by servlet dopost(), doget() or service() methods String servicename = request.getparameter( service ); Hashtable servicedetails = getservicedetails(); Service service = // known or new service (Service) Class.forName(serviceName).newInstance(); String content = service.run(servicedetails); response.setcontenttype( text/html"); // application/xsl and etc. response.getwriter().println(content); XML based Service API allows us to describe any existing and future service <ServiceRequest service= Mail action= get > <Param><paramName1= ></Param> </ServiceRequest> We can find both Dispatcher and Factory patterns in this example. This approach makes it possible to create a unified API for client server communications. Any service (including new, unknown design time services) can be requested by a client without code change.

Design Pattern Canonical Data Model How can services be designed to avoid data model transformation? Problem Services with disparate models for similar data impose transformation requirements that increase development effort, design complexity, and runtime performance overhead.

Solution Canonical Data Model Data models for common information sets are standardized across service contracts within an inventory boundary. Application Design standards are applied to schemas used by service contracts as part of a formal design process.

Canonical Data Model Principles Standardized Service Contract Architecture Inventory, Service

Design Pattern Canonical Protocol How can services be designed to avoid protocol bridging? Problem Services that support different communication technologies compromise interoperability, limit the quantity of potential consumers, and introduce the need for undesirable protocol bridging measures.

Canonical Protocol Solution The architecture establishes a single communications technology as the sole or primary medium by which services can interact. Application The communication protocols (including protocol versions) used within a service inventory boundary are standardized for all services.

Design Pattern Concurrent Contracts How can a service facilitate multiconsumer coupling requirements and abstraction concerns at the same time? Problem A service s contract may not be suitable or applicable for all of the service s potential consumers.

Concurrent Contracts Solution Multiple contracts can be created for a single service, each targeted at a specific type of consumer. Application This pattern is ideally applied together with the Service Façade pattern to support new contracts as required.

Singleton Design Pattern Problem need to be sure there is at most one object of a given class in the system at one time Solution Hide the class constructor Provide a method in the class to obtain the instance Let class manage the single instance public class Singleton{ private static Singleton instance; private Singleton(){} // private constructor! public Singleton getinstance(){ if (instance == null) instance = new Singleton(); return instance; } }

Context Provider Design Pattern Separate implementations of the API from the API itself Problem We needed a flexible design and at the same time easily extensible Solution A provider implementation derives from an abstract base class, which is used to define a contract for a particular feature. For example, to create a provider for multiple storage platforms, you create the feature base class RDBMSProvider that derives from a common StorageProvider base class that forces the implementation of required methods and properties common to all providers. Then you create the DB2Provider, OracleProvider, MSSQLProvider, etc. classes that derived from the RDBMSProvider. In a similar manner you create the DirectoryStorageProvider derived from the StorageProvider with its subclasses ActiveDirectoryProvider, LDAPProvider, and etc.

javax.sql.datasource interface Adaptable Data Service for Multiple Storage Platforms Providing Access to Multiple Data Sources via Unified API com.its.data.datasource DataConnector getcoonnection() DataConnector XMLdescriptor parsexml() get(); update(); delete(); insert(); LDAP XML Descriptor LDAP Data Connector Directory Services XML Descriptor Directory Services Data Connector RDBMS XML Descriptor Multiple storage platforms can be transparent The same basic data operations are implemented by connectors Data structure and business rules are captured in XML descriptors Design Patterns: Model, Adapter, Provider RDBMS Data Connector java.sql.connection interface

Authentication Service Delegation, Façade and Provider Design Patterns Validate GetRoles ChangeRoles 1. Delegation: application-specific rules are in a configuration file 2. Façade: a single interface for all applications regardless of data source 3. Provider: Works with multiple datasource providers Active Directory, LDAP and RDBMS Layered: separated Utility and Data Access Layers Business Utility Services Data Layer Services Standard-based: Web Service and Messaging Service Standard Interfaces Secure: Protected by HTTPS and Valid Certificates

Authentication Service Provider, Façade and Model Design Patterns // read config & build application map on initiation AppsArray[] apps = serviceconfig.getapplicationarray(); // apps maps each application to its data source(s) -------------------------------------------------- // getroles(appname, username); AuthServiceDao dao = apps.getservice(appname); // dao is one of types: LdapDao, AdDao or DbDao String roles = dao.getroles(username);

How Façade Design Pattern can help us to Improve Implementations of Internet Services, Increase Reuse and Remove Duplications App1 Multiple instances of Customer Data App2 DB1 App3 App4 DB2 DB3 DB4 DB5 DB6

From Project-based code to Enterprise Services using Façade Design Pattern Multiple instances of Customer Data App1 App2 App3 DB1 DB2 DB3 DB4 DB5 DB6 App4 Customer Service (Wrapper) New New More Web and Internal Applications

Enterprise Services will Shield Applications and Enable Changes from current to better Implementations Portal Services Current Implementations Future Implementations Publish and promote adaptation of Web Services Customer Service (Wrapper) Subscription Service (Wrapper) Product Service (Wrapper) TPS App1 GL App2 Jepp. App3 com Enterprise Services elink App4 New New

Problem Design Pattern Delegate Business logics is often customized on client requests creating maintenance pain Solution Delegate changeable part of business logic to a special component, like a rules service, and simplify changing this logic.

Design Pattern Agnostic Context How can multi-purpose service logic be positioned as an effective enterprise resource? Problem Multi-purpose logic grouped together with single purpose logic results in programs with little or no reuse potential that introduce waste and redundancy into an enterprise.

Agnostic Context Solution Isolate logic that is not specific to one purpose into separate services with distinct agnostic contexts. Application Agnostic service contexts are defined by carrying out service-oriented analysis and service modeling processes.

Governance Connect System and Enterprise Architectures Connect Business and Technology Architecture Engage Teams in Collaborative Engineering Management Business requirements Architecture Development Conduct service-oriented analysis to re-think Enterprise Architecture

SOA with TOGAF Learn: TOGAF Intro TOGAF ADM Features to Support SOA

Why TOGAF & SOA? The Open Group Architecture Framework (TOGAF) TOGAF is a mature EA framework SOA is an architecture style Enterprises struggle to move to SOA TOGAF helps to describe EA and steps for SOA

Enterprise Continuum

Phase A: TOGAF General Views Business Architecture views Data Architecture views Applications Architecture views Technology Architecture views

Business Data Mapping Business and Technology Views Service Infrastructure Business Architecture/Process View: Workflows & Scenarios Business Architecture/Product View: Product Lines, Products, Features Descriptions and order terms Service Views: Business/Utility/Data Services Descriptions and execution terms Data Architecture: Standards, Repositories Descriptions and Models Technology Architecture: Platforms/Servers/Net/Security

Questions? Please feel free to email or call Jeff: 720-299-4701 Looking for your feedback: what was especially helpful and what else you would like to know, and what are better ways to work together in a collaborative fashion