37
Armen Ayvazyan, Antonin Jelinek and Nikola Malovic

_Web Client Software Factory

Embed Size (px)

Citation preview

Page 1: _Web Client Software Factory

Armen Ayvazyan, Antonin Jelinek and Nikola Malovic

Page 2: _Web Client Software Factory

Agenda

Page 3: _Web Client Software Factory

Introduction

We all work @ Monster

Armen Ayvazyan, software engineer http://blog.dotnetstyling.com

Antonin Jelinek, technical lead http://www.fc-bohemians.cz/

Nikola Malovic, solution architect http://blog.vuscode.com

Page 4: _Web Client Software Factory

What is WCSF?

Microsoft Patterns & Practice best practice and standards guidance for web applications

Synergic evolution of several P&P blocks: Composite AB User Interface Process AB Enterprise Library

It’s a factory Younger sister of SCSF (adopted by Dell)

Page 5: _Web Client Software Factory

What are WCSF assets?

Page 6: _Web Client Software Factory

What is WCSF?

Page 7: _Web Client Software Factory

Why to use it?

Value for Business: Common and consistent interface

reduced training costs Easy rollout of new functionality and

tasks Value from Architecture teams

Enables baseline architecture Create and distribute to developers

common development architecture Common appearance and behavior Modular approach

Page 8: _Web Client Software Factory

Why to use it?

Value for Development Teams: Great starting point - Iteration “0” – out of box Provides automation

Proven solution and project structure Integrate ASP NET site map, role manager and EntLib

security AB – out of box Creates test project Designer for page flow

Value for Operations Teams: Xcopy deployment; easy versioning across modules Module specific configuration files Consolidate number of common components Base service control from server side Common exception management system

Page 9: _Web Client Software Factory

Web client design patterns View – Presenter Application controller Service locator Dependency injection

Page 10: _Web Client Software Factory

View Presenter

Standard ASP. Net page MVP implementation

PagePage

UI related code

Business logic

View pageView pageUI related code

Presenter classPresenter classBusiness logic

IViewIView

Page 11: _Web Client Software Factory

Application controller

Work Item Centralize flow and

navigation

Page 12: _Web Client Software Factory

Presenter, View and Controller

Page 13: _Web Client Software Factory

Problem: Tight coupling

Page 14: _Web Client Software Factory

Service locator

Page 15: _Web Client Software Factory

Dependency injection

ObjectBuild

er

Service

ClassA

1

2 3

Page 16: _Web Client Software Factory

Application blocks

Composite Web AB Page Flow AB Object Builder

Page 17: _Web Client Software Factory

CWAB

Separation of concerns

Modularity Extensibility

Page 18: _Web Client Software Factory

CWAB Composition

Page 19: _Web Client Software Factory

CWAB Services

Page 20: _Web Client Software Factory

Page Flow AB

From

To

public void AttemptTransfer(decimal transferAmount){ if (transferAmount > MaxAmountWithoutApproval) { Response.Redirect("ApprovalRequired.aspx"); } Response.Redirect("Confirmation.aspx");}

public void AttemptTransfer(decimal transferAmount){ StorePageFlow.UserData["TransferAmount "] = transferAmount; StorePageFlow.Next(); }

Page 21: _Web Client Software Factory

Page Flow AB

StorePageFlow.Navigate("RegisterUser");

Page 22: _Web Client Software Factory

Guidance package

Page 23: _Web Client Software Factory

Available receipts

Page 24: _Web Client Software Factory

Install the Web Client Software factory

Download and run the Web Client Software Factory June 2007 Installer(http://download.microsoft.com/download/7/a/8/7a8d67ba-eac8-43f9-b00e-f74a25561c47/Web%20Client%20Software%20Factory%20-

%20June%202007.msi)

Page 25: _Web Client Software Factory

First step

Page 26: _Web Client Software Factory

Install WCSF dependencies

Page 27: _Web Client Software Factory

Install WCSF Source code

Page 28: _Web Client Software Factory

Modules in WCSF

What are modules? Encapsulates

busyness concerns

Type of modules Business Modules Foundational

Modules

Shell

Business modules have UI representation (“Products”, “Users”, etc)

Foundational modules extends functionality of web site (Logging, Search engine, etc)

Page 29: _Web Client Software Factory

Modules in WCSF

DEMO

Page 30: _Web Client Software Factory

Benefits of Modularity

Encapsulates business concern in one place

Enterprise development Reuse across multiple solutions Testability

Page 31: _Web Client Software Factory

Model View Presenter Pattern Architecture of Model View Presenter

pattern MVP is multiplatform solution

PresenterPresenterViewView

Page 32: _Web Client Software Factory

Model View Presenter PatternStandard ASP. Net page MVP implementation

PagePage

UI related code

Business logic

View pageView pageUI related code

Presenter classPresenter classBusiness logic

IViewIView

Page 33: _Web Client Software Factory

Model View Presenter

Example

Page 34: _Web Client Software Factory

View-Presenter in WCSF

Example

Page 35: _Web Client Software Factory

Benefits of MVP

Decouples business logic from UI Allows Unit Testing for UI Separates UX and Devs Reusability against different views Independence for designer

Page 36: _Web Client Software Factory

Bundles

Demo

Page 37: _Web Client Software Factory

Resources