Thursday, March 9, 2017

Microsoft Hands On Lab: Build a Single Page Application (SPA) with ASP.NET Web API and Angular.js

Hands On Lab: Build a Single Page Application (SPA) with ASP.NET Web API and Angular.js

In traditional web applications, the client (browser) initiates the communication with the server by requesting a page. The server then processes the request and sends the HTML of the page to the client. In subsequent interactions with the page –e.g. the user navigates to a link or submits a form with data– a new request is sent to the server, and the flow starts again: the server processes the request and sends a new page to the browser in response to the new action requested by the client.
In Single-Page Applications (SPAs) the entire page is loaded in the browser after the initial request, but subsequent interactions take place through Ajax requests. This means that the browser has to update only the portion of the page that has changed; there is no need to reload the entire page. The SPA approach reduces the time taken by the application to respond to user actions, resulting in a more fluid experience.
The architecture of a SPA involves certain challenges that are not present in traditional web applications. However, emerging technologies like ASP.NET Web API, JavaScript frameworks like AngularJS and new styling features provided by CSS3 make it really easy to design and build SPAs.
In this hand-on lab, you will take advantage of those technologies to implement Geek Quiz, a trivia website based on the SPA concept. You will first implement the service layer with ASP.NET Web API to expose the required endpoints to retrieve the quiz questions and store the answers. Then, you will build a rich and responsive UI using AngularJS and CSS3 transformation effects.
All sample code and snippets are included in the Web Camps Training Kit, available at http://aka.ms/webcamps-training-kit.

Overview

Objectives

In this hands-on lab, you will learn how to:
  • Create an ASP.NET Web API service to send and receive JSON data
  • Create a responsive UI using AngularJS
  • Enhance the UI experience with CSS3 transformations
  • <continues at link above>

No comments:

Post a Comment