SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
A new way to deliver amazing user experiences on the web.
A Technical Work Shop presentation by Citytech Software Private Limited
To know more about us please visit www.citytechcorp.com
What is a Progressive Web App?
A progressive web app (PWA)
delivers an app-like experience
through your mobile phone’s
browser but has the same
flexibility and gestures as a native
application. Because they are
powered by mobile browsers,
they are not particular to any one
device, meaning developers no
longer need to write separate
code for Android and Apple
devices.
Characteristics of Progressive Web App
Progressive: Gives an app like experience for the mobile website.
Responsive: Design adapts as per device whether desktop, mobile, or
tablet.
Connectivity independent: Uses the browser service worker technology
to work offline or on low-quality networks.
App-like: Feels like a mobile app with app-style interactions since it's
built on the app shell model.
Installable: Allows users to install the website as an app on their
home screen without the taking user to an app store.
Linkable: Easily share via URL, works exactly like normal link tracking on
web.
Re-engageable: Re-engage users with features like push notifications
even when they are not on website.
Discoverable: Identifiable as an "application" through manifest and
service worker registration scope. So normal search engine discovery
rules apply.
Safe: Served via HTTPS to ensure content is securely delivered
How it works:
What you need to build PWA ?
• Node Server (to run node package manager)
• Angular with typescript (Data binding, logic and
http request)
• HTML and CSS (structure and cascading's)
• Chrome Browser
• Chrome extension Lighthouse
• Firebase app
TypeScript Basic
What is TypeScript?
TypeScript is a strongly typed, object oriented, compiled language.
It was designed by Anders Hejlsberg (designer of C#) at Microsoft.
TypeScript is both a language and a set of tools. TypeScript is a
typed superset of JavaScript compiled to JavaScript. In other words,
TypeScript is JavaScript plus some additional features.
Features of TypeScript:
 TypeScript is just JavaScript.
 TypeScript supports other JS libraries.
 JavaScript is TypeScript.
 TypeScript is portable.
Lighthouse
Lighthouse is an open-source, automated
tool for improving the quality of web
pages. You can run it against any web
page, public or requiring authentication. It
has audits for performance, accessibility,
progressive web apps, and more.
You can run Lighthouse in Chrome DevTools, from the command line, or
as a Node module. You give Lighthouse a URL to audit, it runs a series of
audits against the page, and then it generates a report on how well the
page did. From there, use the failing audits as indicators on how to
improve the page. Each audit has a reference doc explaining why the
audit is important, as well as how to fix it.
PWA Manifest
Manifest is a simple JSON file
that gives the developer the
ability to control how the app
should appear to the user in
areas where they would expect
to see apps (a mobile device’s
home screen), direct what the
user can launch, and define its
appearance at launch.
<link rel="manifest"
href="/manifest.json">
Service Workers
Service Worker is a script that your browser runs in the background, separate from the web
page/web app. It is generally used for features that don’t need a web page or user
interaction.
Service Workers provide the technical foundation that features like offline experiences,
periodic background syncs, and push notifications rely on.
Example Contents:
• Creating an Angular App
• Place PWA code in angular app
• Creating the Firebase App
• Installing the Firebase Tools
• Using Firebase In Our Angular App
• Deploying
• Firebase Hosting Dashboard
• Extra: Script to Deploy
• Conclusion
Start progressive web with angular application:
Once we have the CLI, we can create a new Angular app
and test it out using the following:
Step 1. First audit.
Our app is good to go! Let's start setting up Progressive Web Apps.
We need to figure out how is our app going and where our week points take place. And all we have to do is
open our Chrome DevTools and go to the Audits tab, where we can find such a powerful tool as Lighthouse—
 the best diagnostics of web pages.
Step 2. Adding the app shell
An application shell is the minimal UI that user will see ASAP. The app shell should load really fast
to catch user’s eyes and make him wait for the whole content.
2.1 Loader
The most common example of app shell is loader (or spinner), that is visible for users until app and data is ready.
As an example resource, you can go to the codepen.io and search for something like ‘simple css spinner’ and choose
whatever you like. Copy markup and styles directly to your index.html file. Css goes to <style> tag (minifying the css
code would be helpful), the html of your loader — inside <app-root> element (it will be removed automatically when
angular app will be ready to work).
<app-root>
<div id="spinner"></div>
</app-root>
2.2 Header
To avoid an abrupt jumps in view, we can add some fake header-template.
<app-root>
<nav
style="background-color: #673ab7; height: 56px; width: 100%">
</nav>
<div id="loading"></div>
</app-root>
2.3 JS Fallback
Some of the Lighthouse warning says, that we didn’t provide any content, if scripts are not available. To deal with it, we
can use the html tag <noscript>.
For example:
<noscript>
<h3 style="color: #673ab7; font-family: Helvetica; margin: 2rem;">
Sorry, but app is not available without javascript
</h3>
</noscript>
Step 3. Adding the manifest
we can see from the audit results, 3 red warnings tell us that we need something called “manifest”.
The web app manifest provides information about an application (such as name, author, icon, and description) in a
JSON text file. The purpose of the manifest is to install web applications to the homescreen of a device, providing users
with quicker access and a richer experience.
There are a lot of examples of how manifest should look like, but the core info should include app name, short
description, urls to icons for different devices, name of start file and theme color. For our test, I created the following:
Create manifest.json under the src folder and copy/paste the code above. Open the .angular-cli.json file and
add manifest to assets section:
As you can see from the config, we need to include icons of different sizes to our project. For our studying
process, just google for it — choose any you like. (Hint: go to the Google search result Image tab,
find Tools button, and on the slided down toolbar open the size menu. Choose exact size to clarify the search
request). Download images and move them to our assets folder.
Go to the index.html file, add the following tags to head section:
Step 4. Service Worker
The last one. We are at the finish line. The last 3 fails we have are related to absense of something
called Service Worker.
A service worker is a script that your browser runs in the background, separate from a web page, opening the
door to features that don’t need a web page or user interaction.
npm install @angular/service-worker --save
create file
/precache-config.js
Add line
/package.json
Then Run below the command
Ng pwa
Creating the Firebase App
We'll need to create a Firebase account and a Firebase app so that our application knows where to deploy to.
Once you login to your Firebase console, create a new app.
We'll name our app Angular Hosting Test. You can also set the subdomain for your app. Your app will be hosted
at subdomain.firebase-app.com.
Our new app is live! That's all we had to do in the Firebase dashboard. The rest of the work will be done on our
own computer in our applications.
Installing the Firebase Tools
Please run below the command one after one.
npm install -g firebase-tools
firebase login
This will open your browser and allow us to login from there.
That's it! We're all ready to start using the Firebase tools.
Using Firebase In Our Angular App
The first step is to link our local Angular app to our Firebase app we created in the Firebase dashboard.
Here's the answers to the questions Firebase tools will ask:
 Are you ready to proceed? Yes
 Which Firebase CLI features? Hosting (In the future, use whatever you need! Press space to select.)
 Select a default Firebase project? Angular Hosting Test (Choose whatever app you created in the earlier
steps)
 What do you want to use as your public directory? dist (This is important! Angular creates the dist folder.)
 Configure as a single-page app? Yes
App Deploy to Firebase
Now that we have the dist/ folder, we can tell Firebase to deploy it:
Now run below the comment to push code
firebase deploy
Our app is now deployed and ready to view! Run
this Firebase command to see it in action:
Last and final command to open site in browser
firebase open hosting:site
Thank you
A Technical Work Shop presentation by Citytech Software Private Limited
To know more about us please visit www.citytechcorp.com

Contenu connexe

Tendances

Putting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native BostonPutting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native Bostonstan229
 
An introduction to AngularJS
An introduction to AngularJSAn introduction to AngularJS
An introduction to AngularJSYogesh singh
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingHemant Sarthak
 
The Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppThe Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppChristopher Nguyen
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web appsSuraj Kumar
 
Salesforce developer
Salesforce developerSalesforce developer
Salesforce developershanthi priya
 
Salesforce developer
Salesforce developerSalesforce developer
Salesforce developershanthi priya
 
Lo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJSLo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJSMarcel Kalveram
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsDigamber Singh
 
LINE developers site the tech behind the docs
LINE developers site the tech behind the docsLINE developers site the tech behind the docs
LINE developers site the tech behind the docsLINE Corporation
 
CIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM AppsCIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM AppsICF CIRCUIT
 

Tendances (20)

SONY BBS - React Native
SONY BBS - React NativeSONY BBS - React Native
SONY BBS - React Native
 
INTERNSHIP REPORT
INTERNSHIP REPORTINTERNSHIP REPORT
INTERNSHIP REPORT
 
Putting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native BostonPutting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native Boston
 
An introduction to AngularJS
An introduction to AngularJSAn introduction to AngularJS
An introduction to AngularJS
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project Coding
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
The Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppThe Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web App
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
WordCamp Bucharest 2017
WordCamp Bucharest 2017WordCamp Bucharest 2017
WordCamp Bucharest 2017
 
Salesforce developer
Salesforce developerSalesforce developer
Salesforce developer
 
Salesforce developer
Salesforce developerSalesforce developer
Salesforce developer
 
Ionic framework
Ionic frameworkIonic framework
Ionic framework
 
Progressive Web Apps are here!
Progressive Web Apps are here!Progressive Web Apps are here!
Progressive Web Apps are here!
 
6th Salesforce Developer Group - Bilbao
6th Salesforce Developer Group - Bilbao6th Salesforce Developer Group - Bilbao
6th Salesforce Developer Group - Bilbao
 
Lo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJSLo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJS
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
 
Lean Quality & Engineering
Lean Quality & EngineeringLean Quality & Engineering
Lean Quality & Engineering
 
LINE developers site the tech behind the docs
LINE developers site the tech behind the docsLINE developers site the tech behind the docs
LINE developers site the tech behind the docs
 
Universal Windows Platform
Universal Windows PlatformUniversal Windows Platform
Universal Windows Platform
 
CIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM AppsCIRCUIT 2015 - Hybrid App Development with AEM Apps
CIRCUIT 2015 - Hybrid App Development with AEM Apps
 

Similaire à Progressive Web Application by Citytech

COMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docxCOMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docxwrite31
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxsarah david
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications Concetto Labs
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...Paul Jensen
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshareSaleemMalik52
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdfquantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdfsarah david
 
Home management WebApp presentation
Home management WebApp presentationHome management WebApp presentation
Home management WebApp presentationbhavesh singh
 
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdfBig Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdfsarah david
 
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptxBig Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptxsarah david
 
How to build and deploy app on Replit
How to build and deploy app on ReplitHow to build and deploy app on Replit
How to build and deploy app on Replitmatiasfund
 
React Native App Development.
React Native App Development.React Native App Development.
React Native App Development.Techugo
 
Basic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsBasic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsAnjaliTanpure1
 
React Native Market Overview for Cross-Platform App Development.pdf
React Native Market Overview for Cross-Platform App Development.pdfReact Native Market Overview for Cross-Platform App Development.pdf
React Native Market Overview for Cross-Platform App Development.pdfTechugo
 
Introduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning SimpleIntroduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning SimpleSandeep Hijam
 
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfarfa442827
 

Similaire à Progressive Web Application by Citytech (20)

COMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docxCOMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docx
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
 
How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdfquantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
 
Home management WebApp presentation
Home management WebApp presentationHome management WebApp presentation
Home management WebApp presentation
 
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdfBig Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
 
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptxBig Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
 
How to build and deploy app on Replit
How to build and deploy app on ReplitHow to build and deploy app on Replit
How to build and deploy app on Replit
 
React Native App Development.
React Native App Development.React Native App Development.
React Native App Development.
 
Basic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsBasic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web Apps
 
React Native Market Overview for Cross-Platform App Development.pdf
React Native Market Overview for Cross-Platform App Development.pdfReact Native Market Overview for Cross-Platform App Development.pdf
React Native Market Overview for Cross-Platform App Development.pdf
 
Java script hello world
Java script hello worldJava script hello world
Java script hello world
 
Angular
AngularAngular
Angular
 
PWAs overview
PWAs overview PWAs overview
PWAs overview
 
Introduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning SimpleIntroduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning Simple
 
How to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step GuideHow to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step Guide
 
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
 

Dernier

Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 

Dernier (20)

Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 

Progressive Web Application by Citytech

  • 1. A new way to deliver amazing user experiences on the web. A Technical Work Shop presentation by Citytech Software Private Limited To know more about us please visit www.citytechcorp.com
  • 2. What is a Progressive Web App? A progressive web app (PWA) delivers an app-like experience through your mobile phone’s browser but has the same flexibility and gestures as a native application. Because they are powered by mobile browsers, they are not particular to any one device, meaning developers no longer need to write separate code for Android and Apple devices.
  • 3. Characteristics of Progressive Web App Progressive: Gives an app like experience for the mobile website. Responsive: Design adapts as per device whether desktop, mobile, or tablet. Connectivity independent: Uses the browser service worker technology to work offline or on low-quality networks. App-like: Feels like a mobile app with app-style interactions since it's built on the app shell model. Installable: Allows users to install the website as an app on their home screen without the taking user to an app store.
  • 4. Linkable: Easily share via URL, works exactly like normal link tracking on web. Re-engageable: Re-engage users with features like push notifications even when they are not on website. Discoverable: Identifiable as an "application" through manifest and service worker registration scope. So normal search engine discovery rules apply. Safe: Served via HTTPS to ensure content is securely delivered
  • 6. What you need to build PWA ? • Node Server (to run node package manager) • Angular with typescript (Data binding, logic and http request) • HTML and CSS (structure and cascading's) • Chrome Browser • Chrome extension Lighthouse • Firebase app
  • 7. TypeScript Basic What is TypeScript? TypeScript is a strongly typed, object oriented, compiled language. It was designed by Anders Hejlsberg (designer of C#) at Microsoft. TypeScript is both a language and a set of tools. TypeScript is a typed superset of JavaScript compiled to JavaScript. In other words, TypeScript is JavaScript plus some additional features. Features of TypeScript:  TypeScript is just JavaScript.  TypeScript supports other JS libraries.  JavaScript is TypeScript.  TypeScript is portable.
  • 8. Lighthouse Lighthouse is an open-source, automated tool for improving the quality of web pages. You can run it against any web page, public or requiring authentication. It has audits for performance, accessibility, progressive web apps, and more. You can run Lighthouse in Chrome DevTools, from the command line, or as a Node module. You give Lighthouse a URL to audit, it runs a series of audits against the page, and then it generates a report on how well the page did. From there, use the failing audits as indicators on how to improve the page. Each audit has a reference doc explaining why the audit is important, as well as how to fix it.
  • 9. PWA Manifest Manifest is a simple JSON file that gives the developer the ability to control how the app should appear to the user in areas where they would expect to see apps (a mobile device’s home screen), direct what the user can launch, and define its appearance at launch. <link rel="manifest" href="/manifest.json">
  • 10. Service Workers Service Worker is a script that your browser runs in the background, separate from the web page/web app. It is generally used for features that don’t need a web page or user interaction. Service Workers provide the technical foundation that features like offline experiences, periodic background syncs, and push notifications rely on.
  • 11. Example Contents: • Creating an Angular App • Place PWA code in angular app • Creating the Firebase App • Installing the Firebase Tools • Using Firebase In Our Angular App • Deploying • Firebase Hosting Dashboard • Extra: Script to Deploy • Conclusion
  • 12. Start progressive web with angular application: Once we have the CLI, we can create a new Angular app and test it out using the following:
  • 13. Step 1. First audit. Our app is good to go! Let's start setting up Progressive Web Apps. We need to figure out how is our app going and where our week points take place. And all we have to do is open our Chrome DevTools and go to the Audits tab, where we can find such a powerful tool as Lighthouse—  the best diagnostics of web pages. Step 2. Adding the app shell An application shell is the minimal UI that user will see ASAP. The app shell should load really fast to catch user’s eyes and make him wait for the whole content.
  • 14. 2.1 Loader The most common example of app shell is loader (or spinner), that is visible for users until app and data is ready. As an example resource, you can go to the codepen.io and search for something like ‘simple css spinner’ and choose whatever you like. Copy markup and styles directly to your index.html file. Css goes to <style> tag (minifying the css code would be helpful), the html of your loader — inside <app-root> element (it will be removed automatically when angular app will be ready to work). <app-root> <div id="spinner"></div> </app-root> 2.2 Header To avoid an abrupt jumps in view, we can add some fake header-template. <app-root> <nav style="background-color: #673ab7; height: 56px; width: 100%"> </nav> <div id="loading"></div> </app-root>
  • 15. 2.3 JS Fallback Some of the Lighthouse warning says, that we didn’t provide any content, if scripts are not available. To deal with it, we can use the html tag <noscript>. For example: <noscript> <h3 style="color: #673ab7; font-family: Helvetica; margin: 2rem;"> Sorry, but app is not available without javascript </h3> </noscript> Step 3. Adding the manifest we can see from the audit results, 3 red warnings tell us that we need something called “manifest”. The web app manifest provides information about an application (such as name, author, icon, and description) in a JSON text file. The purpose of the manifest is to install web applications to the homescreen of a device, providing users with quicker access and a richer experience. There are a lot of examples of how manifest should look like, but the core info should include app name, short description, urls to icons for different devices, name of start file and theme color. For our test, I created the following:
  • 16.
  • 17. Create manifest.json under the src folder and copy/paste the code above. Open the .angular-cli.json file and add manifest to assets section: As you can see from the config, we need to include icons of different sizes to our project. For our studying process, just google for it — choose any you like. (Hint: go to the Google search result Image tab, find Tools button, and on the slided down toolbar open the size menu. Choose exact size to clarify the search request). Download images and move them to our assets folder. Go to the index.html file, add the following tags to head section:
  • 18. Step 4. Service Worker The last one. We are at the finish line. The last 3 fails we have are related to absense of something called Service Worker. A service worker is a script that your browser runs in the background, separate from a web page, opening the door to features that don’t need a web page or user interaction. npm install @angular/service-worker --save
  • 20. Add line /package.json Then Run below the command Ng pwa
  • 21. Creating the Firebase App We'll need to create a Firebase account and a Firebase app so that our application knows where to deploy to. Once you login to your Firebase console, create a new app.
  • 22. We'll name our app Angular Hosting Test. You can also set the subdomain for your app. Your app will be hosted at subdomain.firebase-app.com.
  • 23. Our new app is live! That's all we had to do in the Firebase dashboard. The rest of the work will be done on our own computer in our applications. Installing the Firebase Tools Please run below the command one after one. npm install -g firebase-tools firebase login This will open your browser and allow us to login from there.
  • 24. That's it! We're all ready to start using the Firebase tools.
  • 25. Using Firebase In Our Angular App The first step is to link our local Angular app to our Firebase app we created in the Firebase dashboard. Here's the answers to the questions Firebase tools will ask:  Are you ready to proceed? Yes  Which Firebase CLI features? Hosting (In the future, use whatever you need! Press space to select.)  Select a default Firebase project? Angular Hosting Test (Choose whatever app you created in the earlier steps)  What do you want to use as your public directory? dist (This is important! Angular creates the dist folder.)  Configure as a single-page app? Yes
  • 26. App Deploy to Firebase Now that we have the dist/ folder, we can tell Firebase to deploy it: Now run below the comment to push code firebase deploy
  • 27. Our app is now deployed and ready to view! Run this Firebase command to see it in action: Last and final command to open site in browser firebase open hosting:site
  • 28. Thank you A Technical Work Shop presentation by Citytech Software Private Limited To know more about us please visit www.citytechcorp.com