Next Generation LOB (Line of Business) Applications

Preview:

DESCRIPTION

A presentation that explores what the next generation of LOB (Line Of Business) applications might look like, through five characteristics.

Citation preview

Next Generation

Line of Business (LOB) Applications

Simon Guest

Senior Director, Technical Strategy

Microsoft Corporation

IntroductionMy First LOB Application

IntroductionMy First LOB Application

Back to 1994

IntroductionMy First LOB Application

My First LOB Application

IntroductionMy First LOB Application

IntroductionMy First LOB Application

What would happen if I tried to write

this today?

IntroductionDefining a LOB Application

IntroductionDefining a LOB Application

Wikipedia: A line-of-business application is one of the

set of critical computer applications that are vital to

running an enterprise

IntroductionDefining a LOB Application

The following 5 characteristics:

IntroductionDefining a LOB Application

Interactive: LOB Applications are interactive by nature.

Data is entered, and results/reports are returned.

IntroductionDefining a LOB Application

Composable: LOB applications tend to have one or

more parts that compose the user interface. These parts

may interact with each other as needed.

IntroductionDefining a LOB Application

Data Driven: LOB applications are data intensive. Many

live “close” to the database, and access frequently.

IntroductionDefining a LOB Application

Integrated: LOB applications often integrate with other

systems. These can be a variety of data feeds, either

within or outside the organization.

IntroductionDefining a LOB Application

Extensible: LOB applications are extensible by nature.

They often support add-ons or plug-ins used to tailor an

application or make deployment easier.

Session ObjectivesWhat are you going to get from this session?

Session ObjectivesWhat are you going to get from this session?

Explore each characteristic to help

you apply to your own application

Give you the details of what’s new

in each of these areas

Show through demos how we are

supporting these new features

InteractiveEntering data and getting results

InteractiveEntering data and getting results

“How do I get this TAB order working?”

Back to 1994

InteractiveEntering data and getting results

Better forms, many controls, better

output, great reporting solutions, voice

command, etc.

Since then...

InteractiveEntering data and getting results

What am I excited about now?

NUI (Natural User Input),

specifically touch

How about now?

InteractiveEntering data and getting results

Is touch going to replace the mouse

and keyboard?

InteractiveEntering data and getting results

Touch augments the Windows

experience. Every input method has it’s

pros and cons – no input method is

ideal for everything.

InteractiveEntering data and getting results

Are we really seeing devices that

support touch?

InteractiveEntering data and getting results

Device Availability

HP TouchSmart IQ504 PC(Intel Core 2 Duo T5750)

DELL Latitude XT2(Intel Core 2 Duo SU9400)

InteractiveEntering data and getting results

Is touch supported in Windows 7?

InteractiveEntering data and getting results

Gesture GestureAction Action Single

TouchMulti

Touch

Press and Tap Press on target, tap with other finger Yes

Zoom Two fingers apart/together Yes

Rotate Two fingers in opposing direction Yes

Two Finger Tap Tap two fingers Yes

Press and Hold Wait for blue ring and release Yes Yes

Flicks Quick drag gestures Yes Yes

InteractiveEntering data and getting results

What you get for freePanning and Zooming, Right Click Gestures

InteractiveEntering data and getting results

Minimal Incremental WorkUse WM_GESTURE Win32 API to trap gesture

notifications, handle pan, zoom, and rotate

InteractiveEntering data and getting results

Best ExperienceUse WM_TOUCH Win32 API to handle raw touch data,

manipulation, and inertia processors

InteractiveEntering data and getting results

Does this relate to “Surface”?

InteractiveEntering data and getting results

Windows 7(Multi-Touch API)

NativeWin32

Application

Managed WrapperAnd Interop WPF 3.5 SP1

Windows FormsApplication

WPFApplication

SurfaceHardware

WPF 3.5

Surface SDKMulti-Touch Controls

SurfaceApplication

InteractiveEntering data and getting results

NativeWin32

Application

Managed WrapperAnd Interop

WPF 4.0Multi-Touch Controls

Windows FormsApplication

WPFApplication

Surface SDKSpecific Controls

SurfaceApplication

Windows 7(Multi-Touch API)

SurfaceHardware

InteractiveEntering data and getting results

How about other input mechanisms?

InteractiveEntering data and getting results

Many other sensors exist today – but

can be difficult…

InteractiveEntering data and getting results

e.g. to use a GPS, your application has

to be device specific

InteractiveEntering data and getting results

How is this supported?

InteractiveEntering data and getting results

Windows 7 Sensor and Location

Platform

InteractiveEntering data and getting results

Sensor Type Sensor Placement Typical Use

GPS Built into, or attached to, computer Location and orientation

Accelerometer Built into computer or attached to computer Motion and orientation

Proximity Built in or nearby to the computer Presence and spatial awareness

Light Built in, nearby, or remote Ambient light conditions

RFID Built into the computer or attached to person Identification of physical items

Compass Attached to person Orientation

Camera Built into the computer or attached Recording, object identification, facial recognition

Microphone Built into the computer or attached Ambient noise conditions

Temperature Built into the computer or remote Indoor/Outdoor Ambient Temperature, cooking temperature

Moisture Remote Detection of water leaks, garden sprinkler systems

Motion Detector Built into the computer or remote Security systems, presense

Traffic Remote, usually public Travel time predictions

Weather station Remote, usually public Weather conditions and predictions

InteractiveEntering data and getting results

Single API call to answer questions –

e.g. “Where am I?”

InteractiveEntering data and getting results

How does this work?

InteractiveEntering data and getting results

Your Application

Sensor Class Extension

UMDF Sensor Driver

Sensor API

Location API

Sensor Class Extension

UMDF Sensor Driver

InteractiveEntering data and getting results

That covers input, but how about

“getting stuff out”?

InteractiveEntering data and getting results

Vendor Examples of Controls Offered Link

Actipro WPF Studio Ribbon, Bar Code, Wizard, DateTime, Calendar, Transition, Color Selection, Transition Effects Library

http://www.actiprosoftware.com

Blendables Zoombox, ElementSnapshot, Carousel, ChromelessWindow, DragAndDrop, Pie Chart, OS Check, Timeline Panel

http://www.blendables.com

ComponentOne Schedule, Month Calendar, Chart, Grid http://www.componentone.com

DevComponents Office UI, Window Management http://devcomponents.com

Divelements Office UI, Window Management http://divelements.com/

Infragistics Carousel, DataPresenter, Grid, Masked Edit, DateTimeEdit, CurrencyEdit, NumericEdit, CheckEdit, TextEdit, ThemePacks, Chart

http://www.infragistics.com

Mindscape PropertyGrid, TextBoxes, DropDownPickers http://www.mindscape.com.nz

NeoDynamic BarCode http://www.neodynamic.com

Orbifold Diagraming tool http://www.orbifold.com

SoftwareFx Charting http://www.softwarefx.com

SyncFusion Docking, Office UI, GroupBar, Charting http://www.syncfusion.com

Telerik RADControls Suite (Calendar, Carousels, Gauges, etc.) http://www.telerik.com

Xceed Datagrid http://www.xceed.com

InteractiveEntering data and getting results

Name Type Link

iTextSharp Generate PDF files on the fly http://csharp-source.net/open-source/pdf-libraries/itextsharp

Report.NET PDF document creation from ADO.NET data source http://csharp-source.net/open-source/pdf-libraries/report.net

PDF Sharp PDF creation including GDI+ like drawing routines http://csharp-source.net/open-source/pdf-libraries/pdfsharp

SharpPDF PDF creation for .NET 1.1 http://csharp-source.net/open-source/pdf-libraries/sharppdf

PDFjet Dynamic PDF generation from Java or .NET http://csharp-source.net/open-source/pdf-libraries/pdfjet-open-source-edition

ASP.NET FO PDF Similar to ASP.NET Server Controls, written in C# http://csharp-source.net/open-source/pdf-libraries/asp.net-fo-pdf

PDF Clown C# 2.0 library for reading, writing PDF files http://csharp-source.net/open-source/pdf-libraries/pdf-clown

InteractiveEntering data and getting results

But, what if I want to create Office

documents?

InteractiveEntering data and getting results

“Old way” is to use the

Application Object Model

InteractiveEntering data and getting results

…but:

Need local copy of Office installed on server…Does not scale…

Try running automation on 100s of documents…Dialog boxes “stop” automation…

Have to reboot application on server every X hours…

InteractiveEntering data and getting results

Open XML SDK 2.0

InteractiveEntering data and getting results

How does the Open XML SDK work?

InteractiveEntering data and getting results

MyDoc.docx

Users see a single file

Developers see azip file with XML parts

File Container

Document properties

Comments

WordML/SpreadsheetML/etc.

Custom Defined XML

Images, video, sounds

Styles

Charts

InteractiveEntering data and getting results

Demo - Using OpenXML SDK to read/write Word Documents

InteractiveEntering data and getting results

Talking about speeding things up…

How about the processor?

InteractiveEntering data and getting results

Intel Developer Forum, Spring 2004 - Pat Gelsinger

Pow

er D

ensi

ty (

W/c

m2)

1

10

100

1,000

10,000

‘70 ‘80 ‘90 ‘00 ‘10

8008

8080

8086

286

386

486

Hot Plate

Nuclear Reactor

Rocket Nozzle

Sun’s Surface

InteractiveEntering data and getting results

Isn’t developing parallel applications

difficult?

InteractiveEntering data and getting results

Getting easier, especially with

.NET 4.0 and Visual Studio 2010

InteractiveEntering data and getting results

Operating System

Threads

Thread Pool(Task Scheduler and Resource Manager)

Concurrency Runtime

Task Parallel Library

PLINQ

Parallel Debugger

ProfilerConcurrency

Analysis

InteractiveEntering data and getting results

PLINQData Partitioning, Operator Types, Merging

Task Parallel LibraryLoop replacements, Imperative Task Parallelism, Scheduling

Concurrency RuntimeThread-safe Collections, Synchronization Types, Coordination Types

InteractiveEntering data and getting results

Demo - Running the Open SDK across multiple cores

InteractiveEntering data and getting results

What do we take away from this

section?

InteractiveTakeaways

NUI is, and will, enhance LOB

applications

Getting results and reports is

becoming easier

Taking advantage of multi-core is

within reach

ComposableDesigning and composing the user interface

ComposableDesigning and composing the user interface

With my old application, testing was

“giving the application to the user”

Back to 1994

ComposableDesigning and composing the user interface

Increased focus on test driven

development (TDD) and unit testing

Since then...

ComposableDesigning and composing the user interface

What am I excited about now?

A renewed effort on making UIs more

composable and testable

How about now?

ComposableDesigning and composing the user interface

Hasn’t it been difficult to test the UI?

ComposableDesigning and composing the user interface

Patterns, such as MVC, help address

these concerns

ComposableDesigning and composing the user interface

But what should I use?

MVC, MVP, PM, MVVM?

ComposableDesigning and composing the user interface

MVC - Designed to separate concerns

for request/response type UIs

ComposableDesigning and composing the user interface

Model

View

ControllerPlease add a new customer…

Add a new customer to the model

Triggers update of the view

ControllerReloadsView

MVC (Model View Controller)

ComposableDesigning and composing the user interface

MVC is a great pattern for Web

Applications

ComposableDesigning and composing the user interface

ModelAdd a new customer

to the model

View

Reads number of customers

ControllerReloadsView

MVC (Model View Controller)

ControllerPlease add a new customer…

http://localhost/customer/add (POST)

“Done - you now have 20 customers”

ComposableDesigning and composing the user interface

ASP.NET MVC

Does not use ViewState or Server Based Forms

Extendable Front Controller pattern

Project Support for TDD

ComposableDesigning and composing the user interface

ASP.NET Web Forms

ViewState to persist state across many components

Page Controller Pattern

Less complex, but more difficult to test

ComposableDesigning and composing the user interface

Windows applications are less about

request/response, and more interactive

ComposableDesigning and composing the user interface

ModelPresenterView

Request FromView

MVP (Model View Presenter)

Please add a new customer…

PresenterUpdatesModel

ModelConfirmsChange

PresenterUpdates

View

ComposableDesigning and composing the user interface

Modified version of MVP (Fowler) to

handle data binding and code behind

ComposableDesigning and composing the user interface

PM (PresentationModel)

ViewPlease add a new customer…

PresentationModel

Request FromView

Model

PresenterUpdatesModel

ModelConfirmsChange

DataBinding

ComposableDesigning and composing the user interface

MVP and PM are patterns that can be

used with Windows Forms, WPF, and

Silverlight

ComposableDesigning and composing the user interface

PM (PresentationModel)

PresentationModel

Request FromView

Model

PresenterUpdatesModel

ModelConfirmsChange

DataBinding

ViewPlease add a new customer…

Fill out fields and click on “Add” button

Data Driven field for # of customersnow in system

ComposableDesigning and composing the user interface

However, XAML also supports any item

to be data bound to any other item in

either direction

ComposableDesigning and composing the user interface

ObjectXAML

Events in XAML bound to objects (vs. having code behind)

e.g. button binds to object.add()

Objects bind to XAML visual elements

e.g. object.customername binds to XAML Editbox

ComposableDesigning and composing the user interface

ModelViewModelViewPlease add a new customer…

DataBinding

MVVM (Model View ViewModel)

ViewModelUpdatesModel

ModelConfirmsChange

ComposableDesigning and composing the user interface

MVVM can be realized in WPF and

Silverlight through PRISM

ComposableDesigning and composing the user interface

Host

ShellPresenterRegion

Shell

Modules

View ViewModel

Model

ModuleShared Styles / Themes

Styles / Themes

Valid

atio

n

ComposableDesigning and composing the user interface

You mention WPF and Silverlight?

What’s new when it comes to LOB

applications?

ComposableDesigning and composing the user interface

WPF 4.0

Windows 7 Support MultiTouch, Taskbar, DWrite

Fundamentals Full trust XBAP, text rendering, data binding for DynamicObject,

WPF Ribbon controls

Design ExperienceImproved in Visual Studio and lessons learned from implementing

Visual Studio in WPF

ComposableDesigning and composing the user interface

Silverlight 3.0

RIA Productivity

Improved controls, SEO enhancements, accessibility

Out of Browser

Both Win and Mac, isolated storage, auto update

Design Tooling

Expression Blend, SketchFlow, TFS integration, sample

data

ComposableDesigning and composing the user interface

What do we take away from this

section?

ComposableTakeaways

Put some time in learning MVC, MVP,

PM, MVVM

MVVM can be implemented in

Silverlight and WPF using PRISM

New features such as Silverlight

OOB for LOB applications

Data DrivenObject relational mapping and exposing across tiers

Data DrivenObject relational mapping and exposing across tiers

Accessing data was Direct SQL into a

Dbase/Paradox DB

Back to 1994

Data DrivenObject relational mapping and exposing across tiers

A million different ORMs, DALs, DTOs,

and other ways to access data

Since then...

Data DrivenObject relational mapping and exposing across tiers

What am I excited about now?

Data Access becoming a more integral

part of the application

How about now?

Data DrivenObject relational mapping and exposing across tiers

What do you mean “integral”?

Data DrivenObject relational mapping and exposing across tiers

LinqToSQL (a.k.a. L2S)

Data DrivenObject relational mapping and exposing across tiers

Objects(Classes) Database

GenerateIEnumerable

ClassesUsing

Designer

TakeExistingSchema

Data DrivenObject relational mapping and exposing across tiers

DataClasses1DataContext ctx = new DataClasses1DataContext();

var customerNames = from c in ctx.Customersselect c.ContactName;

foreach (string name in customerNames){…}

Data DrivenObject relational mapping and exposing across tiers

DataClasses1DataContext ctx = new DataClasses1DataContext();

var customerNames = from c in ctx.Customerswhere c.ContactName.StartsWith(“A”)select c.ContactName;

foreach (string name in customerNames){…}

Data DrivenObject relational mapping and exposing across tiers

DataClasses1DataContext ctx = new DataClasses1DataContext();

var customerNames = from c in ctx.Customerswhere c.ContactName.StartsWith(“A”)orderby c.ContactNameselect c.ContactName;

foreach (string name in customerNames){…}

Data DrivenObject relational mapping and exposing across tiers

DataClasses1DataContext ctx = new DataClasses1DataContext();

var customerNames = (from c in ctx.Customerswhere c.ContactName.StartsWith(“A”)orderby c.ContactNameselect c.ContactName).Take(5);

foreach (string name in customerNames){…}

Data DrivenObject relational mapping and exposing across tiers

Entity Framework

(introduced in .NET 3.5 SP1)

Data DrivenObject relational mapping and exposing across tiers

Model(EDMX) Database

Objects(Classes)

GenerateModelFrom

Database

GenerateObjectsFromModel

TakeExistingSchema

Database First Entity Creation

Data DrivenObject relational mapping and exposing across tiers

Wasn’t there some

“constructive feedback” on EF?

Data DrivenObject relational mapping and exposing across tiers

What did we hear?

Persistence Ignorance

N-Tier

Developer Friction

Data DrivenObject relational mapping and exposing across tiers

New for EF 4.0

Automatic Pluralization

Based on API

T4 Template Generation

Instead of CodeDom

3 Ways of Thinking of ORM

Database first, model first, code only

Data DrivenObject relational mapping and exposing across tiers

Objects(Classes)

GenerateObjectsFromModel

Database First Entity Creation

Model(EDMX)

GenerateModelFrom

Database

Database

TakeExistingSchema

Start Here!

Data DrivenObject relational mapping and exposing across tiers

Objects(Classes)

GenerateObjectsFromModel

Database

GenerateSchemaFromModel

Model First Entity Creation

Model(EDMX)

CreateModelUsing

Designer

Start Here!

Data DrivenObject relational mapping and exposing across tiers

Model(EDMX)

CreateModelFrom

Objects

Database

GenerateSchemaFromModel

Code Only Entity Creation

Objects(Classes)

WriteObjects

Start Here!

Data DrivenObject relational mapping and exposing across tiers

Demo - Code First Approach in EF 4.0

Data DrivenObject relational mapping and exposing across tiers

I understand, but how do I pass that

data across tiers?

Data DrivenObject relational mapping and exposing across tiers

ADO.NET Data Services

(formerly known as Astoria)

Data DrivenObject relational mapping and exposing across tiers

Model

REST endpoint exposed over model

ADO.NET Data Services

ATOM/JSON consumer Your Application …

Database

Data DrivenObject relational mapping and exposing across tiers

Great for exposing data models to a

variety of clients

Data DrivenObject relational mapping and exposing across tiers

I’m fed up of writing plumbing code.

What’s new here?

Data DrivenObject relational mapping and exposing across tiers

.NET RIA Services

Data DrivenObject relational mapping and exposing across tiers

Goal: To boost productivity for

developers looking to build RIA

applications

Data DrivenObject relational mapping and exposing across tiers

Model

.NET RIA Services

Expose Data Across Tier

Your Silverlight Application

Database

Consume Data Across Tier

Is this the most productiveuse of your time?

Data DrivenObject relational mapping and exposing across tiers

Single solution to remove effort to

write an n-tier application.

Object lifecycle, data validation,

authentication.

Data DrivenObject relational mapping and exposing across tiers

Demo - .NET RIA Services

Data DrivenObject relational mapping and exposing across tiers

What do we take away from this

section?

Data DrivenTakeaways

Is your LOB application truly data

driven? Is data access integral?

How are you exposing data across

an n-tier application?

What frameworks exist that help

abstract the “plumbing” for this?

IntegratedGetting my application to talk nicely with others

IntegratedGetting my application to talk nicely with others

“Integration” was an RS-232 serial port

to a MPR, into a VMS system!

Back to 1994

IntegratedGetting my application to talk nicely with others

…and no need to consider external

access!

Back to 1994

IntegratedGetting my application to talk nicely with others

RMI, CORBA, DCOM, .NET Remoting,

Web Services, BizTalk Adapters, ESBs,

Sharepoint’s BDC

Since then...

IntegratedGetting my application to talk nicely with others

What am I excited about now?

Everything coming together in WCF 4.0

How about now?

IntegratedGetting my application to talk nicely with others

Wait a minute! WCF is so

complicated!

What’s new that will make life easier?

IntegratedGetting my application to talk nicely with others

Default Endpoints

IntegratedGetting my application to talk nicely with others

ServiceHost host = new ServiceHost(typeof(MyService), new Uri(“http://localhost:8080/myservice”));host.AddDefaultEndpoints();host.Open();

IntegratedGetting my application to talk nicely with others

Easier Hosting in ASP.NET

IntegratedGetting my application to talk nicely with others

[ServiceContract()]public class Service1{

[OperationContract()]public string SayHello(string name){

return String.Format("Hello {0}", name);}

}

IntegratedGetting my application to talk nicely with others

Discovery

IntegratedGetting my application to talk nicely with others

<service name=“HelloService”><endpoint binding=“wsHttpBinding” contract=“IHello”/><endpoint name=“udpDiscovery”

kind=“udpDiscoveryEndpoint”/></service>

IntegratedGetting my application to talk nicely with others

DiscoveryClient client = new DiscoveryClient(“udpDiscoveryEndpoint”);FindCriteria crtieria = new FindCriteria(typeof(IHello));FindResponse response = client.Find(criteria);

IntegratedGetting my application to talk nicely with others

Service Announcements

IntegratedGetting my application to talk nicely with others

<serviceDiscovery><announcementEndpoints>

<endpoint kind=“udpAnnouncementEndpoint”/></announcementEndpoints>

</serviceDiscovery>

IntegratedGetting my application to talk nicely with others

AnnouncementService service = new AnnouncementService();service.OnlineAnnouncementRecieved += OnOnlineEvent;service.OfflineAnnouncementRecieved += OnOfflineEvent;

static void OnOnlineEvent(object sender, AnnouncementEventArgs e)

{…}

IntegratedGetting my application to talk nicely with others

Managed Discovery

IntegratedGetting my application to talk nicely with others

DiscoveryProxyService

Service

Register Announcement

Service

Client

Probe Proxy Service(FindCriteria)

Call Service

IntegratedGetting my application to talk nicely with others

Content Based Routing

Fault Tolerant Routing

Improved REST Support

Better Integrated between WF and WCF

IntegratedGetting my application to talk nicely with others

Sounds great. How do I use WCF outside

the walls of the organization?

IntegratedGetting my application to talk nicely with others

.NET Service Bus

IntegratedGetting my application to talk nicely with others

Client Server

Company 1 Company 2Telco provided WAN

FTPClient

FTPServer

IntegratedGetting my application to talk nicely with others

Client Server

Company 1 Company 2Telco provided WAN

FTPClient

FTPServer

Internet

IntegratedGetting my application to talk nicely with others

Client Server

Company 1 Company 2Telco provided WAN

Browser

Internet

ExtranetSite

DMZ

IntegratedGetting my application to talk nicely with others

Client

Database

Client

Company 1

Company 2

Web Site

IntegratedGetting my application to talk nicely with others

Client

Client

Company 1

Company 2

Firewall

Firewall

Proxy?

DatabaseWeb Site

IntegratedGetting my application to talk nicely with others

Client

Client

Company 1

Company 2

Firewall

Firewall

NAT?

65.55.33.204

192.168.14.100

DatabaseWeb Site

IntegratedGetting my application to talk nicely with others

Client

Client

Company 1

Company 2

Firewall

Firewall192.168.14.100

OK, so I’ll do a HTTP poll every minute

65.55.33.204

DatabaseWeb Site

IntegratedGetting my application to talk nicely with others

Client

Client

Company 1

Company 2

Firewall

Firewall192.168.14.100

…and how about other protocols other than HTTP?

65.55.33.204

DatabaseWeb Site

IntegratedGetting my application to talk nicely with others

How does the .NET Service Bus help?

IntegratedGetting my application to talk nicely with others

Client

Outbound bi-directional socketKept alive in background

.NET Service Bus

sb://.../myqueue

Client

Company 1

Company 2

Firewall

IntegratedGetting my application to talk nicely with others

Client

Outbound bi-directional socketKept alive in background

.NET Service Bus

sb://.../myqueue

Client

Company 1

Company 2

Firewall

FirewallOutbound one-way socket

Message routedaccordingly

IntegratedGetting my application to talk nicely with others

Demo - Using .NET Service Bus

IntegratedGetting my application to talk nicely with others

What do we take away from this

section?

IntegratedTakeaways

WCF 4.0 provides an easier “on

ramp” compared to previous versions

Discovery and Service

Announcements in WCF

.NET Service Bus will open up new

application types

ExtensibilityExtending and deploying my application

ExtensibilityExtending and deploying my application

Adding functionality to my application

required a re-install.

Back to 1994

ExtensibilityExtending and deploying my application

…and deploying was a weekend’s worth

of overtime.

Back to 1994

ExtensibilityExtending and deploying my application

DI (Dependency Injection)

and IoC (Inversion of Control), different

ways to get bits to the box

Since then...

ExtensibilityExtending and deploying my application

What am I excited about now?

MEF and improvements to ClickOnce

How about now?

ExtensibilityExtending and deploying my application

What is MEF?

ExtensibilityExtending and deploying my application

MEF – Managed Extensibility

Framework

ExtensibilityExtending and deploying my application

Catalog

CatalogExportProviderCustomExportProvider MutableExportProvider

Composition Container

Part PartPart

ExportsImports

ExportsImports

ExportsImports

ExtensibilityExtending and deploying my application

What’s this look like in my app?

ExtensibilityExtending and deploying my application

public interface IMessageSender{

void Send(string message); }

Declare the interface for your extension

ExtensibilityExtending and deploying my application

[Export(typeof(IMessageSender))] public class EmailSender : IMessageSender{

public void Send(string message) {

Console.WriteLine(message); }

}

Add the Export attribute to your add-in

ExtensibilityExtending and deploying my application

private void Compose() {

var catalog = new AssemblyCatalog(Assembly.GetExecutingAssembly()); var container = new CompositionContainer(catalog); container.ComposeParts(this);

}

Create the container in your host application

ExtensibilityExtending and deploying my application

[Import]public IMessageSender MessageSender { get; set; }

Import the parts you are going to use

ExtensibilityExtending and deploying my application

Extensibility is easier, but isn’t

application deployment still painful?

ExtensibilityExtending and deploying my application

.NET Framework Size and Reboots

ExtensibilityExtending and deploying my application

.NET 4 Client: 28 MB X86 Client Profile, 48MB X86/X64 Full Profile

Size on media combined x86/x64 package

0

50

100

150

200

250

"2.0" "3.0" "3.5" "3.5SP1" "4.0 Full" "4.0 Client"

Size

in M

egab

ytes

ExtensibilityExtending and deploying my application

Brandable Experience

ExtensibilityExtending and deploying my application

Improved ClickOnce Experience

ExtensibilityExtending and deploying my application

Click Once Improvements

–Command-line arguments for CO deployed apps

– File associations for CO deployed apps

–Background Updates for CO apps

ExtensibilityExtending and deploying my application

Demo - Updating a ClickOnce Application

ExtensibilityExtending and deploying my application

What do we take away from this

section?

ExtensibilityTakeaways

MEF enables you to think about

extensibility from day one

Client requirements are becoming

less, and ClickOnce improving

Challenge the notion that

deployment is still hard

Call to ActionWhat’s next?

Call to ActionWhat’s next?

Look at your LOB applications using

the 5 characteristics

Don’t be afraid to challenge some

of your assumptions/decisions

Be excited about the potential

coming in the next wave!

simon.guest@microsoft.comhttp://simonguest.com

© 2009 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.

Recommended