background image

 

 

Architecting 
Enterprise 
Application 
on .NET

Peng Huang

peng.huang@acm.org

在 .NET 在在在在在在在在在在

background image

 

 

在在在在

Session 1:

在在在在在在在在在

Session 2:

.NET 在在在在在在在在在

Session 3:

在在在在在在在在在在

Session 4:

在在在在 : PetShop .NET

Session 5:

Teamwork 在 Bug Tracking

在在在在在在在在在在在

background image

 

 

Session 1
在在在在在在在在在

在在在在在

在在在在在在

在在在在

background image

 

 

在在在在在

“ 在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在

在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在

在在在在”

--Vitruvius 在在在在在在在在在在在在在  25  在

在在在在在在在在在在在在在在在在在在在在在在在在

在在在在在在在在在在在在在在在在在在在在在在在在

在在在在在

在在在在在

background image

 

 

在在在在在在

在在在在在在在在在

在在在在在在在在在在在在在在在在在在在在在在 

在在在在在在

IEEE Working Group on Architecture  在在在在在“

在在在在在在在在在在在在在”

David Garlan  在  Mary Shaw  在在在在在在在在在在在在在在在

在在在在 

     “ 在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在
      在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在

在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在”

background image

 

 

在在在在在在

构构构构 

 

在在在在在在在在在在在在在在在 

在在在在在在在在在在在在在在在在在 

在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在 

在在在在在在在在在在在在在在在在在在在在在在在在 

在在在在在在在在在在在在在在 

background image

 

 

在在在在在在在 ?

在在在在在在在在在在在在在在在在

在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在

在在在在在在在在在在在在在在在在在在在在在在在在在 MIS 在在在在

在在在在 

在在在在在在在在在在在在在在在在在在在在在在

Microsoft .NET 

Framework

background image

 

 

Session 2
.NET 在在在在在在在在在

.NET Framework

.NET Framework  在在

VS.NET 在在在在在在在在在在

在在

Duwamish 7 C# 在在在在在在

background image

 

 

.NET Framework 在 VS.N
ET

Operating System

Common Language Runtime

ADO.NET: Data and XML

ASP.NET: Web 

Services & Web Forms

Windows

Forms

Common Language Specification

V

is

u

a

l S

tu

d

io

.N

E

T

VB

C++

C#

JScript

background image

 

 

VS 6 在 VS.NET

Visual Studio 6.0

Visual Studio .NET

ASP
HTML generated using XML 

and XSL

Small amount of VB Script
Proprietary cache
Cookie / session / db state
COM+ components
ADO disconnected 

recordsets
SQL Server with stored 

procedures

ASP .NET
HTML generated using 

ASP .NET Web controls and 

ASP .NET Data Binding
VB .NET code behind
ASP .NET cache
ASP .NET session state
.Net Assemblies
ADO.NET DataSets
SQL Server with stored 

procedures

background image

 

 

J2EE and .NET 
Framework

Java 在

在在在在

在在在在在在在

Packages

J2EE

Windows 在

在在在在

在在在在在在

Frameworks

.NET Framework

.NET

.NET

在在

在在

在在在在

在在在在

在在在在

在在在在

.NET Framework

.NET Framework

支支

支支

Java

Java

支支

支支

Visual J# .NET

Visual J# .NET

background image

 

 

.NET Framework 在在在在

在在在在 Internet 在在在在在在在在在在在在在在在在在在在在在在在

在在在在在在

Common Language Runtime (CLR)

在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在  remoting 在在

在在在在在在在在在在在在 

.NET Framework  在在 

在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在 GUI 在在在在在在在

在在在在在 ASP.NET 在在

code management

managed code 

unmanaged code 

background image

 

 

.NET Framework

在在

Component 

model 

Configuratio

Data 

Framework 

services 

Globalizatio

n and 

localization 

Net 

Common 

tasks 

Reflection 

Rich, client-

side GUI 

Runtime 

infrastructur

e services 

Web 

Services 

background image

 

 

The .NET Framework 
Class Library

在在

Namespace

在在

Common tasks  System.Collections 

在在在在在在在在在在在在在在在在在在在在在

System.IO 

在在在在在在在在在在在在在在在 I/O 在在在 I/O 在在

System.Text 

在在在在在在在在在在在在在在

System.Text.RegularEx

pressions 

在在在在在在在在在在

System.Threading 

在在在在在在在在在在在在在在

Rich, client-

side GUI 

System.Drawing 

在在在 2-D 在在在 GDI+ 在在在

System.Windows.Form

Windows 在在在在在在在在在在在在在在在 在

background image

 

 

.NET Framework 在在

在在

Namespace

在在

Web 

Services 

System.Web  

在在 Web 在在在在  client 在在在在在在在在在在在 ASP.NET 在在在在

在在在在 Web Forms 在 

System.Web.Servi

ces 

在在 SOAP 在 Web Service 在在在在在在在在在在在

.NET 

Framework 

security 

System.Security 

在在 .NET Framework 在在在在在在在在在在

System.Security.Cr

yptography  

在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在在

Data 

System.Data 

在在在在在在在在在在在在

System.Xml 

在在 XML 在在在

System.Xml.Seriali

zation 

在在在 XML 在在在在在在

background image

 

 

.NET Framework 在在

构构

Namespace

构构

Framework 

services 

System.Diagnostics

在在在在在在在在在 Debug and Trace

System.DirectoryServi

ces

在在在在在在在

System.Management 

在在在在在在在在在在在

System.Messaging 

在在在在在在  (MSMQ)  在在在在在在在在在在在在在在在在

System.ServiceProcess  在在在在在在在 Windows 在在在在在在在在在在在在在在在在在 A

ctive Directory 在 Web Services 在

System.Timers 

在在在在在在在在在在在在在在在在在在

background image

 

 

.NET Framework 在在在

在在在在在

在在在

在在在在在在

在在在在

在在在在在在在在在在在在在在在

在在

在在在在在在在

在在在在在

在在在

在在在在在在

background image

 

 

VS.NET 在在在在在在在在在在

在在在在在在在在

在在在在在在在在

Business Façade

Business Façade

Business Rules

Business Rules

Data Access

Data Access

System Framewor

System Framewor

k

k

Web Service

Web Service

Web UI

Web UI

Win UI

Win UI

background image

 

 

在在

Visual Studio .NET 在在在在在在在在在在

Duwamish 7 C# 在在在在在在

background image

 

 

Session 3
  在在在在在在在在在在

在在在在在在在在

Design Goals

.NET Framework 在在在在在在在在

在在在在在在在在在在

background image

 

 

在在在在在在在在

在在在在在在在在在在在 

在在在在在在在在在在在在

在在在在在在

Administrator must be able to create, read, u

pdate, and delete (CRUD) customer accounts.

Administrator must be able to configure the max o

utstanding balance for a customer

Administrator must be able to change the name of 

a customer

在在在在在在在

在在在在在在在在在在在在在在在在在在在

在在在在在在 VB.NET 在在在在在在在在在在在在

background image

 

 

在在在在在在在在

An Internet customer will be able to 

browse the PetShop .NET pets catalog by 

category.

An Internet customer will be able to 

search for specific pets by keyword:

An Internet customer will be able to 

select one or more pets and place them in 

a shopping cart for purchase.

background image

 

 

.NET technology and 
Design Goals

在在在在 Availability Goal 在

在在在在在 Maintainability Design Goal 在

在在在在在 Manageability Design Goals 在

在在在在 Performance Design Goal 在

在在在在 Reliability Design Goal 在

在在在在在 Scalability Design Goal 在

在在在在 Security Design Goal 在

background image

 

 

Maintainability Design 
Goal

在在在在

在在在在在在在在在在在在

在在在在在在在在在在在在在在在在

.NET Framework 在在在

Use Cases implemented directly in 

Business Façade component

Code segmented into many Visual S

tudio projects that can be modified 

together, or independently

background image

 

 

Availability Goal

在在在

100%  在在在在

.NET Framework 在在在

Web Farm

ASP.NET Availability Enhancements

Session State Stored Externally in Session Server

Automatic Problem Detection and Web Server Re

start Without Interruption of Service

Replace DLLs Used By Site, Without Interruption 

of Service

background image

 

 

Manageability Design 
Goals

在在在在

在在在在在在在在在在在在在

在在在在在在在在在在在在在在在在在在

.NET Framework 在在在

Store configuration info in Web.config

Trace and log to the event log using the CL

R EventLog class

Trace to a text file using the CLR FileInfo an

d StreamWriter classes

ASP.NET provides performance counters for 

each web application

Requests and response statistics

Cache statistics

Error statistics

Transaction statistics

background image

 

 

Performance Design 
Goal

在在在

在在 J2EE 在在 PetShop

.NET Framework 在在在

ASP.NET compiles pages into executa

bles

Utilize ASP.NET page output caching

Full Web Farm support through extern

al session state, and stateless classes

background image

 

 

Reliability Design Goal

在在在

“ 在在”在在在在在

在在在在

“ 在在”在在在在在

在在在在

.NET Framework 在在在

Exception based error handling

ASP.NET custom error page support

background image

 

 

Scalability Design Goal

在在在

Must scale up and out

.NET Framework 在在在

Scale up through ASP.NET Web Garden 

support

Scale out through external session sta

te.

Access components locally or through .

NET remoting.

background image

 

 

Security Design Goal

在在在

Require authentication to prevent U

RL spoofing

.NET Framework 在在在

Utilize ASP.NET built-in form authen

tication

background image

 

 

在在在在在在在在在在在在

background image

 

 

Session 4
在在在在 : PetShop .NET

PetShop .NET 在在

PetShop 在在在在

PetShop .NET 在 PetShop J2EE

PetShop .NET 在在在在

PetShop .NET 在在 Web Service

在在 : 

Visio 在 PetShop .NET 在在在在

PetShop .NET 在在 Web Service

background image

 

 

Overview of PetShop 
.NET

PetShop .NET 在在在在在在在在在在在在在在

在在在在在在在在在在在

B2C 在在在在在

在在在在 :

在在在在在在在在在在在在在在在在在在在

在在在 Microsoft .NET 在在在在

background image

 

 

Overview of PetShop 
.NET

J2EE

J2EE

构构构构构构

构构构构构构

构构构

构构构

构构构构

构构构构

.NET

.NET

构构构构

构构构构

background image

 

 

Overview of PetShop 
.NET

在在 PetShop .NET Solution

background image

 

 

PetShop .NET 在 PetShop J
2EE

在在在在在在 .NET 在在在在在在在在在

在在在在在在在

在在在在在在在在在

在在 CPU 在在在在在

在在在在在在

.NET Framework 在 J2EE 在在在在在在在在在在在在

在在在在在在在在在

background image

 

 

在在在在在在在

background image

 

 

在在在在在在在

在在在在在在在在在在在在在在在在在在在在

.NET 4410 在在 J2EE 14273 在

在在在在在

.NET  74 在在 J2EE  2566 在

在在在在在在

.NET  710 在在  J2EE  5404 在

在在在在在在在在在在

在在在在在

在在在在在

在在在在在

background image

 

 

在在在在在在在在在

background image

 

 

在在 CPU 在在在在在

background image

 

 

Logical Layer 
Architecture

background image

 

 

在在在 Use Case Diagram

Use Cas

e Diagra

m 在在在在在

在在在在在在在

在在在在在

Softwar

e Model

background image

 

 

在在在 Use Case Diagram

Customer Account Management

background image

 

 

在在在 Use Case Diagram

Pet Search

background image

 

 

在在在 Use Case Diagram

Purchase Pet

background image

 

 

Activity Diagram

Activity D

iagram

在在在在在在在在在

background image

 

 

在在在在

在在在在在在 Visi

o 在在在在在在

在在 Visio 在在

在在在在在

ER vs. OR

M

background image

 

 

Web Service

Web Service Definition

Web services are loosely coupled 

software components delivered 

over Internet standard 

technologies.

Daryl Plummer, Gartner

background image

 

 

Web Service 
Characteristics

Programmatic interface

Using standard web protocols

Loosely-coupled connections

background image

 

 

Web Service

Where is the web service ?

NG Web Application

Web-accessible XML-based services

Internet, Intranet, Extranet

B2B, B2C, P2P

Application Service

Schedule, Email, stock quotes

System Service

Directory, messaging, database, security

Hailstorm

Hailstorm

.NET My 

.NET My 

Services

Services

background image

 

 

Web Service

B2B  在  EAI 在在在在在

PetShop .NET 在 OrderWebSe

rvice

GetOrderDetails() SOAP metho

Data

Data

Access

Access

Data

Data

Access

Access

Database

Database

Database

Database

Business

Business

Rules

Rules

Business

Business

Rules

Rules

Web

Web

Browser

Browser

Web

Web

Browser

Browser

XML

XML

Application

Application

Application

Application

background image

 

 

Demo

Visio 在 PetShop .NET 在在

PetShop Solution

在在在在

在在在在在

PetShop .NET 在在 Web Service

GetOrderDetails() SOAP  在在

background image

 

 

Session 5
Teamwork 在 Bug Tracking
在在在在在

Teamwork 在在在在在

在在在  VSS and VS.NET 在在

Bug Tracking 在在在在在

在在在 Bug Tracking Tool

background image

 

 

Teamwork 在在在在在

在在 : On time and on budget

在在在在在在在在在在在 Teamwork

在在在在 Teamwork 在在在在

Teamwork 在在在

Check in, Check out, Get last version

在在在在在在在在

Teamwork 在在在 Visual Source Safe

在在在在在 : push and check 在 not coding

background image

 

 

VSS and VS.NET 在在

在 Visual Studio .NET 在在在 Visual So

urce Safe 6.0C

PetShop .NET 在在

background image

 

 

Bug Tracking 在在在在在

在在在在在在在在在在在在在在在在在

在在在在在在在在在在 Bug

Bugs and Features

Bug Tracking 在在在

在在在在在

在在在在 Debug

在在 Bug 在在在在在

在在在在在在在在在

background image

 

 

Bug Tracking Tool 在在

在在在 : Bug Tracking System

在在在在 Access 在在在在在 Bug Tracking 在在

background image

 

 

The Road to .NET 
Architect

在在在在 .NET Framework 在在在在

在在在在 OOA/D

在 Framework 在在在在在在

在在在在 Framework 在在在在在在在在在在在在在在在在

在在在在

在在在在在在在在在在在在在在在在在

在在 MSDN Universal 在在

background image

 

 

.NET Architect 
Resource

MSDN Online: 

http://msdn.microsoft.com

Rational: 

http://www.rational.com

Cetus Links

http://www.cetus-links.org

MSDN .NET Resource

http://msdn.microsoft.com/net

background image

 

 

在在

MSDN Universal and MSDN Online

在在在在在在在在在在在在在在在在在在

MSDN Universal 在 MSDN Online

MSDN Online China

http://

www.microsoft.com/china/msdn

MSDN Online China 在在在在在在在在在在在在在 .NE

T Platform 在在在在在在

background image

 

 

Q&A


Document Outline