1. Trang chủ
  2. » Công Nghệ Thông Tin

Module 2: Architecture and Structural Design Patterns

34 530 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Architecture and Structural Design Patterns
Tác giả Rhy Mednick, Susie Parrent, David Chesnut, Sam Gill, Michel Pahud, David Mahlmann, Lynette Skinner, Mick Alberts, Jennifer Linn, Miracle Davis, Linda Lu Cannon, Marlene Lambert, Eric Wagoner, Scott Serna, Eric Myers, John Williams, Juan Fernando Rivera, Edward Dudenhoefer, Rick Terek, Laura King, Kathy Hershey, Bo Galford, David Bramble, Robert Stewart
Người hướng dẫn Mick Alberts, Jennifer Linn
Trường học Microsoft Corporation
Chuyên ngành Architecture and Structural Design Patterns
Thể loại module
Năm xuất bản 2000
Thành phố Redmond
Định dạng
Số trang 34
Dung lượng 1,22 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Introduction to Architecture Templates The purpose of this topic is to introduce students to the need for a model of the “real world” in the logical design!. In the topic “Transition fro

Trang 1

Contents

Overview 1

Introduction to Architecture Templates 2

Design Patterns Used in Architecture 6

Trang 2

to represent any real individual, company, product, or event, unless otherwise noted Complying with all applicable copyright laws is the responsibility of the user No part of this document may

be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation If, however, your only means of access is electronic, permission to print one copy is hereby granted

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property

 2000 Microsoft Corporation All rights reserved

Microsoft, Active Directory, ActiveX, BackOffice, FrontPage, Microsoft Press, MSDN, MS-DOS, PowerPoint, Visio, Visual Basic, Visual C++, Visual InterDev, Visual J++, Visual Studio, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft

Corporation in the U.S.A and/or other countries

Other product and company names mentioned herein may be the trademarks of their respective owners

Program Managers: Rhy Mednick, Susie Parrent

Instructional Designer: Susie Parrent

Subject Matter Experts: David Chesnut, Sam Gill (TechnoWiz), Michel Pahud

Media Management: David Mahlmann

Editing Manager: Lynette Skinner

Editor: Mick Alberts, Jennifer Linn

Production Manager: Miracle Davis

Print Coordinators: Linda Lu Cannon (Write Stuff), Marlene Lambert (Online Training

Solutions, Inc.)

Build Coordinator: Eric Wagoner

Graphic Artist: Scott Serna

Test Lead: Eric Myers

Manufacturing Manager: John Williams

Group Product Manager: Juan Fernando Rivera

Lead Product Manager, System Services and Infrastructure: Edward Dudenhoefer

Manufacturing Manager: Rick Terek

Operations Coordinator: John Williams

Manufacturing Support: Laura King; Kathy Hershey

Lead Product Manager, Release Management: Bo Galford

Group Manager, Courseware Infrastructure: David Bramble

General Manager: Robert Stewart

Trang 3

Instructor Notes

This module provides students with a detailed presentation about architecture templates, which describe the building blocks of an application To use a building—or architecture—analogy, consider the structure of a building: a foundation, pillars, walls, and an exterior shell In this module, you will be introduced to the structure of an application

After completing this module, students will be able to:

! Describe architecture templates

! Describe the creational design patterns

! Describe the structural design patterns

! Describe the Enterprise template

! Describe Enterprise Architecture and how it relates to an Enterprise template

Materials and Preparation

This section provides the materials and preparation tasks that you need to teach this module

Required Materials

To teach this module, you need the following materials:

! Microsoft® PowerPoint® file 1910A_02.ppt

! Module 2: Architecture and Structural Design Patterns

! Lab 2: Architecture and Structural Design Patterns

Preparation Tasks

To prepare for this module, you should:

! Read all of the materials for this module

! Complete the lab

Presentation:

60 Minutes

Lab:

45 Minutes

Trang 4

Module Strategy

Use the following strategy to present this module:

! Introduction to Architecture Templates The purpose of this topic is to introduce students to the need for a model of the “real world” in the logical design The architecture template represents the structure of the logical design model This is only an introduction Avoid providing the details that will be provided in subsequent sections

In the topic “Transition from Conceptual to Logical Design,” focus on the first step in the transition from conceptual design to logical design, which is

to identify the creational and structural design patterns that can be used in the architecture of the desired solution

In the topic “What Are Architecture Templates?” emphasize that the architecture template defines how to create a Microsoft Windows® 2000 solution

! Design Patterns Used in Architecture The purpose of this section is to introduce students to creational and structural design patterns that can be used to create a logical architecture

In the topic “Creational,” focus on the sample of the Abstract Factory and its implementation as a Remote Data Service (RDS) in the Microsoft Data Access Components (MDAC) Mention that creational design patterns are now implemented as Windows 2000 capabilities and emphasize the need to continue to create additional creational patterns that might evolve into additional operating system services

In the topic “Structural,” focus on the sample of the Composite design pattern and its implementation as a Component Object Model (COM) collection object Mention that another structural design pattern that is going

to be heavily used in an architecture template is the Facade

! The Enterprise Template The purpose of this section is to introduce students to the components of the Enterprise template and to emphasize the new additions: facade, data access layer (DAL), and system services

In the topic “Facade Sequence Diagram,” point out the sequence in which the Web services facade layer is used

In the topic “System Services,” review briefly the Decorator structural design pattern and the use of authenticate and audit as examples of system services

! Other Architecture Templates The purpose of this section is to introduce students to the possibility of using other architecture templates and in particular to introduce two others: the Web template and the Business template

! MSF Enterprise Architecture The purpose of this section is to introduce students to the Microsoft Solutions Framework (MSF) Enterprise Architecture and to differentiate it from the Enterprise template You can use the following analogy to explain the difference: Enterprise Architecture is like a master plan for the

continued development of a village, whereas the architecture template is the building code for all of the buildings that will be constructed in the village

Trang 5

In the topic “MSF Enterprise Architecture Overview,” explain that the primary purpose of Enterprise Architecture is to position all applications on

an information technology (IT) landscape, and focus on the applications that have fallen into the abyss

! Best Practices Use the village analogy to emphasize that you can’t build a village without a building code You also want the code to reflect good practices Finally, you want the code to incorporate enough flexibility to allow people to be creative in designing their homes

Lab Strategy

! Lab 2: Architecture and Structural Design Patterns The purpose of this lab is to help students become more familiar with structural design patterns and architecture templates Consider discussing the scenario and problem statement from the lab before letting students work on the lab Make sure all students understand the scenario Don’t embellish the scenario; keep it simple Discuss with students their answers

to Lab 2

Trang 7

# Overview

! Introduction to Architecture Templates

! Design Patterns Used in Architecture

! The Enterprise Template

! Other Architecture Templates

! MSF Enterprise Architecture

! Best Practices

In this module, you will be introduced to architecture templates Architecture templates describe the building blocks of an application To use a building or architecture analogy, consider the structure of the building This structure consists of a foundation, pillars, walls, and an exterior shell In this module, you will be introduced to the structure of an application

After completing this module, you will be able to:

! Describe architecture templates

! Describe the creational design patterns

! Describe the structural design patterns

! Describe the Enterprise template

! Describe Enterprise Architecture and how it relates to an Enterprise template

In this module, you will learn

about architecture and

Enterprise templates and

about design patterns that

are used in the architecture

template

Trang 8

# Introduction to Architecture Templates

! The Problem

! Transition from Conceptual to Logical Design

! What Are Architecture Templates?

Architecture templates describe the structure of an application They tell you the layers that an application should have, and the type of objects (logical design) and components (physical design) that should be included in each layer

In this section, the architecture template will be placed in the proper context of the problem that is being addressed This will be followed by a presentation about the process of transitioning from conceptual design to logical design The section concludes with a precise definition of what makes up an architecture template

Trang 9

To create a precise and concise representation of the real world, it is necessary

to abstract from the complexities of the real world; this abstraction is the model The model is built from pieces that interact that are called components The interactions between the components and the behavior of each of the components define the salient features of the real world as they are represented

in the model

Another way of phrasing this is to say that the model imposes structure on the real world in order to be able to represent it

The first question that comes up is “What shape should this structure be?” That

is the issue that the architecture template addresses

The representation of the real world in a computer-based application model is

an art rather than a science Having said that, there are techniques that improve the quality of the design of the model In particular, object oriented design methodology offers a systematic approach for designing computer applications that successfully model the real world

Topic Objective

To provide a background

about the business problem

Lead-in

In this topic, you will learn

about the business problem

facing application designers

that leads to the need for a

system services layer

Trang 10

Transition from Conceptual to Logical Design

Object oriented analysis and design methodology begins with a conceptual representation of an application that consists of actors and use cases, as described in Module 1, “Designing Distributed Applications for Windows 2000.”

The next step in the design process is to map the conceptual design to a logical design In this step, you must determine the solution characteristics, which are the restrictions on the representation of the real world in the model Using creational and structural design patterns, you map the solution characteristics to the template architecture In general, solution characteristics include

consistency, reduction, reusability, the ability to integrate, maintainability, and flexibility

Creational design patterns abstract the instantiation process A client becomes independent of how its objects are created or composed For example, creational design patterns include a Factory Method that allows you to create objects at run time An example of a Factory Method implementation is the

CreateObject method in VBScript (a script written in the Microsoft Visual

Basic® Scripting Edition)

Structural patterns, on the other hand, are concerned with how logical objects are composed to create larger structures For example, structural patterns include a Composite pattern that allows you to represent part/whole hierarchies

An example of a Composite implementation is a collection For example, a

Recordset has a Fields collection, which is a grouping of Field objects

Topic Objective

To provide a background

about the logical design

Lead-in

In this topic, you will learn

about the transition from

conceptual design to logical

design and the use of

creational and structural

design patterns in this

process

Trang 11

What Are Architecture Templates?

! Microsoft Enterprise Strategy

! Architecture Template

Based on the creational and structural pattern choices that are made in the logical design, an architecture template can be derived An architecture template is a layered model of the “real world” that segregates functionality into the various layers

Microsoft Enterprise Strategy

The Microsoft® Enterprise strategy for building applications is to separate the application into three types of services: user, business logic, and data This strategy, however, does not define how objects should be aggregated into these three services

Architecture Template

The use of an architecture template defines how to create a Microsoft Windows® 2000 distributed solution It defines a map based on the desired characteristics necessary for placing objects within layers in the solution There can be several different ways in which an architecture template can be laid out, as you will see in the following sections

Trang 12

# Design Patterns Used in Architecture

In this section, you will learn

how design patterns are

used in defining an

architecture template

Trang 13

Creational

DataSpace Client

Server

RDS Custom Object

As has been noted, creational design patterns generally define how an instance

of a class is created “Factory” is the term used for the facility to create objects Abstract Factory is an interesting creational design pattern that allows a client

to choose the class to instantiate, depending on the requirements specified at run time

The preceding slide shows an illustration of an implementation of an Abstract Factory—the Remote Data Service (RDS) RDS is a component that ships with the Microsoft Data Access Components (MDAC), version 2.0 and later RDS

allows client applications (using the RDS.DataSpace object) to instantiate

components on the server at run time

Operating systems in general, and Windows 2000 in particular, offer component services The component service, which in the case of Windows

2000 is COM+, provides the capabilities associated with creational design patterns

Five creational design patterns have been proposed in the design pattern literature:

! Abstract Factory The Abstract Factory design pattern allows the creation of related dependent objects without the specification of their concrete classes

! Builder The Builder design pattern allows the construction of a complex object from its representation

! Factory Method The Factory Method design pattern allows the creation of an object, but allows subclasses decide which class to instantiate

! Prototype The Prototype design pattern specifies the kinds of objects to create by using a prototypical instance, and creates objects by using this prototype

In this topic, you will learn

about the creational design

patterns

Trang 14

! Singleton The Singleton design pattern ensures that a class has only one instance and provides a global means of access to it The Singleton creational design pattern may be of special interest In certain use cases in an application, it might be necessary to serialize the flow of an application to avoid the assignment of a resource or value to multiple requestors For example, the assignment of a unique vendor number, requestor number, or check number

is an example of an activity that requires that only a single object perform the assignment In this case, it is necessary to specify in the logical design that the Singleton creational pattern be used

Databases such as Microsoft SQL Server™ can generate unique numbers automatically, eliminating the need to create a singleton object In these cases, the database is most likely using some type of singleton object internally to control the number assignments

Using the Singleton pattern implies that only one instance of the object is created and that it is accessible to clients from a well-known access point The sole instance can be extended by subclassing For example, a singleton object that issues requisition numbers could be subclassed by a line item number class to also issue line item detail numbers

Note

Trang 15

In COM+, a Composite structural design pattern can be implemented as a collection Collections are objects that contain a logical grouping of items and support a means for navigating these contained items

In the preceding slide, there is an illustration of an implementation of a Composite—a Microsoft ActiveX® Data Object (ADO) recordset A recordset

has a Fields collection (the composite), which is a grouping of Field objects

Seven structural design patterns have been proposed in the design pattern literature The structural design patterns proposed can be used in the definition

of an architectural template or in the logical design for a particular application:

! Facade The Facade design pattern is used when you want to provide a simple interface to a complex subsystem Facades, as you will see, are heavily used

in architecture templates

! Proxy The Proxy design pattern is used when you need a more versatile reference

to an object than a pointer An example is the use of proxies in distributed Component Object Model (DCOM)

! Composite The Composite design pattern is used when you want to represent a hierarchy of objects; for example, a requisition and its line item detail

In this topic, you will learn

about the structural design

patterns

Trang 16

! Adapter The Adapter design pattern is used when you want to use an existing class and its interface does not match the one you need For example, an OLE DB provider is an adapter An OLE DB provider presents data to OLE DB consumers in a universal format independent of the structure of the underlying data

! Bridge The Bridge design pattern can be used when you want to select at run time a particular subclass to use rather than creating a permanent binding to each possible subclass

! Decorator The Decorator design pattern can be used to extend the responsibilities of objects dynamically and transparently without affecting other objects

! Flyweight The Flyweight design pattern can be used when there are a large number of objects that do not fall into a particular category for composition

Trang 17

# The Enterprise Template

! The Enterprise Template Components

! Facade Structure

! Facade Sequence Diagram

! Data Access Layer

! System Services

Several different architecture templates can be defined by using the creational and structural design patterns The architecture templates that survive are the ones that can be reused in multiple application instances

In this section, the following topics will be covered:

! The Enterprise template components

! Facade structure

! Facade sequence diagram

! Data access layer

In this section, you will learn

about one architecture

template: The Enterprise

template

Ngày đăng: 19/10/2013, 02:15

TỪ KHÓA LIÊN QUAN