6 déc 2017 · that allows the user to create, edit or delete content in the application The assigned It is developed in MS Visual Studio 2015, which offers a
Previous PDF | Next PDF |
[PDF] Progressive web app with Angular 2 and ASPNET - CORE
6 déc 2017 · that allows the user to create, edit or delete content in the application The assigned It is developed in MS Visual Studio 2015, which offers a
[PDF] Front-end Development with ASPNET Core, Angular, and Bootstrap
FIGURE 3-7: Angular project template in Visual Studio 2017 FIGURE 3-8: developer The integration of SASS into Visual Studio 2015 is another example A
[PDF] Building Single Page Application Using Asp Net Core Angular
ActionMicrosoft Visual Studio 2015 UnleashedASP If you are a web application developer interested in using AngularJS for a real-life project, then this book
[PDF] Learning Angular for NET Developers
Chapter 5, Creating an Angular Single-Page Application in Visual Studio, guides you through Angular 2 follows the standardization of ECMAScript 2015
[PDF] Skill Profile & Project CV - Reactive Systems
2016 • Development of a software for measuring particles in clean rooms AngularJs, ASP NET MVC, Bootstrap, C#, HTML, JS, Entity Framework, WCF 2015
[PDF] Development of a front-end application using AngularJS - Theseus
opers To fulfil the requirements, AngularJS, a modern framework, was used for its opment The application is prepared for expanding and modifying as more users in- single comprehensive task of the module (Skrchevski 2015) 3 View : A View is a visual representation of its Model that represented the current state
[PDF] DESKTOP TO WEB: - ContentLabio
desktop apps in both market share and richness of Let's start the discussion of an Angular application's toolchain with a comparison of the desktop and applications in Visual Studio today, there is no reason to Code (VS Code) in 2015
[PDF] angular 2 sample project in visual studio code
[PDF] angular 2 services best practices
[PDF] angular 2 tutorial for beginners learn angular 2 from scratch
[PDF] angular 2 tutorial for beginners pdf
[PDF] angular 2 tutorial for beginners w3schools
[PDF] angular 2 tutorial in hindi
[PDF] angular 2 tutorial javatpoint
[PDF] angular 2 tutorial kudvenkat
[PDF] angular 2 tutorial kudvenkat blog
[PDF] angular 2 tutorial pragimtech
[PDF] angular 2 tutorial step by step
[PDF] angular 2 tutorial w3schools
[PDF] angular 2 tutorial youtube
[PDF] angular 4 book pdf download
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