Nuno Godinho

663
-1

Published on

apresentação do Nuno Godinho no evento RIAPT de dia 16 de Janeiro.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
663
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Nuno Godinho

  1. 1. Developing Line-of-Business Applications with Microsoft Silverlight Nuno Godinho Nuno.Godinho@sapo.pt
  2. 2. Agenda  Introduction  Recommended Pattern  Communications  Beyond the Browser  Extensibility  Q&A
  3. 3. About Me Nuno Filipe Godinho Independent Consultant Mail: Nuno.Godinho@sapo.pt Nuno.Godinho@itech4all.com Blogs: http://pontonetpt.com/blogs/nunogodinho http://xamlpt.com/blogs/nunogodinho http://weblogs.asp.net/nunogodinho http://msmvps.org/blogs/nunogodinho Twitter: @NunoGodinho
  4. 4. Agenda  Introduction  Recommended Pattern  Communications  Beyond the Browser  Extensibility  Q&A
  5. 5. Introduction Problem Statement  Problems ◦ N-Tier ◦ Controls ◦ Rich Text Support ◦ Multi-language Support ◦ Customer Devices Interaction ◦ Communications ◦ Extensibility ◦ Offline Support ◦ Interoperability
  6. 6. Introduction Challenges using N-Tier applications  LoB applications use data that needs to flow across tiers  Created and used through basic CRUD operations  In an internet application, there is a trust boundary between the client and the mid-tier server  Important to have a well defined and secured resources that are available to the client tier and also what operations are permitted
  7. 7. Introduction Challenges using N-Tier applications  The validation needs to run on Client and On Server as well as on Mid-Tiers  Common validation across the tiers  Services that may be shared with other applications
  8. 8. Introduction Vision and Goals  Simplify RIA-style application development ◦ n-tier is hard, and un-natural ◦ Focus on data-driven apps  Bring ASP.NET-style productivity to RIA development ◦ Building blocks for data, security, etc. ◦ Focus on scenarios
  9. 9. Introduction Value Propositions  Focus on data in an end-to-end manner  A unified story for client and server development  A prescriptive framework that targets key scenarios, and leads the common developer to a pit of success
  10. 10. Introduction Value Propositions  Simplify application development across tiers and trust boundary ◦ Provides a set of tools to build the multiple tiers of an application together ◦ Application logic remains aware of tier and trust boundaries ◦ Uses the end-to-end flow of data and metadata described earlier ◦ Code generation and shared code  Enhance the experience by providing multiple choices for sharing logic while respecting tier and trust boundaries
  11. 11. Introduction A Unified Story for Client and Server  Client is an extension of the server Service  A single logical application Rich Internet Application Browser Application Presentation App Data Access HTML Network Logic Logic Layer DB Services Other Applications
  12. 12. Introdution Value Propositions  Define and support a pattern for exposing a set of operations on resources  DomainService ◦ Define a set of operations on resources  Framework and Tools ◦ Collaborate to generate code for a corresponding client-tier ◦ Services for authentication and user settings can be used out-of-the box
  13. 13. Introduction A Prescriptive Pattern Services Rich Internet Application Presentation Domain Network Domain App Data Access Logic Context Service Logic Layer Under the covers infrastructure DB
  14. 14. Introduction A Single Pattern that Scales and Grows  Support for multiple presentation tiers and data access technologies .NET Clients Databases Silverlight, WPF ADO.NET, ORMs (LTS, EF, …) Standards Clients JavaScript CLR App Lists/Objects Logic Repository Server (nHibernate, …) Rendering HTML, SEO, Printing, … Services REST/SOAP SOAP, Unit Test (Azure, …) Services XML, Code JSON, WCF Binary
  15. 15. Line-of-Business Application
  16. 16. Agenda  Introduction  Recommended Pattern  Communications  Beyond the Browser  Extensibility  Q&A
  17. 17. Recommended Pattern
  18. 18. Recommended Pattern MVVM  Why? ◦ Separation of concerns ◦ Better Workflow between Developer and Designer ◦ Easier Testability  Why not MVC? ◦ We need to have access to the Code-Behind and MVC doesn’t support that, only Code-Behind Pattern does, but doesn’t delivers easy separation of concerns
  19. 19. Recommended Pattern MVVM  Display data in Controls  UI Friendly Entities, UI State, Actions  Entities representing data
  20. 20. MVVM Implementation in Silverlight
  21. 21. Agenda  Introduction  Recommended Pattern  Communications  Beyond the Browser  Extensibility  Q&A
  22. 22. Communication Unified Programming Model ASMX & WSE .NET Remoting Interop Extensibility with other Location Platforms & WS-* transparency Attribute- Message- Based Oriented Programming REST / HTTP Programming Programming Enterprise System.Messaging Services HTTP Services
  23. 23. Communications Windows Communication Foundation (WCF)
  24. 24. Communications WCF RIA Services  Framework, tools and services with prescriptive pattern for n- tier applications Trust Boundary Web Service Data Access App App View Layer Logic Logic (DAL) Database
  25. 25. Communications WCF RIA Services  Design-time view Solution (Application) Server project Client project Entities Entities Build, reflect Data & code-gen Views Access Domain Domain Layer Service Context (DAL)
  26. 26. Communications Run-time view (entity lifecycle) Application Web server Silverlight Query Load Data Entities Domain Entities Access Domain Views Layer Service Context Submit Submit (DAL) Results Results
  27. 27. Communications Services  Authentication  Roles  User profile  All integrate w/ ASP.NET infrastructure
  28. 28. WCF RIA Services
  29. 29. Agenda  Introduction  Recommended Pattern  Communications  Beyond the Browser  Extensibility  Q&A
  30. 30. Beyond the Browser  Out-of-Browser Applications  Trusted Applications
  31. 31. Beyond the Browser Out-of-Browser – Already on Silverlight 3  Configuration Based  AppManifest.xml  Can be enabled in an existing application without rebuilding  Install option on its right-click menu  Can run without a network connection  You can implement network detection and provide offline support when a connection is unavailable
  32. 32. Beyond the Browser Out-of-Browser  Windowing API  WebBrowser control  HtmlBrush  Notification (aka. Toast)
  33. 33. Beyond the Browser Trusted Applications  OOB with elevated privileges  COM Interop in Windows  File system access  Cross-domain networking access  Full keyboard support in Full-Screen Mode
  34. 34. Beyond the Browser
  35. 35. Agenda  Introduction  Recommended Pattern  Communications  Beyond the Browser  Extensibility  Q&A
  36. 36. Extensibility  Prism v2  MEF – Managed Extensibility Framework
  37. 37. Extensibility Prism v2  Prism is a set of options  Use what you want and ignore the rest ◦ Example:  Choose Modules and Commanding, but ignore Event Aggregation and Regions
  38. 38. Extensibility Prism v2  Prism Technical Concepts
  39. 39. Extensibility MEF – Managed Extensibility Framework A new library in Silverlight 4 for building applications that can be incrementally extended.
  40. 40. Extensibility MEF – Managed Extensibility Framework An Application is built of parts.
  41. 41. Extensibility MEF – Managed Extensibility Framework Export it. Import it. Compose it.
  42. 42. Extensibility MEF – Managed Extensibility Framework  Export it - Metadata [ExportMetadata(“Location”,Location.Top)] [Export(typeof(UserControl))] public class Widget1 : UserControl { public string Message { get{return(string) Button.Content;} set{Button.Content=value;} } } Widget1 Export
  43. 43. Extensibility MEF – Managed Extensibility Framework  Import it - Metadata [Export(typeof(UserControl))] public class MainPage: UserControl { [ImportMany(typeof(UserControl))] public IEnumerable<Lazy<UserControl, IWidgetMetadata> { get;set; } } Main ImportMany Page
  44. 44. MEF – Managed Extensibility Framework
  45. 45. Agenda  Introduction  Recommended Pattern  Communications  Beyond the Browser  Extensibility  Q&A
  46. 46. Nuno Filipe Godinho Independent Consultant Mail: Nuno.Godinho@sapo.pt Nuno.Godinho@itech4all.com

×