190 likes | 374 Views
Web API Quick Start. How to quickly maximize the value you add With web api. CODE CAMP 2013 SPONSORS. GOLD. SILVER. BRONZE. Goal. To allow programmers experienced with creating services in the Microsoft stack to quickly get going with Web API. About Me. Ryan Vice Independent Consultant
E N D
Web API Quick Start How to quickly maximize the value you add With web api
CODE CAMP 2013 SPONSORS GOLD SILVER BRONZE
Goal • To allow programmers experienced with creating services in the Microsoft stack to quickly get going with Web API
About Me Ryan ViceIndependent Consultant RyanViceTx@Gmail.com www.RyanVice.net
Agenda • Background and Motivations • Quick Start • Dealing with Mismatched Conventions • Versioning • Documenting Our API
Background and MotivationsEvolving frameworks • ASP • ASP.Net Web Forms • Server side controls • Disconnected data access • Data binding • ASP.Net MVC • Separation of Concerns • Closer to the metal with HTTP • ASP.Net Web API • Content negotiation • Fewer global objects • Improved testability • Integrated help page support • Symmetrical client programming model • Better HTTP support via strongly typed HTTP Object Model • Filter chaining (or filter pipeline) support • Self-hosting
Background and MotivationsEvolving Designs • ASP • Weak support for server side UX logic • ASP.Net Web Forms • Stronger support for server side UX logic • Weak support for loosely coupled UX tier • ASP.Net MVC • Stronger support for looser coupling UX tier • Weak support for resource centric API modeling • ASP.Net Web API • Stronger support for resource centric API Modeling
Background and Motivationsasp.net mvcrPC style json services • Not resource centric • Not good for multi-targeting
Background and Motivationsasp.net mvcrPC style json services - API
Background and Motivationsasp.net mvcrPC style json services - iSSUES • Not resource centric • Not good for multi-targeting or for public facing API
Background and Motivationsasp.net mvc Resource Centric style json services - API
Background and Motivationsasp.net mvc resource centric style json services • Resource centric • Cumbersome to write • Awkward routing • Difficult to organize controller • Requires extra code for content negotiation • Magic strings for status codes
Quick Start Web API demo
Quick Startasp.net WEB API Resource Centric style json services - API
Take Aways • Web Api makes it easier to create HTML friendly web services • Json.Netserializer allows offers a lot of benefits for making HTML friendly JSON • Help Pages allows you to get your services documented quickly • There are a few options for versioning your services, the most important thing is to pick one
Resources • Web API Official Page http://www.asp.net/web-api • APIGEE http://apigee.com/about/ • Pluralsighthttp://www.pluralsight.com/ • My Blog http://www.RyanVice.net