Brian Noyes Chief Architect IDesign Inc (www.idesign.net)www.idesign.net Session Code: SOA 305.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Building Scalable Web Apps with Windows Azure Name Title Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
VAR318: Developing Service Oriented Workflows Brian Noyes IDesign Inc (
Be The Master Of Your Domain with POCO WCF RIA Services SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 27 Sep 2011.
Ronnie Saurenmann Principal Architect Microsoft Switzerland
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
CON 307 Developing Manageable WCF Services Chris Peiris | Avanade Rory Primrose | Avanade
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Getting Started with Windows Azure Name Title Microsoft Corporation.
Connect with life Connect with life
Brian Noyes Chief Architect IDesign Inc ( SOA201.
Visual Studio 2008 and.NET 3.5 provide seamless support for all of the protocols and techniques popular in Web 2.0-style applications. Visual Studio.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
VWF310: Encapsulate Custom Business Processes with Custom WF Activities Brian Noyes IDesign Inc (
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

DEV340. Chief Architect IDesign Inc. ( Microsoft Regional Director ( Microsoft MVP Silverlight Publishing Developers.
customer.
2 Productive Windows Communication Foundation Jeremy Boyd Mindscape MSDN Regional Director – New Zealand SOA315.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
demo Demo.
Rudi Grobler Session Code: WUX201.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Brian Noyes Chief Architect IDesign Inc. SOA401 Chief Architect IDesign Inc. ( Microsoft Regional Director MVP Microsoft MVP Connected.

Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
Tech Ed North America /2/2018 8:56 PM Required Slide
6/16/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Jim Nakashima Program Manager – Cloud Tools Microsoft Corporation
9/11/2018 5:53 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Exceedra + Azure Mark Rendle Principal Software Architect
Excel Services Deployment and Administration
Windows Communication Foundation RIA: Ready for Business
11/22/2018 8:05 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Title of Presentation 12/2/2018 3:48 PM
Brian Keller Sr. Technical Evangelist Microsoft Session Code: DEV310
12/5/2018 3:24 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
TechEd /6/2018 8:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Jim Nakashima Program Manager Cloud Tools
Tech·Ed North America /17/2019 1:47 AM
Brian Keller Sr. Technical Evangelist Microsoft Session Code: DEV310
Building Silverlight Apps with RIA Services
Tech Ed North America /12/2019 6:45 AM Required Slide
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Brandon Bray Principal Group Program Manager Microsoft Corporation
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
6/20/2019 1:09 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Microsoft .NET Developer's Guide to WCF, SOA, and Success
利用IIS部署與維護 SOA應用程式的技巧
Presentation transcript:

Brian Noyes Chief Architect IDesign Inc ( Session Code: SOA 305

Chief Architect IDesign Inc. ( Microsoft Regional Director MVP Microsoft MVP Connected Systems About Brian Publishing Developing Applications with Windows Workflow Foundation, LiveLessons training DVD, June 2007 Smart Client Deployment with ClickOnce, Addison Wesley, January 2007 Data Binding in Windows Forms 2.0, Addison Wesley, January 2006 MSDN Magazine, MSDN Online, CoDe Magazine, The Server Side.NET, asp.netPRO, Visual Studio Magazine Speaking Microsoft TechEd US, Europe, Malaysia, Visual Studio Connections, DevTeach, INETA Speakers Bureau, MSDN Webcasts Blog:

Agenda Service Best Practices Client Best Practices Data Contracts SOAP vs REST

Service Definition Separate contract from implementation Contract (interface) first Define services in a class library, not directly in a host project Layering Separate Service Layer? Instance model Change to Per Call as default Session / Singleton when?

Instance Model Brian Noyes Chief Architect IDesign Inc

Service Exception Handling For operation specific exceptions Try/catch, throw FaultException Favor using FaultException FaultException can be ambiguous to the client because unhandled exceptions arrive as a FaultException Include FaultContract in service contract definition if you throw FaultExceptions Part of the API you are exposing For global exception handling from services Use an error handler Include exception details in debug builds only

Exceptions Brian Noyes Chief Architect IDesign Inc

Service Security Intranet services Default Windows Auth may be all you need Possibly Hybrid – Windows Creds / Custom Application Roles Extranet / Internet / Custom security needs Use ASP.NET Membership / Role providers ASP.NET providers Really a standard.NET framework security infrastructure Built in providers for Windows or SQL Server – based credentials / roles Easy to implement custom providers Establish principal on the thread Re-usable across ASP.NET, WCF, WPF & Windows Forms (via Client Application Services)

Security Brian Noyes Chief Architect IDesign Inc

Service Hosting Favor WAS Hosting when Server 2008 is an option Multiple protocol support IIS Hosting model and tools Favor IIS for external HTTP only services Better on-box scalability / availability through worker process model Better management tools Favor self-hosting for stateful services, callbacks,.NET Service Bus, debugging Have a console-based debug self-host for development time Can be a Windows Service project that is used for production self-hosting with a mode switch for debugging Consider Dublin hosting in the future

Self Host Code Do not put ServiceHost in a using statement Dispose can throw an exception that masks the real exception thrown from Open call Explicitly call Close in try/catch, log/ deal with exception in catch

Self-Host Brian Noyes Chief Architect IDesign Inc

Agenda Service Best Practices Client Best Practices Data Contracts SOAP vs REST

Client Proxy Classes Favor static proxy class over ChannelFactory Connection caching in the base class in 3.5 Place for encapsulation of common patterns Hand-code or micro-code generate proxy classes for internal services Less bloated code Share service contract and data contracts through libraries Explicit control over config file

Client Proxies Brian Noyes Chief Architect IDesign Inc

Client Proxy Classes Add Service Reference for external services or when you want an async API on the client Clean up config after it destroys it Make sure to add references to data contract libraries before adding the service reference to avoid duplicate definitions Live with the duplicate service contract definition instead of needing to repeatedly clean up the proxy code

Add Service Reference Brian Noyes Chief Architect IDesign Inc

Client Proxy Management Cache client proxies if frequent calls to avoid session establishment cost If secure / reliable session enabled Have to deal more cautiously with faulted proxies Check proxy state before using Get rid of proxy after exception Don’t put proxies in a using statement Dispose call might throw exception and mask real exception Explicitly close in a try/catch block, and if Close throws an exception, Abort the proxy to ensure resource clean up

Proxy Caching Brian Noyes Chief Architect IDesign Inc

Client Exception Management All exceptions thrown from a service call derive from CommunicationException FaultException could be wrapped unhandled exception on the client, or explicit error returned from the service FaultException always an explicit error returned from the service Simple approach: Any exception from a proxy call, safe close the proxy Advanced approach: FaultException - proxy is reusable

Client Exceptions Brian Noyes Chief Architect IDesign Inc

Agenda Service Best Practices Client Best Practices Data Contracts SOAP vs REST

Data Contracts Favor data contracts over serializable types More explicit model, better control over what the client sees Implement IExtensibleDataObject Avoids dropping data that the service / client does not understand Avoid passing complex.NET specific types for interoperable services DataSets and Exception types

Data Contracts Avoid XmlSerializer and MessageContracts except for interoperable scenarios and REST services

Data Contracts Brian Noyes Chief Architect IDesign Inc

Agenda Service Best Practices Client Best Practices Data Contracts SOAP vs REST

Favor SOAP services when you are writing a service that only your code will consume Favor REST services for publicly exposed, data oriented services

Resources IDesign WCF Master Class IDesign WCF Coding Standard – Programming WCF, Juval Lowy, O’Reilly & Associates, 2007 Learning WCF, Michele Leroux Bustamante, O’Reilly & Associates, 2007 Connect Apps with WCF, Brian Noyes, Visual Studio Magazine, Feb 2008, wcf.aspx?sc_lang=en wcf.aspx?sc_lang=en Wenlong Dong’s Blog: Blog:

Required Slide Complete a session evaluation and enter to win! 10 pairs of MP3 sunglasses to be won

© 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. Required Slide