1 / 36

Line of Business Apps using WCF RIA Services

Line of Business Apps using WCF RIA Services. Andy Beaulieu MVP Silverlight MCT, MCSD.NET. About Me. Andy Beaulieu Based in Syracuse, NY MCT, MCSD.NET Microsoft MVP Silverlight WPF & Silverlight Insiders Full-time Developer, Part-time Trainer .NET Community:

denim
Download Presentation

Line of Business Apps using WCF RIA Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Line of Business Appsusing WCF RIA Services Andy Beaulieu MVP Silverlight MCT, MCSD.NET

  2. About Me • Andy Beaulieu • Based in Syracuse, NY • MCT, MCSD.NET • Microsoft MVP Silverlight • WPF & Silverlight Insiders • Full-time Developer, Part-time Trainer • .NET Community: • Speaker at User Groups, Code Camps, Conferences • User Group Leader - www.cnydevelopers.net • INETA Volunteer • Blog and Creations: • www.andybeaulieu.com • www.spritehand.com

  3. Agenda Why Silverlight for Data Apps? Demos, Demos, Demos (and Beers)

  4. Why Silverlight? • Stateful Model • Powerful UI Capabilities • Animation • Vector Graphics • .NET framework we know & love • Very Easy Deployment • Cross-Platform • Windows, Mac, Linux, Mobile Phones • Cross-Browser • No HTML/JavaScript oddities between browsers

  5. Visual Studio 2010 Enhancements for Silverlight 4 Business Apps • Cider Designer Support • WYSIWYG Editing for Silverlight • Properties Panel + Events Panel • Document Outline Window • RIA Services • Simplified N-Tier Development • Data Sources Window • Drag/Drop Data Development

  6. WALKTHROUGH: Beer App

  7. Demo Architecture

  8. Demo Architecture • WCF RIA Services Timeframe • 7/2009: Preview • PDC 11/2009: Beta • Q1 2010: Release

  9. Demo Architecture • Silverlight 4 & VS2010 Timeframe • PDC 11/2009: Beta • 2/2010: RC • Q1 2010: RTM

  10. The Database

  11. DEMO : THE DATABASE

  12. The Data Access Layer • Created using GUI Modeler • Programmer-Friendly Interface to Database Objects • Strongly Typed with IntelliSense • Compile-Time Checking of Database Classes

  13. The Data Access Layer • LOTS OF CHOICES for Data Access Layer! • LINQ to SQL • Entity Framework • POCO • More coming? …

  14. DEMO : THE DATA ACCESS LAYER

  15. The Service Layer • WCF RIA Services • Simplifies Tiered Development • Write Code in one place • Code Generation • Validation • Uses Windows Communication Foundation • WCF Binary protocol used by default • Uses LINQ (Language Integrated Query) for Data Access • Current Version is WCF RIA Services Preview • Latest is 12/3/2009 • Release coming Q1 2010 • Usable from Other Clients • WindowsForms • ASP.NET AJAX

  16. RIA Services in n-tier applications Automatic CRUD Web Service Layer • Validation Framework Trust Boundary Framework, tools and services with prescriptive pattern for n-tier applications Web Service Data Access Layer (DAL) App Logic App Logic View Database

  17. DEMO : THE SERVICE LAYER

  18. The Silverlight Client : Views

  19. DEMO : ADDING A VIEW (PAGE)

  20. The Silverlight Client : Grid • We can use the Data Sources Window to create a DataGrid • Drag/Drop to add a DataGrid and DomainDataSource control • DomainDataSourcesimplifies Editing, Paging, Grouping, Sorting and Filtering

  21. DEMO : BEERS IN A GRID

  22. The “Details Form” • We can use the Data Sources Window to create a Details View • Also creates a DomainDataSourcecontrol • Update, Delete, Add New easily added using DomainDataSource

  23. DEMO : BEER DATA FORM

  24. Validation • Data Type check Validation is automatic • Other Validation can be added as attributes on Server Side • Automatically copied to Silverlight client • Custom Validation can be added using a “shared” class • Must be available on the Client + Server

  25. DEMO : VALIDATION

  26. Custom Validation • Custom Validation can be added using a “shared” class • Any class file containing “.shared.cs” or “.shared.vb” is automatically copied to Silverlight clientEX: CustomValidateColors.shared.csWe need to be careful to only use .NET classes that are supported in both Silverlight and .NET 3.5/4.0 framework!

  27. DEMO : CUSTOM VALIDATION

  28. List Bound Controls • We can use the Data Sources Window to create List Bound controls • Also creates a DomainDataSourcecontrol • NOTE: There can be timing issues with separate Domain Contexts! • We can solve this by creating a Static Resource and “sharing” the domain context.

  29. DEMO : ComboBox in DATA FORM

  30. Security • ASP.NET SQL Membership Provider supported Out of the Box • (we can support other auth mechanisms as well) • We can use attributes on the server side to enforce security • Access to Security Context • Client: • WebContext.Current.User • Server: • ServiceContext.User

  31. DEMO: Security

  32. Styling Styles are defined for a Business Application Template in Styles.xaml: … this ResourceDictionary defines many of the common styles of the App: Layout of “Master” page Background Link Buttons etc.

  33. DEMO: Styling the Application

  34. Programmatic Access • Don’t Like Declarative (in XAML)Data Access? • Taking an MVVM approach? • We can access all WCF RIA Services through code instead of Declaratively. • We can use Context object to access any Queries-OR- • We can create DomainDataSource in Code • Can also specify some LINQ queries from Client side

  35. DEMO: Programmatic Access

  36. Questions? Email: andy@beaulieu.com Blog: www.andybeaulieu.com www.spritehand.com More Resources • RIA Services Home • http://silverlight.net/getstarted/riaservices/ • RIA Services Code Gallery • http://code.msdn.microsoft.com/RiaServices • Brad Abrams Series on RIA Serviceshttp://blogs.msdn.com/brada/archive/2009/08/02/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-summary.aspx

More Related