1 / 11

REST with Silverlight 5, WCF ASP.NET Web API, and a little MVC 4

REST with Silverlight 5, WCF ASP.NET Web API, and a little MVC 4. (AKA: Let’s see how many product names will fit in a session title) (or, the live version of part of chapters 21 and 22 of Silverlight 5 in Action). Where to find help. Our Community Sites silverlight.net windowsclient.net

nibal
Download Presentation

REST with Silverlight 5, WCF ASP.NET Web API, and a little MVC 4

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. REST with Silverlight 5, WCF ASP.NET Web API, and a little MVC 4 (AKA: Let’s see how many product names will fit in a session title)(or, the live version of part of chapters 21 and 22 of Silverlight 5 in Action)

  2. Where to find help • Our Community Sites • silverlight.net • windowsclient.net • asp.net • dev.windows.com • MSDN: msdn.microsoft.com • My Blog: 10rem.net • Will include any updated source/examples

  3. REST in a Nutshell • REpresentationalState Transfer • Relies on verbs • Primarily GET, PUT, POST, DELETE • The architecture of the web

  4. The 6 REST Constraints

  5. What RESTful Services get you • Instantly accessible to any client which can make web requests • No need for client proxies, stubs, envelopes and the other stuff we have to deal with • Especially important with the proliferation of connected microcontrollers • Cacheable using normal web-aware mechanisms • Scalable for the same reason • Flexible if you go with a full hypermedia approach

  6. WCF ASP.NET Web API • An API that supports you in building RESTful APIs • Does not impose REST constraints • Does not get in your way • Architected to rely on and exploit HTTP fully, not just as a generic transport • Written by the WCF Team at Microsoft. • Now available as part of ASP.NET MVC 4

  7. This Example Serves Silverlight Client ASP.NET MVC Data ASP.NET Web API Uses Primarily focus on the Silverlight client and Web API Server.

  8. Project • Internal corporate application • Shared across many divisions • Control some, but not all, clients • Goals and constraints • Use RESTful approaches to make API available to as many clients as possible • No fat Soap envelope • No proprietary WCF formats • Make it really easy for Silverlight (or other owned clients) to use the resources • Don’t want to recreate entities • For V1, don’t worry about security (Boy, was that convenient!)

  9. Stuff with semicolons and curly braces … and the occasional angle bracket DEMO

  10. Summary • Web API for RESTful “services” • Web API Now part of ASP.NET MVC • Silverlight + MVC play together nicely • Create a Razor helper for hosting Silverlight • Linked files to share model definitions • Conditional compilation or partial classes for platform-specific features • My book has awesome demos 

  11. Where to find help • Our Community Sites • silverlight.net • windowsclient.net • asp.net • dev.windows.com • MSDN: msdn.microsoft.com • My Blog: 10rem.net • Will include any updated source/examples • Twitter: @pete_brown • Mail pete.brown@microsoft.com

More Related