529

Руководство MS по проектированию архитектуры приложений

Embed Size (px)

DESCRIPTION

Руководство MS по проектированию архитектуры приложений

Citation preview

  • , , URL -

    , . , ,

    , , , , ,

    , ,

    , , , ,

    , , , .

    .

    , ,

    ,

    (, , ,

    .) Microsoft Corporation.

    Microsoft , , ,

    ,

    . , Microsoft,

    - ,

    , .

    2009 . .

    Microsoft, MS-DOS, Windows, Windows NT, Windows Server, Active Directory, MSDN, Visual Basic,

    Visual C++, Visual C#, Visual Studio Win32

    ,

    / .

    .

  • .

    Microsoft .

    ,

    . ,

    . Microsoft

    , ,

    , .

    Microsoft,

    .

    ,

    . 25

    .

    , ,

    ,

    .

    , .

    ,

    -, , RIA,

    ;

    ; ,

    .

    , Microsoft . 2

    , ,

    .

    ,

    . (S. Somasegar)

    -

    Microsoft

  • .

    , , .

    Microsoft -

    . Application

    Architecture for .NET: Designing Applications and Services ( .NET:

    )

    , 2002 .

    . . . (J. D. Meier),

    (David Hill) Microsoft patterns & practices

    Microsoft

    .

    Microsoft . 2 , ,

    Microsoft. .NET

    Framework, Microsoft, ,

    ,

    ,

    .

    .

    ,

    , (

    , , , ,

    , ),

    .

    , .

    / , ,

    , . /

    , . ,

    .

    , , ,

    .

    Microsoft,

    Microsoft,

    Microsoft. ,

    .

    ,

  • (Scott Guthrie)

    - .NET

    Microsoft

  • , ,

    : , . :

    ? : ,

    : ? : , :

    UI ? : , :

    ? : , , .

    , . ,

    , , , ,

    .

    (

    ) , ,

    , - ,

    , , ,

    .

    , ,

    .

    -

    , .

    , .

    , -

    , . ,

    , , ,

    ,

    .

    ,

    , , .

    ( )

    .

    . ,

    .

    , ,

    , .

    ,

    .

    , ,

  • , , ,

    ,

    .

    , .

    ,

    , -,

    , , ,

    .

    , , .

    , ,

    , . ,

    , . , .

    .

    , ,

    .

    , . ,

    ,

    , .

    ,

    ,

    . ,

    , .

    . (

    -, ),

    . , ,

    , .

    ,

    , .

    Microsoft .NET Framework. ,

    . ,

    , .

    ,

    ,

    ,

    .

    ,

    . , ,

    , ,

  • , , ,

    . Microsoft .NET Framework,

    , ,

    . , , .

    , , ,

    .

    (David Hill)

    patterns and practices

    2009

  • Microsoft .NET Framework

    .

    ,

    .

    , .

    , (

    , ) (

    ).

    , -,

    - (RIA), ,

    .

    .

    , ,

    .

    :

    Microsoft.

    ,

    , .

    .

    .

    .

    .

    patterns & practices

    , .

    ,

    .

  • Microsoft .NET

    Framework.

    ,

    . ,

    ,

    , ,

    .

    . ,

    , ,

    Microsoft .NET Framework.

    , ,

    ,

    Microsoft .NET Framework.

    ,

    , ,

    Microsoft .NET Framework,

    , Microsoft .NET

    Framework.

    ,

    . , .

    ,

    :

    ,

    , ,

    ,

    . ,

    ,

    , ,

    , , ,

    , .

    , ,

    , ,

    .

    . ,

  • ,

    . ,

    .

    , ,

    , -

    , RIA, ,

    . ,

    , ,

    .

    .

    , Microsoft, .NET

    Framework .

    . , .NET Framework ,

    Microsoft,

    .NET Framework ,

    patterns & practices,

    Enterprise Library patterns & practices.

    () ().

    Microsoft .NET Framework,

    , ,

    .

    .

    ,

    .

    , , ,

    , .

    http://www.microsoft.com/architectureguide.

    http://www.codeplex.com/AppArchGuide.

    Microsoft,

    , Microsoft (Microsoft Product

    Support Services, PSS). -

    Microsoft http://support.microsoft.com.

  • ,

    Microsoft MSDN http://msdn.microsoft.com/en-

    us/subscriptions/aa974230.aspx.

    .NET-:

    J.D. Meier

    David Hill

    Alex Homer

    Jason Taylor

    Prashant Bansode

    Lonnie Wall

    Rob Boucher Jr.

    Akshay Bogawat

    :

    . Rohit Sharma; Praveen Rangarajan

    . Dennis Rea

    . Adwait Ullal; Andy Eunson; Brian Sletten;

    Christian Weyer; David Guimbellot; David Ing; David Weller; David Sussman; Derek

    Greer; Eduardo Jezierski; Evan Hoff; Gajapathi Kannan; Jeremy D. Miller; John Kordyback;

    Keith Pleas; Kent Corley; Mark Baker; Paul Ballard; Peter Oehlert; Norman Headlam; Ryan

    Plant; Sam Gentile; Sidney G Pinney; Ted Neward; Udi Dahan; Oren Eini aka Ayende

    Rahien; Gregory Young

    , Microsoft. Ade Miller;

    Amit Chopra; Anna Liu; Anoop Gupta; Bob Brumfield; Brad Abrams; Brian Cawelti;

    Bhushan Nene; Burley Kawasaki; Carl Perry; Chris Keyser; Chris Tavares; Clint Edmonson;

    Dan Reagan; David Hill; Denny Dayton; Diego Dagum; Dmitri Martynov; Dmitri Ossipov;

    Don Smith; Dragos Manolescu; Elisa Flasko; Eric Fleck; Erwin van der Valk; Faisal

    Mohamood; Francis Cheung; Gary Lewis; Glenn Block; Gregory Leake; Ian Ellison-Taylor;

    Ilia Fortunov; J.R. Arredondo; John deVadoss; Joseph Hofstader; Kashinath TR; Koby

    Avital; Loke Uei Tan; Luke Nyswonger; Manish Prabhu; Meghan Perez; Mehran Nikoo;

    Michael Puleio; Mike Francis; Mike Walker; Mubarak Elamin; Nick Malik; Nobuyuki

    Akama; Ofer Ashkenazi; Pablo Castro; Pat Helland; Phil Haack; Rabi Satter; Reed Robison;

    Rob Tiffany; Ryno Rijnsburger; Scott Hanselman; Seema Ramchandani; Serena Yeoh;

  • Simon Calvert; Srinath Vasireddy; Tom Hollander; Vijaya Janakiraman; Wojtek

    Kozaczynski

    , .

    , , ,

    .

    [email protected].

  • , ,

    .

    , . ,

    , , ,

    , .

    , ,

    . , ,

    . :

    1 ?

    2

    3

    4

  • 1 ?

    ,

    , ,

    .

    . ,

    , .

    (Philippe Kruchten), (Grady Booch), (Kurt Bittner)

    (Rich Reitman) ,

    (Mary Shaw) (David Garlan) (Shaw and Garlan, 1996).

    :

    ()

    ,

    , ; ,

    ;

    , ,

    .

    , , , ,

    , , ,

    .

    (Martin

    Fowler), ,

    . :

    ;

    , ;

    ;

    ; , ,

    , .

    [http://www.pearsonhighered.com/educator/academic/product/0,3110,0321127420,00.html

    ]

  • , 2- ,

    :

    , ,

    . ;

    ,

    .

    [http://www.aw-bc.com/catalog/academic/product/0,4096,0321154959,00.html]

    ?

    , .

    ,

    .

    ,

    .

    ,

    -,

    .

    ,

    (-) -.

    (,

    ), .

    .

    . 1

    , ,

    . ,

    - -,

    .

    ,

    - -. ,

  • ,

    , , ,

    , 100 % .

    80%.

    .

    .

    .

    , ,

    . , , ,

    ,

    .

    , ,

    ,

    .

    :

    ?

    ?

    , ,

    , ,

    , ?

    ,

    ?

    ,

    ?

    -

    . ,

    . -,

    . ,

    , ,

    .

    ,

    ( ) ,

    , -.

    , :

  • , .

    .

    .

    , , .

    ,

    , .

    ,

    ,

    , .

    :

    . ,

    , ,

    . ,

    .

    ,

    ,

    , .

    ;

    .

    . ,

    .

    ,

    , ,

    , .

    ,

    .

    . ,

    ,

    .

    .

    - , SOA.

    . ,

    . ,

    UI , ,

    ,

    , ,

    ,

    .

  • ,

    ,

    . ,

    . ,

    , ,

    .

    :

    ,

    ?

    ,

    ?

    , ?

    ?

    ,

    . .

    ,

    .

    .

    :

    , . ,

    ,

    , .

    .

    , ,

    (Unified Modeling Language, UML), ,

    ,

    . ,

    ,

    .

    .

    , .

    ,

  • ,

    .

    . ,

    ,

    , .

    , ,

    .

    . , ,

    . ; ,

    . , ,

    , ,

    .

    -

    .

    :

    ?

    ?

    ?

    ?

    ?

    2, .

    ,

    ,

    4, .

    ., ., .. , 2-

    . , 2006.

    . . , 2007.

  • 2

    . ,

    ,

    . ,

    .

    . . 1

    ,

    .

  • . 2

    ,

    .

    ,

    .

    ,

    . ,

    , , ,

    . :

    . ,

    , .

    ,

    (high cohesion) (low coupling).

    ,

    .

  • .

    /

    .

    ( (Law of

    Demeter, LoD)).

    .

    (Dont repeat yourself, DRY).

    . ,

    .

    . ,

    . ,

    ,

    . ,

    , (big

    design upfront, BDUF). ,

    ,

    . YAGNI

    (You aint gonna need it1).

    . ,

    (user interface, UI), -

    .

    . UI

    ;

    -, .

    /

    .

    , , UI . ,

    .

    , ,

    , , ,

    .

    . , ,

    , . ,

    ,

    1 (. ).

  • , Table Data Gateway (

    ), , , Repository (),

    -

    .

    , , ,

    - .

    .

    ,

    .

    .

    ,

    .

    . ,

    , ,

    , , ,

    .

    , .

    . ,

    . ,

    .

    , ,

    , .. .

    QA1.

    (Quality

    Analysis), .

    QA

    ,

    .

    . -

    ,

    .

    ,

    ,

    .

    1 Quality Assurance (. ).

  • QA

    .

    .

    , , .

    . ,

    , .

    .

    . ,

    , .

    .

    .

    ,

    , 1,

    , . ,

    ( ),

    ,

    .

    .

    , .

    , UI -,

    ,

    .

    .

    ,

    .

    .

    ,

    . ,

    ,

    , ,

    ,

    1 Faade (. ).

  • .

    .

    . , UI

    .

    , - ,

    .

    .

    .

    , .

    ,

    . ,

    , ,

    .

    -

    . ,

    ,

    . , , -

    ,

    .

    -.

    ( - ),

    .

    . ,

    ,

    . ,

    , ,

    , , , ,

    .

    ,

    ,

    .

    :

  • 4,

    .

    . .

    .

    :

    .

    .

    UI .

    ,

    .

    -

    .

    ,

    . :

    , ()

    .

    - (Office Business Applications, OBAs),

    Microsoft Office Microsoft Server.

    - SharePoint (SharePoint Line of Business, LOB),

    - .

    20,

    .

    ,

    ,

    , ,

    .

    ,

  • .

    ,

    , ,

    . .

    19,

    ."

    ,

    . ,

    , ..

    ,

    .

    , Microsoft,

    , Microsoft.

    , , ,

    , ,

    .

    . ,

    ,

    .

    , , ,

    .

    . ,

    .

    :

    , .

    ,

    .

    : ,

    .

    .

    , :

    ?

    .

  • ?

    ?

    ,

    ?

    16, .

    ,

    . ,

    :

    ,

    , ,

    .

    ,

    .

    ,

    ,

    .

    ,

    .

    ,

    , - .

    ,

    :

    .

    - .

    .

    . ,

    .

    .

    .

    . ,

    .

    . ,

    .

  • . ,

    .

    -

    .

    17,

    .

  • 3

    ,

    .

    . /, ,

    , , , -

    (service-oriented architecture, SOA).

    , , ,

    . ,

    .

    , , .

    , , ,

    .

    ? , ,

    , .

    .

    , .

    (Garlan) (Shaw) :

    . ,

    ,

    ,

    .

    (, ).

    , , ,

    .

  • [ (David Garlan) (Mary Shaw), 1994, CMU-CS-94-166, An

    Introduction to Software Architecture ( )

    http://www.cs.cmu.edu/afs/cs/project/able/ftp/intro_softarch/intro_softarch.pdf]

    .

    . , , ..

    , . ,

    / n- .

    .

    .

    - (SOA),

    /, N-, 3-

    (Domain Driven Design)

    , -,

    ,

    , .

    ,

    .

    /

    / ,

    .

    ,

    .

    ,

    .

    4

    - ,

    -

    .

    ().

    ,

    4 -

    (. ).

  • ,

    ,

    ,

    .

    N- / 3- ,

    ,

    .

    - ,

    ,

    .

    -

    (SOA)

    ,

    .

    , ,

    . , SOA-, ,

    -

    .

    -,

    .

    - .

    3- ,

    . ,

    .

    ( ), Model-View-Controller (MVC)5.

    SOA -

    .

    , ,

    .

    /

    ,

    . -

    ,

    .

    5 -- (. ).

  • .

    ,

    , . ,

    ,

    .

    / / ,

    . /,

    2- ,

    .

    /

    UI, ,

    -,

    . ,

    / ,

    (, UI),

    .

    , .

    .

    / -

    , ;

    Microsoft Windows,

    ; , (

    , FTP- );

    (

    ).

    / :

    --.

    .

    ,

    .

    .

    .

    (Peer-to-Peer, P2P) . --

    , P2P

    .

    /, ,

    ,

    .

    . ,

    ,

  • .

    , ,

    , Terminal Services ( ).

    /:

    . ,

    , .

    . ,

    ,

    .

    .

    , .

    , (,

    ).

    /,

    ; -, -;

    -, ;

    .

    /, , ,

    , ,

    .

    , 2- /

    , -

    ,

    , ,

    . /

    3- ( N-), ,

    , 2- /,

    .

    .

    , , ,

    . ,

    - ,

    , .

  • ,

    :

    . ,

    .

    .

    .

    .

    .

    . , ,

    , .

    .

    .

    . ,

    ,

    .

    .

    . ,

    .

    (

    ), ,

    , ,

    .

    , ,

    (just-in-time, JIT) (

    ); ,

    ,

    .

    , .

    .

    (component object

    model, COM) (distributed

    component object model, DCOM) Windows,

    (Common Object Request Broker Architecture, CORBA) Java (Enterprise

    JavaBeans, EJB) .

    ,

    , , .

    ,

    . Microsoft .NET Framework

    . ,

  • - ,

    , .NET Framework.

    .NET Framework.

    .

    :

    .

    ,

    .

    .

    .

    .

    ,

    .

    .

    .

    .

    .

    , , ,

    , ,

    .

    ,

    ,

    Dependency Injection ( ) Service Locator ( ).

    ,

    .

    ,

    ;

    ,

    , ,

    ; ,

    .

    ,

    .

    (Domain Driven Design, DDD) -

    , ,

    , .

    , ,

  • , .

    ,

    .

    DDD ,

    , .

    . ,

    , .

    DDD ,

    .

    ,

    ;

    .

    .

    , -

    . DDD

    , . ,

    , ,

    .

    , ,

    .

    , DDD.

    , DDD ,

    , ,

    .

    DDD :

    .

    ,

    .

    . ,

    .

    .

    , .

    DDD ,

    ,

    ,

  • . DDD

    , ,

    .

    Domain

    Driven Design Quickly ( , )

    http://www.infoq.com/minibooks/domain-driven-design-quickly.

    (Eric Evans) Domain-Driven Design: Tackling Complexity in the Heart of

    Software ( :

    ) (Addison-Wesley, ISBN: 0-321-12521-5) (Jimmy Nilsson)

    DDD (, ISBN 978-5-8459-1296-1, 0-321-

    26820-2).

    6

    , , .

    .

    , .

    ,

    , , .

    ,

    ,

    .

    ,

    .

    .

    ( )

    (n-),

    . ,

    - (, UI), -

    ( -) (,

    ,

    ). n-

    N- / 3- .

    :

    . ,

    .

    6 (layer) (tier) .

    ,

    (. ).

  • . -

    , ,

    .

    .

    . , ,

    , - , ,

    ,

    .

    .

    ,

    , .

    .

    .

    .

    .

    - (line-of-business,

    LOB), ; -

    - ; -

    -.

    . ,

    Separated Presentation ( ) ,

    UI, , -

    , .

    UI , .

    . Separated Presentation:

    . Separated Presentation

    UI ; , MVC :

    (Model), (View) (Controller).

    (, , -);

    UI; ,

    .

    . Observer ()

    ,

    .

    . ,

    UI .

  • Separated Presentation Passive View

    ( ) Supervising Presenter ( ),

    Supervising Controller ( ).

    Separated Presentation :

    .

    .

    .

    . ,

    .

    .

    , .

    .

    , .

    .

    . , MVC

    .

    .

    ,

    . Separated Presentation

    ,

    , , .

    ,

    ,

    ; , -

    ;

    ,

    . ,

    ,

    / - .

    Separated Presentation,

    UI

    UI . ,

    UI

    -.

  • ,

    ,

    , , ,

    . ,

    (

    ) . ,

    , ,

    Publish/Subscribe (/) , Message

    Queuing ( ). ,

    . :

    .

    , .

    .

    ,

    .

    .

    ,

    .

    .

    , ,

    , , Microsoft .NET

    Java.

    . ,

    ,

    . :

    (Enterprise Service Bus, ESB). ESB

    ,

    . ESB

    , ,

    .

    - (Internet Service Bus, ISB).

    , , .

    ISB

    (Uniform Resource Identifiers, URIs) ,

    .

    , , :

  • .

    .

    . ,

    , .

    . , ,

    -

    , .

    .

    , ,

    ,

    , .

    .

    .

    . ,

    ,

    ,

    .

    ,

    ,

    , .

    ,

    , .

    N- / 3- N- 3- ,

    ,

    ,

    , .

    - , ,

    , .

    N-

    , ,

    , ,

    . , ,

    . N- ,

    n+1 , n-1 (

    ), .

    .

  • N- ,

    .

    .

    ,

    .

    N-/3-

    - . -

    , -

    .

    , ,

    - .

    N-/3- :

    . ,

    , .

    . ,

    .

    .

    , .

    . ,

    ,

    .

    N- 3- ,

    ,

    ,

    . ,

    , - . N-

    3- ,

    -

    .

    , ,

    ; -,

    - -

    . ,

    -

    , ,

    .

    - - ,

  • , ,

    . -

    ,

    . , ;

    / . -

    :

    . ,

    . ,

    ,

    , Get () Update ().

    ,

    .

    .

    .

    .

    . , ,

    , ,

    .

    . ,

    , ,

    .

    ,

    .

    . ,

    , ,

    .

    .

    , .

    ,

    .

    - ,

    , ,

    ( ).

    ,

    - .

    .

    - :

  • .

    , .

    .

    .

    . .

    . , ,

    ,

    ,

    .

    .

    ,

    .

    - ,

    ,

    . - ,

    ,

    , -,

    .

    - - (Service-oriented architecture, SOA)

    , . ,

    , ,

    . SOA

    ,

    , .

    SOA- .

    SOA- - ,

    .

    , , .

    SOA :

    . , ,

    .

    . ,

    , .

  • .

    , ,

    .

    , .

    , .

    . , ,

    , , .

    -

    , ( -

    ),

    ,

    .

    SOA- :

    .

    -,

    .

    . ,

    , .

    . ,

    .

    .

    ,

    .

    . ,

    .

    SOA-, ,

    ; ,

    ; ,

    UI; + (Software plus Services,

    S+S), (Software as a Service, SaaS) .

    SOA- ,

    , , ,

    , ,

    , .

  • http://www.microsoft.com/architectureguide.

    Evans, Eric. Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley,

    2004.

    Nilsson, Jimmy. Applying Domain-Driven Design and Patterns: With Examples in C# and NET.

    Addison-Wesley, 2006.

    :

    An Introduction To Domain-Driven Design (

    ) http://msdn.microsoft.com/en-

    us/magazine/dd419654.aspx.

    Domain Driven Design and Development in Practice (

    ) http://www.infoq.com/articles/ddd-

    in-practice.

    Fear Those Tiers ( ) http://msdn.microsoft.com/en-

    us/library/cc168629.aspx.

    Layered Versus Client-Server (

    -) http://msdn.microsoft.com/en-us/library/bb421529.aspx.

    Message Bus ( ) http://msdn.microsoft.com/en-

    us/library/ms978583.aspx.

    Microsoft Enterprise Service Bus (ESB) Guidance ( Microsoft Enterprise

    Service Bus (ESB)) http://www.microsoft.com/biztalk/solutions/soa/esb.mspx.

    Separated Presentation ( )

    http://martinfowler.com/eaaDev/SeparatedPresentation.html.

    Services Fabric: Fine Fabrics for New-Era Systems (:

    ) http://msdn.microsoft.com/en-us/library/cc168621.aspx.

  • 4

    ,

    .

    , ,

    , , ,

    .

    ,

    . , ,

    .

    ,

    , , ,

    .

    .

    , ,

    .

    ,

    , ,

    .

    , , .

    ,

    . .

    , ,

    .

    ,

    , ( ,

    , , ), ,

    .

  • , , ,

    , ,

    . ,

    ,

    , , . 1.

    . 3

    , , :

    1. .

    .

    : ,

    .

    2. . , ,

    ,

    .

    3. . ,

    , ,

    ,

    .

  • 4. .

    . ,

    .

    5. .

    , .

    ,

    , .

    .

    ,

    , , ,

    1. ,

    ,

    ,

    .

    , ,

    , ,

    ( )

    .

    , .

    .

    . ,

    , .

    .

    ,

    , , .

    :

    . ,

    . ,

    : ,

    1 Architecture Frame ,

    ,

    .

    http://blogs.msdn.com/jmeier/archive/2008/09/22/architecture-frame.aspx (.

    ).

  • .

    . ,

    ,

    , - .

    ,

    .

    .

    , .

    ,

    .

    ,

    . ,

    ,

    . ,

    ,

    .

    :

    .

    .

    .

    .

    .

    . ,

    ,

    , , ,

    .

    , .

    - ,

    ,

    .

  • (use case)

    (

    , ).

    , .

    , .

    , ( . 1 1,

    ?).

    .

    ,

    :

    .

    ( ).

    .

    .

    , ,

    ()

    ( ).

    , .

    .

    .

    ,

    .

    :

    - (Business Critical). ,

    , ,

    .

    (High Impact).

    , , ,

    .

    Create, Read,

    Update, Delete (CRUD).

  • .

    ,

    ,

    . What is

    a Use Case? ( ?)

    http://searchsoftwarequality.techtarget.com/sDefinition/0,,sid92_gci334062,00.html.

    ,

    - .

    .

    :

    ,

    , .

    , ,

    , ,

    , .

    ,

    .

    ,

    , .

    , .

    ,

    .

    :

    1. . , ,

    . , ,

    -, , - ?

    20,

    .

    2. .

    , ,

    .

    ,

    .

  • (Quality-of-Service, QoS),

    . - -

    .

    ,

    .

    19, .

    3. . ,

    .

    . ,

    .

    , ,

    , , ,

    .

    .

    -

    (Service Oriented Architecture, SOA), /, ,

    .

    .

    3, .

    4. . ,

    ,

    .

    ,

    .

    , , ..

    Microsoft

    .

    ,

    ,

    . ,

    , ,

    Microsoft:

    .

    , .NET Compact

    Framework, ASP.NET Silverlight .

    .

    UI, ,

  • Windows Presentation

    Foundation (WPF), Windows Forms XAML Browser Application (XBAP)1.

    - (RIA).

    UI -

    Silverlight Silverlight AJAX.

    -. - ASP.NET

    WebForms2, AJAX, Silverlight, ASP.NET MVC ASP.NET Dynamic Data3.

    . ,

    ,

    Windows Communication Foundation (WCF) ASP.NET Web services

    (ASMX)4.

    :

    Microsoft

    , .

    , , ,

    ,

    . , .

    , , .

    , ,

    .

    1 XAML (. ).

    2 - ASP.NET (. ).

    3 ASP.NET (. ).

    4 - ASP.NET (. ).

  • . 4

    -

    ,

    .

    ,

    , .

    -.

    , ?,

    ?, -

    ? ?.

    , , , (

    ) .

    ,

    , .

    , ,

    , ,

    , .

    , ,

    ,

    .

    . , - (line-of-

    business, LOB) , ,

    , .

  • ,

    LOB-.

    ,

    , .

    , ,

    .

    ,

    :

    . ,

    .

    . ,

    , ,

    , , , ,

    .

    . , ,

    , ,

    .

    . .

    ,

    , 16, .

    , ,

    . , ,

    . :

    .

    ,

    .

    . , ,

    ,

    .

    . ,

    ,

    .

    . ,

    , ,

    .

  • .

    .

    . ,

    , ,

    .

    . , ;

    , , ;

    ;

    ;

    .

    , ,

    17, .

    ,

    .

    , , ,

    .

    , , ,

    , .

    .

    .

    :

    . , ?

    ? ,

    . ,

    .

    . ? ,

    ,

    , .

    . ? ,

    .

    . ?

    ? ?

    ? ,

    .

    . ( )?

    ()? ,

  • ?

    .

    . ?

    ?

    ?

    ?

    ?

    ? ,

    .

    . ,

    ?

    ?

    , ?

    ,

    .

    .

    ?

    ? ,

    ,

    , .

    .

    ?

    .

    . , . 3 ,

    -.

  • . 5

    -.

    ,

    .

    .

    .

    , ,

    , .

    .

    , .

    , .

    , ,

    , ,

    .

    ,

    ,

    ,

    . , ,

    , .

  • ,

    .

    ,

    ,

    .

    , :

    ?

    ,

    ?

    ?

    ?

    , ?

    ?

    (architectural spike)

    .

    ,

    .

    ,

    .

    ,

    .

    ? ,

    .

    :

    ,

    . ,

    , , ,

    , .

    . ,

  • .

    .

    ,

    .

    ,

    ,

    . :

    . ,

    , ,

    , .

    ,

    . ,

    , .

    .

    .

    :

    (Software Architecture Analysis Method, SAAM).

    SAAM ,

    ,

    , , ,

    .

    (Architecture Tradeoff Analysis

    Method, ATAM). ATAM SAAM,

    ,

    .

    (Active Design Review, ADR). ADR

    ,

    . ,

    , .

    (Active Reviews of Intermediate

    Designs, ARID). ARID ADR ,

    , ATAM

  • SAAM

    .

    (Cost Benefit Analysis Method, CBAM). CBAM

    ,

    .

    (Architecture Level Modifiability

    Analysis, ALMA). ALMA

    - (business information systems, BIS).

    (Family Architecture Assessment Method,

    FAAM). FAAM

    .

    (Paul Clements), (Rick Kazman) (Mark Klein) Evaluating Software

    Architectures: Methods and Case Studies (SEI Series in Software Engineering) (

    : ( SEI ))

    (Addison-Wesley Professional , ISBN-10: 020170482X, ISBN-13: 978-0201704822).

    ,

    , .

    , ,

    , .

    .

    , , .

    :

    4+1. .

    :

    (, ),

    (, ),

    ( )

    .

    .

    Architectural BlueprintsThe 4+1 View Model of Software Architecture

    ( '4+1')

    http://www.cs.ubc.ca/~gregor/teaching/papers/4+1view-architecture.pdf.

    . ,

    . , ,

    .

    .

  • :

    (J. Wiley, ISBN-10: 0471202827, ISBN-13: 978-0471202820; , ISBN 5-

    94723-545-5, 0-471-20282-7).

    IEEE 1471. IEEE 1471 ,

    ANSI/IEEE 1471-2000, , ,

    , .

    Recommended Practice for Architecture

    Description of Software-Intensive Systems (

    )

    http://standards.ieee.org/reading/ieee/std_public/description/se/1471-2000_desc.html.

    (Unified Modeling Language, UML).

    .

    (

    , );

    (, , ,

    ); (

    ,

    , ).

    UML, :

    (Addison-Wesley Professional,

    ISBN-10: 0321193687, ISBN-13: 978-0321193681; -, ISBN 5-93286-060-X).

    . :

    . J. Wiley, 2002.

    Paul Clements, Rick Kazman, and Mark Klein. Evaluating Software Architectures: Methods and Case

    Studies (SEI Series in Software Engineering). Addison-Wesley Professional, 2001.

    . UML, :

    , 2003.

  • ,

    12, ,

    , -, .

    :

    5

    6

    7 -

    8

    9

    , .

    ,

    .

    , .

    :

    10

    11

    12 -

    13 -

    14

    15

    ,

    , ,

    , . , ,

    , , ,

    . ,

    12 (layer) (tier) ,

    , .

    , , ,

    (. ).

  • . :

    16

    17

    , ,

    .

    ,

    , .

    18, .

    , ,

    , ,

    .

    ,

    ,

    . 19, .

  • 5

    ,

    .

    . , .

    , ,

    . ,

    .

    . (Layers)

    , (tiers)

    , ,

    . , ,

    (, , ), ,

    .

    ( ) .

    , ,

    , , n-.

    19, .

    ,

    ,

    ( ),

    . .

    , ,

  • , .

    , ,

    .

    , ,

    . ,

    , ,

    .

    , -

    ,

    . . 1

    , ,

    , - , ,

    -, ,

    , .

    . 6

    .

    , .

    .

    . 1, .

    , . 1, :

  • .

    ,

    , , , ,

    -, -.

    6,

    .

    -1.

    -. ,

    ,

    . -

    7, -.

    - 12,

    -.

    . ,

    , , .

    .

    , -

    . 8,

    .

    15,

    .

    , ,

    , .

    .

    , ,

    , - .

    , .

    , ,

    .

    ,

    , ,

    , -

    (. 2). ,

    .

    1 - (. ).

  • . 2

    , - ,

    -,

    . ,

    -

    .

    ,

    .

    -

    . .

    - , .

    9,

    . 18,

    .

    , ,

    .

  • ,

    . , ,

    . ,

    . ,

    ,

    ,

    .

    :

    1

    2

    3

    4

    5

    6

    7

    8

    9

    1

    , .

    , .

    .

    ( ) ,

    , .

    .

    ,

    .

    , ,

    .

    . ,

    .

    ,

    ,

    .

  • ,

    .

    , ( ),

    , ,

    ,

    .

    ,

    , , .

    .

    .

    ,

    , .

    ,

    , ,

    . ,

    , ;

    . ,

    , ,

    ,

    , .

    .

    2

    .

    -

    , , - .

    ,

    .

    .

    ,

    , . ,

    , ,

    , , -

    .

    3

    ,

    .

  • , , -

    .

    -

    -

    ,

    - ,

    .

    , UI

    , -

    -

    .

    - , .

    , ,

    ,

    -.

    , , ,

    .

    -,

    / .

    .

    4

    . , ,

    -

    , - .

    , - ,

    -

    - .

    .

    , . ,

    .

    - ,

    .

    .

    5

    ,

    .

    . ,

  • , .

    , ,

    :

    . ,

    ,

    .

    .

    .

    .

    , .

    , .

    ,

    ,

    . ,

    ,

    ;

    ,

    .

    .

    , .

    , . ,

    .

    ,

    (, ),

    , ,

    , .

    6

    , ,

    .

    . , ,

    .

    .

    .

    ,

    , , .

    ,

  • ,

    .

    , ,

    Enterprise Library patterns & practices, Aspect Oriented

    Programming (AOP)1,

    .

    17, .

    7

    . , ,

    . ,

    ,

    . .

    . ,

    :

    .

    ,

    . ,

    . ,

    ( mock-

    ), .

    .

    , .

    , ,

    . , Table Data Gateway ,

    SQL-,

    . , ,

    SQL- ,

    .

    , .

    , Table Data Gateway,

    . ,

    .

    2. ,

    .

    , . Dependency Injection

    1 - (. ).

    2 Dependency Inversion Principle (DIP, ) (.

    ).

  • .

    Dependency Injection ,

    , ,

    .

    , ,

    . ,

    .

    .

    .

    , Windows Communication Foundation,

    - Microsoft Message Queuing,

    .

    ,

    .

    ,

    , .

    , , ,

    ,

    .

    -

    -,

    ,

    .

    ,

    ,

    , .

    -

    - . -

    ( ,

    - ),

    .

    8

    ,

    , .

    ,

    . ,

    , ,

    .

    19, .

  • 9

    , ,

    , .

    .

    ,

    .

    , ,

    ,

    . 18,

    .

  • 6

    .

    ,

    ,

    .

    , ,

    .

    ,

    , . ,

    , ,

    . . 1

    .

  • . 7

    ,

    :

    .

    ,

    .

    . ,

    . Separated

    Presentation :

    (Presenter), (Presentation Model)

    (View Model).

    (Presentation Layer Model),

    -,

    (Presentation Entity), - ,

    .

    , ,

    10, .

    11, .

  • .

    ,

    :

    .

    .

    , () , -

    - (rich Internet application, RIA).

    ,

    , , .

    ,

    20, .

    UI.

    .

    ,

    .

    , ,

    , .

    . (

    )

    , . ,

    ,

    Separated Presentation, , ,

    , .

    , MVC, MVP Supervising Presenter,

    RIA.

    Model-View-Controller (MVC) Model-View-Presenter (MVP)

    -.

    . UI

    ,

    . ,

    ,

    .

    - , UI

    . -

    -

    , - -.

    11,

    .

    .

  • UI, , ,

    .

    UI,

    , ,

    , UI, ,

    .

    . , ,

    . ,

    , ,

    .

    , .

    .

    ,

    :

    UI.

    ,

    .

    :

    , , .

    -,

    , . -

    , Microsoft SQL Server, ,

  • , Memcached

    Danga Interactive Velocity1

    Microsoft. ,

    ,

    .

    . ,

    , .

    ,

    .

    .

    , .

    , . ,

    ,

    .

    .

    , ,

    , .

    ,

    .

    17,

    .

    , .

    :

    ,

    UI Windows

    Forms WPF. AJAX

    ASP.NET.

    .

    .

    UI

    .

    1 2009 Windows Server AppFabric (.

    ).

  • ,

    - , , ,

    ( ) (

    ).

    , ,

    ,

    (

    UI).

    ,

    .

    , ,

    ,

    . UI

    .

    ,

    ,

    .

    ,

    . UI

    :

    . ,

    .

    ,

    .

    . , Template

    View ( ) -,

    .

    ,

    , , Composite View (

    )

    . ,

    , .

    ,

    ,

    .

    ,

    .

  • , Publish/Subscribe.

    .

    ,

    (, ).

    , , ,

    .

    :

    , ,

    , , .

    , , .

    , , -

    (, ),

    .

    ,

    , . ,

    ,

    , , .

    -. -

    .

    (,

    ),

    ,

    .

    , ,

    .

    .

    17,

    .

    ,

    ,

    UI.

    ,

  • .

    :

    ,

    , UI.

    ,

    .

    .

    Command ().

    .

    , ,

    . , ,

    ,

    ,

    . ,

    UI , , .

    , , ,

    ,

    UI.

    :

    .

    ,

    UI, .

    .

    ,

    .

    ,

    .

    , , UI,

    UI.

    , ,

    .

  • .

    ,

    .

    ,

    .

    ,

    UI: . UI

    , ,

    .

    :

    Separated Presentation, MVP,

    .

    UI

    UI,

    .

    .

    ;

    , ;

    .

    (,

    ),

    .

    .

    ; ,

    .

    , -

    .

    , ,

    ,

    . ,

    , UI,

    .

    -

  • (Cascading Style Sheets, CSS).

    .

    .

    -, .

    :

    ,

    - -.

    - ,

    -

    .

    .

    , ,

    .

    ,

    . -, ,

    , ,

    .

    ,

    . ,

    ,

    .

    17,

    .

    Microsoft. ,

    .

    :

    Microsoft Windows Compact Framework

    ,

  • ,

    Microsoft Windows Mobile.

    ,

    Wireless Application Protocol (WAP)1, compact

    HTML (cHTML) ,

    ASP.NET .

    :

    Windows Presentation Foundation (WPF).

    , -

    Windows, XAML Browser Applications (XBAP)2.

    ,

    , Microsoft

    Office Business Application (OBA)3.

    Windows Forms.

    Windows Forms

    patterns & practices Smart Client Software Factory.

    WPF

    :

    patterns

    & practices Composite Client Application Guidance (

    ).

    , ,

    , Presentation Model (Model-

    View-ViewModel), Model-View-

    Controller (MVC),

    UI. ,

    (DataTemplate)

    . (View)

    1 (. ).

    2 XAML (. ).

    3 - Microsoft Office (. ).

  • (Presenter) (View Model)

    WPF Commands.

    -

    - (Rich Internet Application, RIA)

    :

    ,

    ,

    ,

    Silverlight.

    Silverlight,

    :

    Presentation Model (Model-

    View-ViewModel), .

    ,

    ,

    patterns & practices Composite Client Application

    Guidance.

    -

    - :

    , -

    , ASP.NET.

    ASP.NET,

    :

    ,

    UI .

    AJAX ASP.NET Web Forms

    .

    , Silverlight ASP.NET.

    -

    ASP.NET MVC Framework.

    model-view-controller

    -.

  • patterns & practices, Smart Client Software Factory Composite Client

    Application Guidance, patterns &

    practices .

    :

    ,

    ,

    . ,

    ,

    .

    - , ,

    .

    -

    .

    .

    ,

    , . ,

    , .

    ,

    . ,

    .

    , ,

    .

    -

    .

    .

    ,

    , ,

    .

    .

    ViewState ASP.NET ,

    , ,

    . ,

    .

  • .

    ,

    .

    1. . ,

    .

    ,

    , , .

    , ,

    20, .

    2. .

    UI UI,

    .

    , , ,

    . ,

    , ,

    .

    3. . , UI

    , ,

    .

    , Presentation Model, MVC MVP.

    , , ,

    , UI, .

    11,

    .

    4. .

    .

    . ,

    17,

    .

    5. -. -,

    .

    , -

    . ;

    :

    UI. , -

    ,

    UI. -, ,

    UI .

  • -. ,

    -,

    UI, -

    ,

    UI.

    . ,

    - ,

    - .

    - ,

    .

    -. ,

    ,

    , -

    -, Microsoft BizTalk Server.

    6. .

    , -,

    .

    - .

    - ,

    .

    :

    . ,

    ,

    , .

    -. -,

    - , -

    ,

    . -

    , WCF-,

    TCP. -

    , WCF-

    , HTTP. -

    ,

    WCF .

    18,

    .

  • .

    .

    Cache Dependency ( ).

    , .

    Page Cache ( ). -

    , ,

    .

    Composite View ( ).

    .

    Presentation Model (Model-View-ViewModel).

    Model-View-Controller (MVC),

    UI,

    (View) , , ,

    .

    Template View ( ).

    .

    Transform View ( ).

    , , HTML

    UI.

    Two-Step View ( ).

    -

    ,

    .

    Exception Shielding ( ).

    .

    Application Controller ( ).

    .

    Front Controller ( ). ,

    -,

    .

    Page Controller ( ).

    -.

    Command ().

    .

    Asynchronous Callback ( ).

    ,

    ,

    .

    Chain of Responsibility ( ).

  • ,

    .

    Page Cache Enterprise Solution Patterns Using

    Microsoft .NET ( Microsoft .NET)

    http://msdn.microsoft.com/en-us/library/ms998469.aspx.

    Application Controller, Front Controller, Page Controller, Template View,

    Transform View Two-Step View

    . Addison-Wesley, 2002.

    http://martinfowler.com/eaaCatalog.

    Composite View Presentation Model

    Patterns in the Composite Application Library ( )

    http://msdn.microsoft.com/en-us/library/dd458924.aspx.

    Chain of Responsibility Patterns in Practice

    ( ) http://msdn.microsoft.com/en-us/magazine/cc546578.aspx.

    Command 5, , ,

    , -

    . . , 2007.

    Asynchronous Callback Creating a Simplified

    Asynchronous Call Pattern for Windows Forms Applications (

    Windows Forms)

    http://msdn.microsoft.com/en-us/library/ms996483.aspx.

    Exception Shielding Entity Translator

    Useful Patterns for Services ( )

    http://msdn.microsoft.com/en-us/library/cc304800.aspx.

    patterns & practices Microsoft patterns & practices

    :

    Composite Client Application Guidance http://msdn.microsoft.com/en-

    us/library/cc707819.aspx.

    Smart Client Software Factory http://msdn.microsoft.com/en-

    us/library/aa480482.aspx.

    Web Client Software Factory http://msdn.microsoft.com/en-

    us/library/bb264518.aspx.

  • http://www.microsoft.com/architectureguide.

    Choosing the Right Presentation Layer Architecture (

    ) http://msdn.microsoft.com/en-

    us/library/aa480039.aspx.

    memcached

    http://www.danga.com/memcached/.

    Microsoft Inductive User Interface Guidelines ( Microsoft Inductive

    User Interface) http://msdn.microsoft.com/en-us/library/ms997506.aspx.

    Microsoft Project Code Named Velocity ( Microsoft

    Velocity) http://msdn.microsoft.com/en-us/data/cc655792.aspx.

    User Interface Text Guidelines (

    ) http://msdn.microsoft.com/en-

    us/library/bb158574.aspx.

    Design and Implementation Guidelines for Web Clients (

    -)

    http://msdn.microsoft.com/en-us/library/ms978631.aspx.

    Web Presentation Patterns ( )

    http://msdn.microsoft.com/en-us/library/ms998516.aspx.

  • 7 -

    -

    . , -

    ,

    -.

    , ,

    . . 1 -

    .

    . 8

    - ,

    - :

  • .

    -,

    - , -.

    ,

    - .

    -. -, ,

    , ,

    ; -

    .

    , -

    . -

    :

    -. , UI

    -,

    -

    . - ,

    . -

    -

    -.

    -,

    .

    - 14,

    .

    -. -,

    -, - ,

    ,

    (Customers) (Orders).

    ; - ;

    -

    . -

    , ; -

    , -

    . -

    13, -.

    , -, 10,

    .

    - 12,

    -.

  • -

    . ,

    -, - -

    .

    ,

    . -

    :

    -.

    -,

    .

    - ( ).

    -.

    , -,

    . -

    -, ,

    . - ,

    , - .

    - . -

    -

    , -

    -.

    -, -

    .

    -.

    - ,

    , ,

    ,

    . ,

    (Data Transfer Objects, DTO).

    . -

    .

    , ,

    . -

    -.

    5,

    .

  • , .

    .

    ,

    :

    ,

    -

    ,

    , , ,

    .

    :

    -,

    ,

    . -

    ,

    ID .

    - ,

    ,

    .

    ,

    .

    -

    (access control list, ACL) ,

    . -

    ACL ,

    .

    , ,

    , .

    ,

  • .

    (

    ),

    .

    -

    ,

    , ,

    .

    :

    , ,

    , .

    ,

    .

    -,

    ,

    , , , , .

    ,

    . ,

    , .

    -

    .

    , , , ,

    .

    -

    .

    ,

    .

    , .

    ,

    .

    :

  • , -

    , . ,

    ,

    ,

    .

    .

    -

    .

    .

    , -

    -.

    ,

    .

    17,

    .

    -,

    .

    .

    :

    . - ,

    ( ),

    ( , -

    ).

    .

    ,

    ,

    , ( ).

    5,

    .

    ,

    - .

    .

    ,

    . -

    -.

  • -

    .

    -

    ,

    , (Denial of Service, DoS)

    . ,

    ,

    .

    :

    , ,

    . , ,

    null.

    -

    .

    . ,

    ,

    . ,

    .

    , , -

    (, ),

    .

    ,

    .

    17,

    .

    ,

    ,

    -

    , ,

    .

    .

    ,

    , .

  • , .

    ,

    .

    :

    ,

    -.

    Enterprise Library patterns & practices

    ,

    Apache (Apache Logging Services) log4Net NLog

    (Jarosaw Kowalski).

    -

    -.

    - .

    ,

    -.

    -.

    -

    , ,

    -,

    . ,

    , (cross-site scripting, XSS),

    SQL-,

    .

    . , ,

    , .

    :

    -,

    .

    ,

    .

    , . ,

    , .

    , , .

  • -

    .

    - :

    -

    ,

    .

    .

    -,

    TCP.

    Internet Protocol Security (IPSec)1

    , .

    Secure Sockets Layer (SSL)2

    - -.

    - -

    : -, -

    -.

    -.

    -:

    1. - . ,

    -: ,

    . -.

    -,

    .

    ,

    .

    2. -.

    -.

    -,

    . ,

    -,

    , .

    12, -.

    3. -. -

    -, . -

    1 - (. ).

    2 (. ).

  • , .

    , -

    .

    13, -.

    4. . ,

    .

    .

    ,

    . 14,

    .

    10,

    .

    -

    .

    .

    - Application Faade ( ).

    .

    Chain of Responsibility ( ).

    ,

    .

    Command ().

    .

    - Domain Model ( ). -

    ,

    .

    Entity Translator ( ). ,

    -

    .

    Table Module ( ). ,

    -

    .

    Data-Driven Workflow ( ).

    , ,

    .

    Human Workflow ( , ).

    , , .

    Sequential Workflow ( ).

    , ,

  • ,

    .

    State-Driven Workflow (

    ). , ,

    .

    Faade 4, ,

    , , -

    . . , 2007.

    Chain of Responsibility Patterns in Practice

    http://msdn.microsoft.com/en-us/magazine/cc546578.aspx.

    Command 5, , ,

    , -

    . . , 2007.

    Entity Translator Useful Patterns for Services

    ( ) http://msdn.microsoft.com/en-

    us/library/cc304800.aspx.

    Data-Driven Workflow, Human Workflow, Sequential Workflow State-

    Driven Workflow Windows Workflow Foundation Overview (

    Windows Workflow Foundation) http://msdn.microsoft.com/en-

    us/library/ms734631.aspx Workflow Patterns ( )

    http://www.workflowpatterns.com/.

    patterns & practices Microsoft patterns & practices

    :

    Enterprise Library http://msdn.microsoft.com/en-us/library/cc467894.aspx.

    Unity ( )

    http://msdn.microsoft.com/en-us/library/dd203101.aspx.

    http://www.microsoft.com/architectureguide.

    - Integration Patterns

    ( ) http://msdn.microsoft.com/en-us/library/ms978729.aspx.

    Apache (Apache Logging Services) log4Net

    http://logging.apache.org/log4net/index.html.

    NLog http://www.nlog-

    project.org/introduction.html.

  • 8

    . ,

    ,

    . ,

    , . . 1

    .

  • . 9

    ,

    :

    . ,

    .

    ,

    .

    ,

    , .

    , -

    (Object/Relational Mapping, O/RM),

    , ,

    .

    . - ,

    ,

    .

    ,

    , ,

    ,

    , , .

  • , ,

    10, .

    15,

    .

    ,

    -

    .

    :

    .

    , , ,

    .

    .

    ,

    .

    .

    ,

    , ,

    . ,

    ,

    .

    5,

    .

    .

    . ,

    .

    ,

    , (Typed DataSet)

    XML, .

    .

    ,

    . ,

    ,

    .

    Domain Model Table Module -

    (Object/Relational Mapping, O/RM), , -

  • 22.

    -

    -

    . Domain Model Table Module

    . -

    13, -.

    .

    (Data Transfer

    Objects, DTO), .

    , DTO

    ,

    . DTO -

    . Table Data Gateway

    Active Record DataTable

    ( ).

    , .

    , .

    ,

    .

    . 15,

    .

    , ,

    . (

    , ) ,

    CRUD (Create, Read, Update Delete). ,

    ,

    ,

    .

    .

    ,

    . ,

    ,

    ,

    ,

    .

    ,

    22 (.

    ).

  • , .

    ,

    SQL-.

    .

    .

    .

    .

    . ,

    , ,

    . ,

    ,

    .

    , .

    .

    ,

    :

    -

    SQL

    XML

    . .

  • .

    ,

    .

    :

    .

    .

    .

    DataReader ( )

    .

    .

    ,

    .

    ,

    BLOB (Binary Large Object). BLOB ,

    , , ,

    . BLOB-, ,

    . BLOB-

    ,

    . BLOB-

    :

    BLOB- .

    BLOB-,

    ,

    ,

    . , , , BLOB

    , .

    BLOB-

    .

    BLOB-,

    ,

    BLOB-.

    BLOB -

    .

  • . .

    ,

    , .

    ,

    :

    .

    .

    .

    ;

    .

    Data Source Name (DSN)23.

    ,

    ,

    .

    , ,

    ,

    . 15,

    .

    .

    -.

    :

    XML

    ,

    .

    DataSet

    , CRUD.

    ,

    . ,

    , -,

    23 (. ).

  • (Data Transfer Objects, DTOs),

    , .

    15,

    .

    10, .

    ,

    .

    ,

    . ,

    .

    ,

    .

    :

    ,

    . ,

    . ,

    , ,

    .

    . ,

    ,

    . ,

    .

    , ,

    .

    , , -

    (, ),

    .

    ,

    .

    -

    - ()

    ,

    . , -, ,

  • .

    , ,

    .

    , Repository, -

    (Object/Relational Mapping, O/RM).

    (Domain Driven Design),

    , .

    3,

    , 13, -.

    -

    :

    , -

    (O/RM)

    . O/RM ,

    ,

    .

    ,

    24, O/RM

    ,

    ,

    .

    , 25,

    O/RM

    .

    O/RM, , Repository.

    Repository

    , .

    -

    ,

    .

    .

    ,

    ,

    .

    24 greenfield (. ).

    25 brownfield (. ).

  • .

    CRUD- .

    ,

    .

    :

    SQL- ,

    SQL-.

    .

    , Query Object ( )

    , ADO.NET.

    .

    SQL- -

    , SQL-,

    .

    SQL-26.

    SQL-

    ( ).

    ,

    .

    .

    SQL-.

    SQL . ,

    , .

    , .

    :

    .

    XML-

    26 SQL , SQL ,

    (. ).

  • .

    ;

    .

    ,

    SQL . ,

    SQL

    , .

    . ,

    , ,

    .

    ,

    .

    SQL

    SQL , ,

    SQL-, ,

    SQL, .

    SQL ,

    . ,

    .

    ,

    ,

    . ,

    , ,

    ,

    ( ,

    ).

    SQL- ,

    , , .

    O/RM ,

    , .

    SQL,

    :

    -

    SQL .

    ,

    . ,

    :

    O/RM.

  • ,

    .

    .

    .

    ,

    , .

    O/RM.

    SQL-

    ,

    .

    , -

    .

    Query Object Repository. O/RM-

    - .

    , .

    ,

    , .

    .

    SQL.

    ,

    ,

    . ,

    ,

    . ()

    , .

    ,

    .

    .

    , .

    , ,

    .

    .

    :

  • .

    ,

    . , ,

    ,

    . Microsoft SQL

    Server SQL- (

    ).

    ,

    .

    ,

    .

    ,

    .

    , ,

    .

    .

    , .

    ,

    , .

    System.Transactions

    ,

    TransactionScope ( )

    System.Transactions. ,

    , , , ,

    .

    .

    ,

    .

    ,

    (multiple

    active result sets, MARS),

    . MARS

    .

    . ,

    ,

  • . ,

    .

    :

    ,

    . NULL

    .

    .

    , ,

    SQL, ,

    SQL-.

    .

    17,

    .

    XML

    (Extensible Markup Language, XML)

    .

    XML

    . XML,

    , ,

    : , ,

    . XML

    :

    XML-

    XML27, XML-.

    , ,

    , DataSet ADO.NET.

    XML

    .

    XML

    , XML.

    XML.

    , .

    XML , .

    . , XML-

    , (

    ).

    27 , XML DOM (. ).

  • :

    ,

    ADO.NET .

    , Data Access Application Block (

    ) Enterprise Library. Enterprise Library

    F, Enterprise Library patterns & practices.

    -,

    , ASP.NET

    Dynamic Data ( ASP.NET).

    XML-,

    System.Xml Linq to XML

    (XLinq).

    ASP.NET

    DataReader ,

    .

    DataReader ,

    ,

    .

    SQL Server

    SqlClient ADO.NET, .

    SQL Server 2008 FILESTREAM,

    BLOB-.

    - -

    Domain Model O/RM-, ADO.NET Entity

    Framework NHibernate (

    ).

    15,

    . , Microsoft,

    , .

    ,

    .

  • .

    :

    ,

    , .

    .

    , .

    ,

    .

    ,

    .

    .

    ,

    , .

    DataReader ,

    .

    .

    .

    , .

    :

    SQL Server Windows

    .

    19,

    .

    ,

    DSN.

    ,

    .

    ,

    .

    SQL- ,

    SQL-

    .

  • .

    :

    ,

    -,

    .

    ,

    TCP.

    ,

    .

    ,

    ,

    , ,

    .

    .

    .

    :

    1. . ,

    , greenfield brownfield, , ,

    . ,

    , ,

    .

    greenfield

    , .

    .

    brownfield

    , ,

    , , ,

    .

    . , ,

    , . ,

    ,

    . ,

  • : -

    , .

    ,

    - ,

    .

    2. .

    . ,

    ,

    . -

    ,

    .

    , -

    , 13, -.

    :

    , CRUD-,

    DataSet DataTable.

    ADO.NET.

    , ADO.NET.

    LINQ to Datasets

    DataSet LINQ.

    , XML.

    , -.

    , O/RM

    . ADO.NET

    Entity Framework O/RM-,

    NHibernate.

    , ,

    .

    , ,

    ,

    .

    ,

    .

    -. , -

    SQL Server, ,

  • , -,

    SQL .

    3. . ,

    ,

    , .

    Microsoft ,

    .

    4. .

    , ,

    . ,

    . , .

    , , Table Data Gateway, Query Object,

    Repository . 15,

    .

    5. .

    . -

    , . ,

    .

    , ,

    ,

    . -,

    , .

    .

    .

    Active Record ( ).

    .

    Data Mapper ( ).

    ,

    , .

    Data Transfer Object ( ). ,

    , ,

    .

    Domain Model ( ). -,

    .

    Query Object ( ). , .

    Repository (). ,

    .

  • Row Data Gateway ( ). ,

    .

    Table Data Gateway ( ). ,

    , , .

    Table Module ( ). , -

    .

    Parallel Processing ( ).

    , .

    Partitioning (). ,

    .

    Capture Transaction Details ( ).

    , , ,

    .

    Coarse Grained Lock ( ).

    .

    Implicit Lock ( ).

    , .

    Optimistic Offline Lock ( ).

    , , ,

    .

    Pessimistic Offline Lock ( ).

    ,

    .

    Transaction Script ( ). -

    ,

    .

    Domain Model, Table Module, Coarse-Grained Lock, Implicit Lock,

    Transaction Script, Active Record, Data Mapper, Data Transfer Object, Optimistic Offline Locking,

    Pessimistic Offline Locking, Query Object, Repository, Row Data Gateway Table Data Gateway

    . , 2007. http://martinfowler.com/eaaCatalog/.

    Capture Transaction Details Data Patterns

    ( ) http://msdn.microsoft.com/en-us/library/ms998446.aspx.

    http://www.microsoft.com/architectureguide.

    .NET Data Access Architecture Guide (

    .NET) http://msdn.microsoft.com/en-us/library/ms978510.aspx.

    Concurrency Control ( )

    http://msdn.microsoft.com/en-us/library/ms978457.aspx.

    Data Patterns http://msdn.microsoft.com/en-us/library/ms998446.aspx.

  • Designing Data Tier Components and Passing Data Through Tiers (

    )

    http://msdn.microsoft.com/en-us/library/ms978496.aspx.

    Typing, storage, reading, and writing BLOBs (, , BLOB-

    ) http://msdn.microsoft.com/en-

    us/library/ms978510.aspx#daag_handlingblobs.

    Using stored procedures instead of SQL statements (

    SQL-) http://msdn.microsoft.com/en-

    us/library/ms978510.aspx.

    NHibernate Forge http://nhforge.org/Default.aspx.

  • 9

    . ,

    , ,

    , .

    ,

    .

    (

    ). , , ,

    -,

    . , , -

    .

    -,

    - .

    . 1 .

  • . 10

    :

    . ,

    . ,

    -,

    ( , -).

    .

    , .

    ,

    .

    , ,

    10, .

    18, .

    .

    ,

    . ,

  • . , :

    , , ,

    , ,

    . , ,

    , , , ,

    , , ,

    . ,

    .

    :

    , ,

    .

    .

    . ,

    , .

    , ,

    , ,

    ,

    .

    .

    ,

    . ,

    , ,

    .

    , , ,

    ,

    .

    ,

    .

    .

    ,

    .

    .

    , ,

    , .

    , ,

    .

    18,

    .

    .

    ,

  • .

    , -.

    .

    , ,

    .

    . ,

    .

    , ,

    . 17,

    .

    ().

    , Receiver Replay Protection,

    , ,

    .

    , ,

    ().

    , , ,

    .

    ,

    . .

    ,

    :

  • , , ,

    18,

    .

    .

    ,

    , , ,

    .

    ,

    ,

    , .

    .

    , Secure Sockets Layer (SSL). SOAP-

    ,

    WS* (Web Services Security, Web Services Trust Web

    Services Secure Conversation).

    ,

    .

    , ,

    ,

    . ,

    , , .

    :

    ,

    . ,

    .

    ,

    .

  • Windows URL /

    .

    , -

    .

    ,

    .

    , ,

    : - , ,

    .

    .

    ,

    , ,

    , Message Queuing.

    ,

    Transmission Control Protocol (TCP)1,

    . ,

    Hypertext Transfer Protocol (HTTP)2.

    URL

    . , URL

    , ,

    Universal Discovery Description and Integration (UDDI)3.

    .

    ,

    , (Denial of Service, DoS)

    . ,

    ,

    .

    1 (. ).

    2 (. ).

    3 , (. ).

  • .

    ,

    , .

    :

    , , ,

    .

    -.

    SOAP Fault ()

    .

    ,

    .

    17,

    .

    .

    ,

    , Windows Communication Foundation (WCF). ,

    ,

    .

    :

    , Channel Adapter,

    Messaging Bus Messaging Bridge,

    .

    .

    ,

    , .

    .

    , ,

    .

    , ,

    . .

    , ,

    .

    :

  • , Command, Document,

    Event Request-Reply, .

    .

    . ,

    .

    ,

    .

    .

    .

    :

    ,

    Gateway, Mapper, Competing Consumers Message Dispatcher,

    .

    ,

    .

    .

    ,

    . ,

    ,

    .

    .

    .

    ,

    .

    . ,

    . ,

    .

    .

    (IPSec SSL) ( ).

    :

  • .

    , ,

    ,

    , .

    ,

    .

    , ,

    , , IPSec SSL.

    ,

    ,

    , .

    , ,

    , .

    ,

    .

    . : , .

    .

    .

    .

    :

    , Aggregator, Content-

    Based Router, Dynamic Router Message Filter,

    .

    ().

    ,

    , . ,

    . ,

    .

    ,

    , .

  • , .

    , , ;

    , ,

    .

    :

    .

    .

    ,

    Canonical Data Mapper, Envelope Wrapper Normalizer.

    Canonical Data Mapper .

    .

    .

    , .

    , ,

    .

    , . ,

    .

    . ,

    ,

    .

    :

    .

    , -

    . -,

    , .

    - .

    .

    .

    .

  • .

    ,

    , ,

    .

    , ,

    , .

    :

    ,

    .

    , ,

    . , , .

    .

    Message Validation ( )

    http://msdn.microsoft.com/en-us/library/cc949065.aspx Input/Data

    Validation ( /) http://msdn.microsoft.com/en-

    us/library/cc949061.aspx.

    REST SOAP Representational State Transfer (REST)1 SOAP

    . , REST ,

    HTTP. REST

    , REST

    HTTP. SOAP XML ,

    , HTTP.

    .

    ;

    , .

    SOAP

    ,

    .

    REST , ,

    URI (HTTP-).

    . REST -,

    HTTP -XML MIME-

    . REST-

    1 (. ).

  • URI ,

    -.

    REST, SOAP,

    REST ,

    . SOAP

    ,

    . SOAP HTTP.

    WS-*, SOAP, ,

    ,

    , , , .

    REST ,

    ,

    .

    , SOAP

    , REST- .

    ( ) .

    SOAP .

    REST ,

    HTTP. REST SOAP :

    SOAP , ,

    . RPC-

    1, XML-

    .

    SOAP , ,

    , , SOAP.

    REST , ,

    JavaScript Object Notation (JSON)2, Atom

    Plain Old XML (POX)3.

    REST ,

    .

    HTTP- , GET

    PUT. REST ,

    , ,

    ,

    .

    1 (. ).

    2 JavaScript (. ).

    3 XML (. ).

  • REST

    REST

    . , ,

    URI, HTTP.

    REST-

    ,

    .

    .

    REST

    . ,

    http://www.contoso.com/employee/ .

    http://www.contoso.com/employee/smithah01 ID

    .

    . , , XML, Atom

    JSON, ,

    (,

    http://www.contoso.com/example.atom http://www.contoso.com/example.json).

    . , GET POST

    GET. POST

    URI.

    ( -)

    . , ,

    , ,

    , .

    SOAP

    SOAP ,

    . ,

    . ,

    , . ,

    , .

    XML-, . SOAP-

    :

    , ,

    .

    Exception Handling in Service Oriented

    Applications ( - )

    http://msdn.microsoft.com/en-us/library/cc304819.aspx.

  • , ; ,

    ; ,

    .

    .

    Improving Web Services Security: Scenarios

    and Implementation Guidance for WCF ( -:

    WCF)

    http://msdn.microsoft.com/en-us/library/cc949034.aspx.

    .

    .

    REST SOAP 25,

    .

    :

    ASP.NET Web services (ASMX),

    -, Microsoft Internet Information Services

    (IIS).

    WCF, ,

    ,

    , ,

    .

    ASMX

    , Web Service

    Extensions (WSE)1. , ,

    WSE WCF.

    WCF :

    HTTP- SOAP

    -WCF -Windows .

    TCP

    Windows,

    .

    , WCF-,

    .

    1 - (. ).

  • , , ,

    .

    , , ,

    , .

    18,

    .

    , .

    ,

    -,

    -.

    :

    ,

    -,

    .

    ,

    .

    ,

    TCP.

    , HTTP

    19,

    .

    ,

    , . Contract First

    Design (- ).

    ,

    - -.