DinnerNow.NET Architecture Walkthrough David Aiken DinnerNow Chef.

28
DinnerNow.NET Architecture Walkthrough David Aiken DinnerNow Chef

Transcript of DinnerNow.NET Architecture Walkthrough David Aiken DinnerNow Chef.

DinnerNow.NET

Architecture WalkthroughDavid Aiken

DinnerNow Chef

What is DinnerNow.NET?

It’s a DEMO

What is DinnerNow.NET?

DinnerNow is a fictitious marketplace where customers can order food from local restaurants for delivery to their home or office. This sample is designed to demonstrate how you can develop a connected application using several new Microsoft technologies.

The demo utilizes several technologies including: IIS7, ASP.NET Ajax Extensions, LINQ, Windows Communication Foundation, Windows Workflow Foundation, Windows Presentation Foundation, Windows PowerShell, and the .NET Compact Framework.

Some things are there…

…to solve a problem

…to show how to use technology

…it’s a DEMO

DinnerNow Goals

Show .net framework technologies

Show how to build distributed connected applications

Provide an End-to-End Scenario that is real enough, tackles real-world problems, and can be easily used

DinnerNow Deliverables

Each Release Contains99% Automated Setup from sourcecodeAll project solutions, unit tests, etc.Setup GuideWalkthrough Document

8 Hands On Labs based upon DinnerNow

DinnerNow History

Releases Target Framework/OS Combos

Vista/Framework 3.01.0 – Jan 31st 2007 (912 downloads)1.1 – Feb 2nd 2007 (9447 downloads)1.2 – Feb 20th 2007 (7979 downloads)1.3 – June 1st 2007 (6066 downloads)

DinnerNow History

Vista/Orcas Beta 11.0 - June 1st (3126 downloads)

Vista/Orcas Beta 22.0 – August 3rd (19078 downloads)

Vista/Server 2008/Visual Studio 20082.5 – Will RTM on Jan 31st 2008

Happy

Birthday

DinnerNow

Developing DinnerNow

Team EffortJames Conard (my boss), Nigel Watling,

Brett Hill, Matthew Winkler, Craig McMurtry, Ryan Dunn, David Aiken

Some development contracted out

NO there is not a DinnerNow team that just does DinnerNow

They all have real jobs too

Development Environment

DINNERNOW.NETEND-2-END

DEMO

DinnerNow Architecture

IIS 7

ASP.NET

WCF SVCS

WF SVCS

Web Browser

WPF Application

WM6

Ops Mgr 2007

MMC

PowerShell

Vista Sidebar Gadget

Events

Perf Counters

WMI

Perf Counters

SQL2K5MembershipDinnerNowDinnerNowWF

Getting it on YOUR machine

Automated build via WIX/Powershell

Dependency Checker Helps YOU get going

BUILD PROCESS & DEPENDENCY CHECKER

DEMO

Dependency Checker

Dependency Model

<dependency dependencyType="Software" value="Microsoft SQL Server 2005" enabled="true" optional="false" title="Microsoft SQL Server 2005 Express Edition" explination="Application Requires SQL" downloadUrl="http://www.microsoft.com/SQLServer" />

SoftwareRegistryServer RoleWMI QueryHotFix

Dependency Checker

DinnerNow Architecture

IIS 7

ASP.NET

WCF SVCS

WF SVCS

Web Browser

WPF Application

WM6

Ops Mgr 2007

MMC

PowerShell

Vista Sidebar Gadget

Events

Perf Counters

WMI

Perf Counters

SQL2K5MembershipDinnerNowDinnerNowWF

IIS 7

Web Stack

IIS 7

ASP.NET

WCF SVCS

WF SVCS

Web Browser

Vista Sidebar Gadget

Membership

JSONJavaScript Object Notation

CardSpace for User Authentication

DinnerNow

AJAXAsynchronous Javascript and XML

POXPlain Old XML HTTP Handler

Image Copyright Handler

RSSReally Simple Syndication

IIS Hosted WCF Services

Workflow Service

Services

DeliveryService

ProcessOrder

RestaurantOrderWorkflow

MenuSearchService

RestaurantQueryService

MenuSyndicationService

ASP.NET Web Application

ShoppingCartService

Service Configuration <system.serviceModel> <bindings> <webHttpBinding> <binding name="AjaxBinding"> <readerQuotas maxBytesPerRead="999999" /> <security mode="None"> </security> </binding> <binding name="AjaxSecureBinding"> <readerQuotas maxBytesPerRead="999999" /> <security mode="Transport"> <transport clientCredentialType="None" /> </security> </binding> </webHttpBinding> <wsHttpContextBinding> <binding name="WSHttpContextBinding_IUpdateOrder" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false" contextProtectionLevel="Sign"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Message"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" /> </security> </binding> <binding name="WSHttpContextBinding_IProcessOrder" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false" contextProtectionLevel="Sign"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Message"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" /> </security> </binding> </wsHttpContextBinding> </bindings> <client> <endpoint address="http://localhost/DinnerNow/service/OrderUpdateService.svc" binding="wsHttpContextBinding" bindingConfiguration="WSHttpContextBinding_IUpdateOrder" contract="DinnerNow.OrderProcess.IUpdateOrder" name="WSHttpContextBinding_IUpdateOrder"> <identity> <servicePrincipalName value="host/localhost" /> </identity> </endpoint> <endpoint address="http://localhost/DinnerNow/service/orderprocess.svc" binding="wsHttpContextBinding" bindingConfiguration="WSHttpContextBinding_IProcessOrder" contract="DinnerNow.OrderProcess.IProcessOrder" name="WSHttpContextBinding_IProcessOrder"> <identity> <servicePrincipalName value="host/localhost" /> </identity> </endpoint> <endpoint address="http://localhost/DinnerNow/service/OrderUpdateService.svc" binding="wsHttpContextBinding" bindingConfiguration="WSHttpContextBinding_IUpdateOrder" contract="OrderUpdateServiceReference.IUpdateOrder" name="WSHttpContextBinding_IUpdateOrder"> <identity> <servicePrincipalName value="host/localhost" /> </identity> </endpoint> </client> <!--<client> <endpoint address="http://localhost/service/OrderUpdateService.svc" binding="wsHttpContextBinding" contract="DinnerNow.OrderProcess.IOrderUpdateService" name="startWorkflow"> <identity> <servicePrincipalName value="host/localhost" /> </identity> </endpoint> <endpoint address="http://localhost/service/OrderUpdateService.svc" binding="wsHttpContextBinding" contract="IUpdateOrder" name="WSHttpContextBinding_IUpdateOrder"> </endpoint> </client>--> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> <diagnostics wmiProviderEnabled="true" performanceCounters="All"/> <services> <service name="DinnerNow.Services.MenuSyndicationService"> <endpoint address="" behaviorConfiguration="DinnerNow.Services.MenuSyndicationService" binding="webHttpBinding" contract="DinnerNow.Services.IMenuSyndicationService" /> </service> <service behaviorConfiguration="DinnerNow.Services.MenuSearchServiceBehavior" name="DinnerNow.Services.MenuSearchService"> <endpoint address="" binding="wsHttpBinding" contract="DinnerNow.Services.IMenuSearchService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <endpoint address="ajax" behaviorConfiguration="DinnerNow.Services.MenuSearchServiceAjax" binding="webHttpBinding" bindingConfiguration="AjaxBinding" contract="DinnerNow.Services.IMenuSearchService" /> </service> <service behaviorConfiguration="OrderBehavior" name="Order"> <endpoint address="" binding="wsHttpBinding" contract="IOrder" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service behaviorConfiguration="WorkflowHostBehavior" name="DinnerNow.OrderProcess.ProcessOrder"> <endpoint address="" binding="wsHttpContextBinding" contract="DinnerNow.OrderProcess.IProcessOrder" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service behaviorConfiguration="WorkflowHostBehavior" name="DinnerNow.OrderProcess.RestaurantOrderWorkflow"> <endpoint address="" binding="wsHttpContextBinding" contract="DinnerNow.OrderProcess.IUpdateOrder" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service behaviorConfiguration="RestaurantQueryBehavior" name="DinnerNow.Services.RestaurantQueryService"> <endpoint address="" binding="basicHttpBinding" contract="DinnerNow.Services.IRestaurantQuery"/> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service behaviorConfiguration="DeliveryServiceBehavior" name="DinnerNow.Services.DeliveryService"> <endpoint address="" binding="basicHttpBinding" contract="DinnerNow.Services.IDeliveryService"/> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service name="DinnerNow.Services.OrderStatusPOXService"> <endpoint address="" binding="webHttpBinding" behaviorConfiguration="OrderStatusPOXServiceBehavior" contract="DinnerNow.Services.IOrderStatusPOXService" /> </service> </services> <behaviors> <endpointBehaviors> <behavior name="DinnerNow.Services.MenuSyndicationService"> <webHttp /> </behavior> <behavior name="DinnerNow.Services.MenuSearchService"> <webHttp /> </behavior> <behavior name="DinnerNow.Services.MenuSearchServiceAjax"> <enableWebScript /> </behavior> <behavior name="OrderStatusPOXServiceBehavior"> <webHttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="DinnerNow.Services.MenuSearchServiceBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> <behavior name="OrderBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior>

<behavior name="WorkflowHostBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceCredentials> <windowsAuthentication includeWindowsGroups="true" allowAnonymousLogons="false" /> </serviceCredentials> <workflowRuntime name="WorkflowServiceHostRuntime" validateOnCreate="true" enablePerformanceCounters="true"> <services> <add type="System.Workflow.Runtime.Hosting.SharedConnectionWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add type="System.Workflow.Runtime.Tracking.SqlTrackingService,System.Workflow.Runtime,Version=3.0.00000.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" /> </services> <commonParameters> <add name="ConnectionString" value="Initial Catalog=DinnerNowWF;Data Source=DinnerNow;Integrated Security=SSPI;" /> </commonParameters> </workflowRuntime> </behavior> <behavior name="RestaurantQueryBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> <behavior name="DeliveryServiceBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel>

Enabling Operations

DeliveryService

ProcessOrder

RestaurantOrderWorkflow

MenuSearchService

RestaurantQueryService

MenuSyndicationService

ShoppingCartService WMI Instance

WMI Instance

WMI Instance

WMI Instance

WMI Instance

WMI Instance

WMI Instance

Enterprise Monitoring

Supporting Mobile Devices

.Net CF 3.5 Supports WCF but not Workflow Services

DeliveryService

RestaurantOrderWorkflow

DinnerNow Architecture

IIS 7

ASP.NET

WCF SVCS

WF SVCS

Web Browser

WPF Application

WM6

Ops Mgr 2007

MMC

PowerShell

Vista Sidebar Gadget

Events

Perf Counters

WMI

Perf Counters

SQL2K5MembershipDinnerNowDinnerNowWF

Q&A

[email protected]

http://www.dinnernow.net

http://blogs.msdn.com/daiken

Sequence Workflow

State Workflow