Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

31

Transcript of Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

Page 1: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.
Page 2: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

Ulrich RoxburghServices2 Ltd.

Architecting Your Enterprise with Patterns

SESSION CODE: ARC302

Page 3: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

3

AgendaDesign Patterns

What are Patterns?How do we use them

Design using PatternsCreating the initial designRefinementDesign Heuristics

Page 4: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

4

Patterns in Nature

Page 5: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

5

Patterns in SportFootball

Page 6: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

6

Patterns in BusinessConvergence

“In the Convergence pattern, competitors from previously distinct industries start competing to satisfy the requirements of a specific customer set. There are three distinct flavors of this pattern: product, in which product boundaries blur; supplier, in which suppliers become ‘one stop shops’; and complementor, in which companies combine to deliver greater value”

- Profit Patterns, Adrian J. Slywotsky

Page 7: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

7

What is a Pattern?

“Mind sized” chunk of information about decisionsShows a good solution to a common problem within a specific contextPatterns describe relationships Re-useable design elementCommon vocabulary for talking about a solutionNot an implementationMitigate technical risk

Page 8: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

8

Patterns Literature

‘Gang of Four’ Design PatternsIntegration PatternsData PatternsEnterprise Application Patterns

Page 9: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

9

Structure of a PatternPattern Name and ClassificationIntent: Goal behind the patternMotivation (Forces): Problem and context in which this pattern can be used. Also Applicability.Structure: A graphical representation of the pattern.Participants: Classes and objects and theirCollaboration: How classes and objects interactConsequences: A description of the results, side effects, and trade offs caused by using the pattern.

Page 10: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

10

Enterprise Architecture - Patterns

Business Architecture

Integration Architecture

Application Architecture

Operational Architecture

Development Architecture

Integration Architecture

Architecture

Design

Implementation

Database Application Deployment Infrastructure

Enterprise Solution Patterns

Architecture

Design

Implementation

Database Application Deployment Infrastructure

Enterprise Integration Patterns

Page 11: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

11

Hierarchy of PatternsArchitectureDesignImplementation

Page 12: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

12

Patterns in Layers

Portal Integration

Process Integration

Entity Aggregation

Page 13: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

13

Designing with Patterns

Industry has used pattern-based design for decades. Design elements (patterns) are used to engineer

Automobiles and aircraftMachine tools

Applying pattern-based design to software promises predictabilityrisk mitigationincreased productivity.

Page 14: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

14

Designing with Patterns

Experience is still key!Known good mechanisms can be used to build

Planes that do not flyApplications that do not scale.

Applying patterns involves an iterative design process. As a guiding principle, you want to keep your design as "simple as possible and no simpler" Albert Einstein Do not use patterns just for the sake of using them.

Page 15: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

15

What are Capabilities

An abstract view of a business function – the WHATCapabilities are hierarchicalCapabilities are measurable and have properties

Current performanceTechnology

Business valueProcesses

OwnersMaturity

Page 16: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

16

Capabilities MappingHigh-level example - Banking

BusinessValue

Page 17: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

17

Designing a Capability1- View/Change Address Details

A.k.a “One Touch” or “One Customer View”Complexities

Capability is the aggregation of multiple simple business servicesSome services are inherently asynchronousMay require business rules to be executedMay require transactional logic or compensationHas complex integration requirements

Page 18: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

18

High Level Architecture Patterns

View Address Details(Portal Integration)

Main frame CRMDatabase

Update Address Details(Process Integration)

Main frame CRMDatabase

Page 19: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

19

Refine to Design PatternsView Address

Details

Portal Integration

Presentation Integration

Functional Integration

Data Integration

Functional Integration

Mainframe CRM Database Financials

SOI SOI SOI SOI

Update Address Details

Process Integration

Presentation Integration

Functional Integration

Data Integration

Functional Integration

Mainframe CRM Database Financials

SOI SOI SOI SOI

Page 20: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

20

More refinement…

Introduce a message broker to reduce inter-connectionsUse publish/subscribe to abstract interconnections

Customer Lookup

Message Broker

Presentation Integration

Mainframe

Portal Integration

SOI

Pub/Sub

Functional Integration

CRM

SOI

Data Integration

Database

SOI

Functional Integration

Financials

SOI

Page 21: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

21

More refinement…

Merge the two use-casesIntroduce process integration. Why?Introduce asynchronous messaging

Customer Lookup and

Address Change

Message Broker

Presentation Integration

Mainframe

Portal Integration

SOI

Pub/Sub

Process Integration

Functional Integration

CRM

SOI

Data Integration

Database

SOI

Functional Integration

Financials

SOI

Half Synch/Half Async

Page 22: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

22

Baseline Implementation from Patterns

Assume MS technology stackImplement using BizTalk Server and ASP.NET

ASP.NET and .NET Framework

BizTalk Server

.NET Framework/BizTalk Server

Customer Lookup and

Address Change

Message Broker

Presentation Integration

Mainframe

Portal Integration

SOI

Pub/Sub

Process Integration

Functional Integration

CRM

SOI

Data Integration

Database

SOI

Functional Integration

Financials

SOI

Half Synch/Half Async

Page 23: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

23

Designing a Capability2- Self Service (View Financial Position)

ComplexitiesCapability is the aggregation of multiple simple business servicesSome services are external to our enterpriseSome services are inherently asynchronousMay require business rules to be executedMay require transactional logic or compensationHas complex integration requirements

Page 24: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

24

Business Process

LoginGet existing financial positionGet customer profile and account balanceGet list scheduled paymentsCombine information and display

WebApp1. Navigate To Page Directory

Services

2. Login

3. Get System IDs

Broker

4. Get Loans

LoanLoan

4.1. Get Loan BalancesPayment Services

Profile Services

Account Services5. Get MF Account

Number

6. Get CustomerProfile

7. Get Balances

Page 25: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

25

Baseline Architecture from Patterns

CustomerMessage Broker

SOI

Loan Services

Portal Integration

Pub/Sub

Service Interface

CRM

SOI

Data Integration

Database

SOI

Account Services

SOI

Half Synch/Half Async

External Partner(SWIFT)

External PartnerManual

SOI SOI

MVVM

Gateway

Process Integration

Loan Services

SOI

Pub/Sub

Message Broker

Page 26: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

26

CustomerMessage Broker

SOI

Loan Services

Portal Integration

Pub/Sub

Service Interface

CRM

SOI

Data Integration

Database

SOI

Account Services

SOI

Half Synch/Half Async

External Partner(SWIFT)

External PartnerManual

SOI SOI

MVVM

Gateway

Process Integration

Loan Services

SOI

Pub/Sub

Message Broker

Baseline Implementation from PatternsBizTalk

ASP.NET and WCF

Page 27: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

27

Baseline Deployment from Patterns

Page 28: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

28

Patterns in other places…Composite User Interface patterns:

Composite and Composite View Command Adapter

Modularity patterns: Service Locator Event Aggregator Façade

Testability patterns: Inversion of Control Separated Presentation

Page 29: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

29

Interface Design HeuristicsEasy to Consume

Interfaces that are as simple as possibleDocument centric rather than method centricConforms to WS-I base profile

Right Granularity

Able to accomplish a business unit of work in a single call Reusable across many different contexts Models business processes rather than lower level functionality

Easy To Version

Easily extended with the addition of new parametersDon’t break clients when a new interface is defined

Loosely Coupled

Insulate the consumer from changes in the implementation Don’t require anything other than the schema and contract Don’t leak internal abstractions outside the service boundary

Page 30: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

30

Design HeuristicsInterception services

Build interception services that are shared by all servicesPipelines are a common implementation mechanismPipelines process both content and the context

Composite Services

Compose multiple distinct services into a new business process, Services are composed in a similar manner to objects

Process Manager

Provide an extra layer of abstraction by separating process from implementation

Deal with Failure

Provide robust exception handling for business processesHand off to humans for complex exception handlingProvide a mechanism to re-submit requests

Page 31: Ulrich Roxburgh Services2 Ltd. Architecting Your Enterprise with Patterns SESSION CODE: ARC302.

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED

OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.