DinnerNow.NET Architecture Walkthrough David 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.

Download Report

Transcript DinnerNow.NET Architecture Walkthrough David 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.

DinnerNow.NET
Architecture Walkthrough
David 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 Contains
99% Automated Setup from sourcecode
All project solutions, unit tests, etc.
Setup Guide
Walkthrough Document
8 Hands On Labs based upon DinnerNow
DinnerNow History
Releases Target Framework/OS Combos
Vista/Framework 3.0
1.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 1
1.0 - June 1st (3126 downloads)
Vista/Orcas Beta 2
2.0 – August 3rd (19078 downloads)
Vista/Server 2008/Visual Studio 2008
2.5 – Will RTM on Jan 31st 2008
Happy
Birthday
DinnerNow
Developing DinnerNow
Team Effort
James 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
Development Environment
DEMO
DINNERNOW.NET
END-2-END
DinnerNow Architecture
IIS 7
ASP.NET
Events
Perf Counters
Ops Mgr 2007
Web Browser
WCF SVCS
Vista Sidebar
Gadget
WMI
Perf Counters
WF SVCS
SQL2K5
WM6
WPF Application
Membership
DinnerNow
DinnerNowWF
PowerShell
MMC
Getting it on YOUR machine
Automated build via WIX/Powershell
Dependency Checker Helps YOU get going
DEMO
BUILD PROCESS &
DEPENDENCY CHECKER
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" />
Software
Registry
Server Role
WMI Query
HotFix
Dependency Checker
DinnerNow Architecture
IIS 7
ASP.NET
Events
Perf Counters
Ops Mgr 2007
Web Browser
WCF SVCS
Vista Sidebar
Gadget
WMI
Perf Counters
WF SVCS
SQL2K5
WM6
WPF Application
Membership
DinnerNow
DinnerNowWF
PowerShell
MMC
Web Stack
CardSpace
for User Authentication
IIS 7
ASP.NET
Membership
AJAX
Asynchronous
Javascript and XML
Web Browser
JSON
IIS 7
JavaScript Object Notation
WCF SVCS
DinnerNow
RSS
Really Simple Syndication
WF SVCS
POX
Plain Old XML
Vista Sidebar
Gadget
HTTP Handler
Image Copyright
Handler
Services
ASP.NET Web Application
ShoppingCartService
Workflow Service
IIS Hosted WCF Services
ProcessOrder
DeliveryService
RestaurantOrderWorkflow
RestaurantQueryService
MenuSearchService
MenuSyndicationService
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
ShoppingCartService
DeliveryService
WMI
Instance
WMI
Instance
ProcessOrder
WMI
Instance
RestaurantOrderWorkflow
WMI
Instance
MenuSearchService
WMI
Instance
RestaurantQueryService
MenuSyndicationService
WMI
Instance
WMI
Instance
Enterprise Monitoring
Supporting Mobile Devices
DeliveryService
RestaurantOrderWorkflow
.Net CF 3.5 Supports WCF
but not Workflow Services
DinnerNow Architecture
IIS 7
ASP.NET
Events
Perf Counters
Ops Mgr 2007
Web Browser
WCF SVCS
Vista Sidebar
Gadget
WMI
Perf Counters
WF SVCS
SQL2K5
WM6
WPF Application
Membership
DinnerNow
DinnerNowWF
PowerShell
MMC
Q&A
[email protected]
http://www.dinnernow.net
http://blogs.msdn.com/daiken
Sequence Workflow
State Workflow