6 déc 2017 · server side and an Angular application on the client side The first part of the thesis described a Figure 17 - Web API application architecture
Previous PDF | Next PDF |
[PDF] Application fullstack avec Angular et Web API - KALEO Formation
Test d'unité et test de bout en bout de votre application Angular ○ Créer des services personnalisés avec Angular ○ Comprendre l'architecture API Web et
[PDF] Progressive web app with Angular 2 and ASPNET - CORE
6 déc 2017 · server side and an Angular application on the client side The first part of the thesis described a Figure 17 - Web API application architecture
[PDF] Architecting Modern Web Apps with ASPNET Core - GitHub Pages
Traditional “N-Layer” architecture applications NET Core supports both MVC and Web APIs in the same application, using the same set of tools and Installing the Angular project template from dotnet CLI Make sure you have the latest
[PDF] Web Architecture(s) et application(s) - Département Informatique
L'introduction des premiers concepts clés de l'architecture du Web 4 Une présentation PHP-FPM implémente l'API FastGCI pour la communication entre le serveur Web et le serveur Ex : Dojo, Rialto, Angular, JQuery, Yui — « bytecode
[PDF] Développement dune application WEB, client- serveur vs AngularJSjs
Développement d'une application WEB ; client-serveur vs AngularJS js LABARBE Arnaud Architecture client-serveur vs Angluar js, les nouveaux besoins des Le tutoriel nous propose de faire une application de cinéma grâce à l'API de
[PDF] Front-end Development with ASPNET Core, Angular, and Bootstrap
FIGURE 3-1: Angular web site FIGURE FIGURE 3-7: Angular project template in Visual Studio 2017 FIGURE Web API is used for building RESTful web services that can be The architecture of this application is going to be very simple
[PDF] Single Page Web Application with Restful API and AngularJS
1 nov 2014 · Keywords SPA, AngularJS, Javascript, web development, web application Figure 2: The Model-View-Controller architecture [2] The Model
[PDF] How to Think about Web Architecture - MobilizeNet
our purposes we will use Angular 5 and Kendo—together they create a Thinking about web architecture 7 Web API The Web API template is really a way to
[PDF] angular application layout best practices
[PDF] angular architecture best practices
[PDF] angular architecture patterns
[PDF] angular architecture pdf
[PDF] angular banking application
[PDF] angular best practices
[PDF] angular books free
[PDF] angular cli argument
[PDF] angular cli cheat sheet
[PDF] angular cli commands
[PDF] angular cli commands cheat sheet
[PDF] angular cli component naming convention
[PDF] angular cli configuration could not be found
[PDF] angular cli configuration environment
Progressive web app
with Angular 2 and ASP.NETJuraj Kubala
December 2017
School of Technology, Communication and Transport
Degree Programme in Information and Communications TechnologyDescription
Author(s)
Juraj Kubala
Type of publication
DateDecember 2017
Language of publication:
English
Number of pages
61Permission for web publi-
cation: yesTitle of publication
Progressive web app with Angular 2 and ASP.NET
Degree programme
Information and Communications Technology
Supervisor(s)
Salmikangas, Esa
Assigned by
Inmics Oy
Abstract
This paper explained the process of designing and implementation of an application using the Angular framework and the ASP.NET framework. The application was developed in In- mics Oy and the main purpose of the application is to manage building inspections and generate reports. The application consists of two main parts; REST API service on the server side and an Angular application on the client side. The first part of the thesis described a concept of Progressive Web Application (PWA), the tools used to create it and main principles that must be followed to consider the applica- tion as PWA. The crucial feature of all PWA features was offline support when an internet connection is not available. Both part of the application, backend and frontend, were developed simultaneously. They communicate via the HTTP protocol using RESTful architectural style. The server provides a secure environment where authentication and authorization are done, and the data can be stored in MS SQL database. Frontend application provides a user-friendly user interface that allows the user to create, edit or delete content in the application. The assigned application was created successfully following the best practices for Angular and ASP.NET development, and the system provides the desired functionality for creating inspections, managing objects such as buildings and their room structure.Keywords/tags
Angular, Typescript, .NET, C#, REST, Service, Progressive Web Application, Service workerMiscellaneous
1Contents
1 Introduction ................................................................................................... 7
2 Progressive web application ........................................................................... 8
2.1 Introduction to progressive web application ................................................. 8
2.2 Caching possibilities of PWA .......................................................................... 9
2.3 Web Application Manifest............................................................................ 12
2.4 Service Worker ............................................................................................. 13
2.5 Service Worker Precache ............................................................................. 14
2.6 Benefits and disadvantages of PWA ............................................................ 15
2.7 Lighthouse .................................................................................................... 15
3 Angular ........................................................................................................ 16
3.1 Introduction to Angular ................................................................................ 16
3.2 Architecture .................................................................................................. 17
3.2.1 Dependency injection............................................................................... 17
3.2.2 Module ..................................................................................................... 19
3.2.3 Directive and component ......................................................................... 20
3.2.4 Service ...................................................................................................... 22
3.2.5 Lifecycle hooks ......................................................................................... 23
3.3 Typescript ..................................................................................................... 24
4 Web API Service ........................................................................................... 26
4.1 Overview ...................................................................................................... 26
4.2 Representational State Transfer API ............................................................ 27
4.3 ASP.NET introduction ................................................................................... 29
4.4 ASP.NET Web API ......................................................................................... 30
4.4.1 Introduction to ASP.NET Web API ............................................................ 30
4.4.2 Routing ..................................................................................................... 31
4.4.3 Controller ................................................................................................. 33
4.4.4 Data access layer ...................................................................................... 34
25 Implementation ............................................................................................ 36
5.1 Introduction .................................................................................................. 36
5.2 Backend application ..................................................................................... 37
5.2.1 Solution structure ..................................................................................... 37
5.2.2 Installing and configuring Entity Framework ........................................... 38
5.2.3 Model ....................................................................................................... 40
5.2.4 Presentation layer .................................................................................... 42
5.2.5 Data Access Layer ..................................................................................... 44
5.3 Angular application ...................................................................................... 45
5.3.1 Setting up the development environment............................................... 45
5.3.2 Create a new Angular project .................................................................. 46
5.3.3 Service for authenticated REST API calls .................................................. 50
5.3.4 Inspection module .................................................................................... 51
5.3.5 SW Precache ............................................................................................. 54
6 Conclusion .................................................................................................... 56
References ................................................................................................... 58
3Figures
Figure 1 - Implementation of the 'Cache than network' caching strategy .................. 11 Figure 2 - Configuration file to set an additional info about a web page .................... 12 Figure 3 - Importing a web application manifest in the head of the web page .......... 12 Figure 4 - Support table for a service worker (Can I use: Service Workers 2017) ....... 13 Figure 5 - Using a service worker as a network middleware (Semenov 2017) ............ 14 Figure 6 - Architecture of Angular framework (Architecture Overview 2017) ............ 17Figure 7 - Injecting of a service to the component ...................................................... 18
Figure 8 - Configuration of root module ...................................................................... 19
Figure 9 - Component class and connected template ................................................. 21
Figure 10 - Data binding syntax and direction of a data flow (Data binding 2017) ..... 21Figure 11 - Implementation of a ConnectivityService .................................................. 23
Figure 12 - Component/directive life cycle (data adapted from Lifecycle Hooks 2017)...................................................................................................................................... 24
Figure 13 - Relationship between Typescript and ECMAScript.................................... 25Figure 14 - Client-server model .................................................................................... 27
Figure 15 - RESTful communication between service provider and consumer ........... 29 Figure 16 - ASP.NET framework architecture (adapted from Hanselman 2012) ......... 30Figure 17 - Web API application architecture .............................................................. 31
Figure 18 - Usage of attribute to define routes ........................................................... 32
Figure 19 ʹ Building controller ..................................................................................... 33
Figure 20 - Application overview .................................................................................. 36
Figure 21 - Creating a REST API project ........................................................................ 38
Figure 22 - Adding ADO.NET Entity Data Model to the application............................. 39 Figure 23 - Selecting database objects which will be in included in the model .......... 39Figure 24 - Business and EF model conversion ............................................................ 40
Figure 25 - Extending EF model class ........................................................................... 41
Figure 26 - Enabling attribute-based routing ............................................................... 42
Figure 27 - Adding new controller ................................................................................ 43
Figure 28 - User API controller ..................................................................................... 43
4 Figure 29 - Encapsulating DB related code with using statement ............................... 44Figure 30 - User data access class ................................................................................ 45
Figure 31 - Project structure generated by Angular CLI ............................................... 47
Figure 32 - Definition of an AppModule ...................................................................... 48
Figure 33 - Definition of CoreModule .......................................................................... 49
Figure 34 - Implementation of AuthHttp service ......................................................... 50
Figure 35 - Mockups for an inspection views ............................................................... 52
Figure 36 - Structure of inspection module ................................................................. 53
Figure 37 - Inspection detail and space inspection view ............................................. 54
Figure 38 - Configuration for an sw-precache module ................................................ 55
5Tables
Table 1 - HTTP method names and related operations ............................................... 28
Table 2 - Project files and its explanations ................................................................... 47
6