This two-day course provides a practical hands-on introduction to developing and consuming ASP.NET web API services using C# and Visual Studio 2013. This web development framework from Microsoft makes it easy to create HTTP services that can reach a broad range of clients and is an excellent platform for creating RESTful Web applications. The course is current to .NET Framework 4.5.1 and ASP.NET Web API 2.0/2.1.
Course Duration:
2 Days
Prerequisites:
Participants should have a good working knowledge of C# and the .NET Framework. A basic knowledge of ASP.NET, HTML and JavaScript is also required.
Course Outline:
- Introduction to ASP.NET Web API
- REST
- Representation, State and Transfer
- Collections and Elements
- Specifying a Start Page
- Implementing PUT Verb
- Using Fiddler
- Composing a Request
- ASP.NET MVC and Web API
- Route Registration
- Web API and HTTP
- HTTP Response Codes
- POST Response Code
- HttpResponseException
- Performing CRUD Operations
- Server Code: Model
- Book Repository
- BooksController
- Exercise the Server Using Fiddler
- Exercise PUT
- Exercise POST
- Exercise GET Again
- Media Formatters and Content Negotiation
- Internet Media Types
- Media Type in HTTP
- MediaFmtDemo Code
- Exercising PUT
- Exercising POST
- HTTP Content Negotiation
- Media Range and Quality Factors
- Web API Content Negotiation
- Default Content Negotiator
- Media Type Mappings
- Query String Mapping
- Request Header Mapping
- Content Negotiation Priority
- Media Type Formatters
- Serialization
- Serialization in .NET
- JavaScript Object Notation
- JSON Data Types
- Comparing JSON and XML
- SML Serialization
- BSON
- JavaScript Clients
- What is DHTML?
- DHTML Components
- Browser Objects
- Assessing DOM Nodes
- Using jQuery
- CSS (Cascading Style Sheets)
- CSS Syntax
- Style Sheets
- jQuery Library
- Selectors
- jQuery Wrapper
- jQuery AJAX Methods
- Shorthand Methods
- Using getJSON()
- Handling Errors
- Low-Level Interface
- Invoking POST
- Binding, Validation and Routing
- Binding Data from HTTP Requests
- Reading a Raw HTTP Request
- House Controller
- Deserializing JSON
- Client JavaScript Code
- Reading HTTP Request into CLR
- Binding in ASP.NET Web API
- Bind HTTP Request to Simple Types
- Binding via Route Data
- Binding via Query String
- JavaScript Client
- Client Code for Using Request Body
- Simple and Complex Types
- Client Code for POST and GET Requests
- Validation Rules
- Controller Code
- ASP.NET Routing
- Default Route Map
- Matching URLs to Route
- .NET Clients
- Web API Clients
- HttpClient
- Initializing HttpClient
- Issuing a GET Request
- Issuing a POST Request
- Adding a House
- Update
- Delete
- Appendix: Learning Resources