SlideShare a Scribd company logo
Progressive Web Apps
and React
Mike Melusky – Philly.NET August 16, 2017
Motivation for the Talk
• Keeping up with the Javascript ecosystem and front end web can be
intimidating
 E.g. Ember, Angular, Erlang, Elixir, Yarn, Reason, Typescript, Flow, Redux …
• Geared more for traditional ASP.NET MVC developers who haven’t had the
chance to work with
• Presence of Javascript in development of native “apps” (e.g. Ionic)
Prerequisites
• HTML
• Javascript
• nodejs
• Basic CLI knowledge (very simple)
• IDE of your choice (Atom, Webstorm, Visual Studio Code, et al.)
About the Speaker
• Mike Melusky (@mrjavascript)
 Software Developer at Audacious Inquiry in Baltimore
 Instructor at Penn State and Franklin and Marshall College
Topics
• Introduction to Progressive Web Apps
• RESTful APIs
• AJAX
• CSS Frameworks
• Javascript Libraries (React in particular)
 React Components
 React Navigation between Views
 Infinite Scrolling
• Web App Manifest
• Service Workers
• Final Steps
Progressive Web Apps
Progressive Web Apps
• A Progressive Web App (PWA) is a web app that uses
modern web capabilities to deliver an app-like experience to users
• You can deploy your app as a PWA as well as Native app and take advantage
of both channels
Progressive Web Apps
RESTful APIs and
AJAX
RESTful APIs
• REST (REpresentational State Transfer) APIs and web services provide an
easy way to communicate with a backend architecture without the need to
understand or mess with the architecture itself
• To put it more simply, as a frontend developer, you are going to be
interacting with one or more endpoints (i.e. URIs) that are part of an API
that resides on a server, cluster or similar backend, that someone else has
created for you
• If the API is well-designed, you will be given clear and concise
documentation on how to go about requesting, creating and editing resources
on the backend (provided that you are properly authorized), without ever
having to write backend code
• This effectively allows frontend developers to deal with just
the View and Controller parts of the MVC
AJAX
• AJAX (Asyncronous JavaScript And XML) has been around for years and
every web developer has used it in one way or another (most of us through
jQuery)
• Using AJAX, we can request resources from one or more places online (or
locally, if your page resides on the same server as your requested URI),
anytime we want, without our web applications slowing down or needing to
get all the data to start rendering
• Used to get content from a RESTful API, using AJAX calls
AJAX
Placeholder Content Resources
• JSON Placeholder—Placeholder text outputted in JSON format, covering
many common use-cases. Very easy to get started with, perfect to populate a
mockup web application such as the one we will be making.
• Unsplash It—Placeholder content is not complete without images and this is
the definitive place to get them. The documentation is really clear and easy-
to-follow, so you can get started in no-time.
• Random User Generator—Another high-quality resource, providing you
with generated user profiles that can be custom-tailored to your needs. It
allows for a plethora of options, but we will only need a select few in the
course of this post.
Presentation w/ CSS frameworks
• Most developers use Bootstrap, which is well-documented, has a nice, large
community and is feature-rich
• We’re going to use mini.css
• Before we can render anything on the screen, we should create an
application shell
• ** DEMO **
What is React?
What is React?
• Javascript framework for creating user interfaces
 Full single page web applications
 Just certain parts of a website (like a search form)
• Component-Based
• Very fast (Virtual DOM)
• Created By Facebook
Javascript Components
• Search component
• Directory component  HTML / DOM
• Signup component
Creating React Project in Webstorm
• ** DEMO **
React App in Webstorm
Create React App
•npm install -g create-react-app
React Native in Webstorm
React Native CLI
• npm install -g react-native-cli
Running the React App
• npm start
Running the Unit Tests
• npm test
Building for Production
• npm run build
React and the Virtual
DOM
JSX / ES6 / BABEL
• We write React Apps in… Browsers Understand…
 JSX -Vanilla JS
 ES6  BABEL
React Virtual DOM
React Components
React Components
• Components let you split the UI into independent, reusable pieces, and think
about each piece in isolation.
• Conceptually, components are like JavaScript functions. They accept
arbitrary inputs (called "props") and return React elements describing what
should appear on the screen.
React Components
React Components (ES6)
Rendering the React Component
Rendering the React Component
• Let's recap what happens in this example:
1. We call ReactDOM.render() with the <Welcome name="Sara" /> element.
2. React calls the Welcome component with {name: 'Sara'} as the props.
3. Our Welcome component returns a <h1>Hello, Sara</h1> element as the
result.
4. React DOM efficiently updates the DOM to match <h1>Hello, Sara</h1>.
React Components
• Most of our React code consists of components
 Search Bar component
 Sign-up component
 To-do list component
 List item component
 Add new item (form) component
 Interact with components using “props” and “state”
 ** DEMO **
Component State and Props
React CLI
• npm install -g react-create
• react-create component <component name> --jsx
Converting existing
app to React
Components
Converting to React Components
• ** DEMO **
Babel and React.createElement()
Converting to React Components
• Other features to add:
 Additional view and navigation
 Infinite Scrolling
Infinite Scrolling
Service Workers
Service Workers
• Service Worker is a recent web platform specification that allows you to
cache resources locally in order to make sure that your app still works, even
if the user is not connected to the internet
• Service workers handle three core events:
 install is fired on the first load and is used to perform the initial setup of the Service
Worker, such as setting up offline caches.
 activate is fired after the Service Worker is registered and has been successfully
installed.
 fetch is fired whenever an AJAX request is sent over the network and can be used to
serve cached resources (especially useful when offline).
Service Worker - Install
Service Worker – Activate
Service Worker - Fetch
Web App Manifest
Web App Manifest
• A requirement for a PWA is updating the manifest.json file.
• This file consists of your application’s name, short name, icons, et al.
Web App Manifest
Final Steps and
Production Build
Final Steps
• Evaluate your Web App
 Google Lighthouse
 https://developers.google.com/web/tools/lighthouse/
 Google Mobile Speed Test
 https://testmysite.thinkwithgoogle.com/intl/en-us
Thank you
• “A Beginner’s Guide to Progressive Web Apps and the Front End Web” by
Angelos Chalaris
 https://hackernoon.com/a-beginners-guide-to-progressive-web-apps-the-frontend-
web-424b6d697e35
• “React Tutorials” by The Net Ninja:
 https://www.youtube.com/playlist?list=PL4cUxeGkcC9i0_2FF-WhtRIfIJ1lXlTZR
Additional Resources
• React Dev Tools (Chrome Extension):
 https://chrome.google.com/webstore/detail/react-developer-
tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en
• Swagger UI (API documentation):
 https://swagger.io/swagger-ui/
• Web App Manifest Generator:
 https://tomitm.github.io/appmanifest/
• UI Icons:
 http://fontawesome.io/
 https://feathericons.com/
• Icon Generator
 http://www.favicon-generator.org/
Even More Resources
• Preact – slimmed down alternative to React:
 https://preactjs.com/
• “The Service Worker Lifecycle”:
 https://developers.google.com/web/fundamentals/instant-and-offline/service-
worker/lifecycle
• React Documentation (via Facebook)
 https://facebook.github.io/react/docs/hello-world.html
Ad

More Related Content

What's hot (20)

Pwa demystified
Pwa demystifiedPwa demystified
Pwa demystified
edynamic
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Software Infrastructure
 
Progressive Web-App (PWA)
Progressive Web-App (PWA)Progressive Web-App (PWA)
Progressive Web-App (PWA)
NexThoughts Technologies
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
R. Caner Yıldırım
 
Progressive Web Applications
Progressive Web ApplicationsProgressive Web Applications
Progressive Web Applications
Bartek Igielski
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
Jadson Santos
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web App
Robert Robinson
 
Angular introduction students
Angular introduction studentsAngular introduction students
Angular introduction students
Christian John Felix
 
Angular overview
Angular overviewAngular overview
Angular overview
Thanvilahari
 
Angular 14.pptx
Angular 14.pptxAngular 14.pptx
Angular 14.pptx
MohaNedGhawar
 
Introduction of Progressive Web App
Introduction of Progressive Web AppIntroduction of Progressive Web App
Introduction of Progressive Web App
Sankalp Khandelwal
 
Angular
AngularAngular
Angular
Mouad EL Fakir
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
KMS Technology
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
Knoldus Inc.
 
Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web App
Ido Green
 
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Aleyda Solís
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
Tony Tam
 
Learn react-js
Learn react-jsLearn react-js
Learn react-js
C...L, NESPRESSO, WAFAASSURANCE, SOFRECOM ORANGE
 
Meetup angular http client
Meetup angular http clientMeetup angular http client
Meetup angular http client
Gaurav Madaan
 
Progressive Web Apps are here!
Progressive Web Apps are here!Progressive Web Apps are here!
Progressive Web Apps are here!
Antonio Peric-Mazar
 
Pwa demystified
Pwa demystifiedPwa demystified
Pwa demystified
edynamic
 
Progressive Web Applications
Progressive Web ApplicationsProgressive Web Applications
Progressive Web Applications
Bartek Igielski
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
Jadson Santos
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web App
Robert Robinson
 
Introduction of Progressive Web App
Introduction of Progressive Web AppIntroduction of Progressive Web App
Introduction of Progressive Web App
Sankalp Khandelwal
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
KMS Technology
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
Knoldus Inc.
 
Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web App
Ido Green
 
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Progressive Web Apps (PWAs): Why you want one & how to optimize them #Applaus...
Aleyda Solís
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
Tony Tam
 
Meetup angular http client
Meetup angular http clientMeetup angular http client
Meetup angular http client
Gaurav Madaan
 

Similar to Progressive Web Apps and React (20)

NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfgNEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
zmulani8
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
Dhaval Barot
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Kranthi Lakum
 
Fluxible
FluxibleFluxible
Fluxible
Taylor Lovett
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = Joy
John Need
 
GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)
gdgoncampuslncts
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
Mike Melusky
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
Full Stack_Reac web Development and Application
Full Stack_Reac web Development and ApplicationFull Stack_Reac web Development and Application
Full Stack_Reac web Development and Application
Jeyarajs7
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
Eamonn Boyle
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
MskDotNet Community
 
Reactjs notes.pptx for web development- tutorial and theory
Reactjs  notes.pptx for web development- tutorial and theoryReactjs  notes.pptx for web development- tutorial and theory
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
Mike Melusky
 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with redux
Gaurav Singh
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails Developers
Arkency
 
React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
Learntek1
 
React-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsxReact-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsx
Kulbir4
 
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfgNEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
zmulani8
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
Dhaval Barot
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Kranthi Lakum
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = Joy
John Need
 
GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)
gdgoncampuslncts
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
Mike Melusky
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
Full Stack_Reac web Development and Application
Full Stack_Reac web Development and ApplicationFull Stack_Reac web Development and Application
Full Stack_Reac web Development and Application
Jeyarajs7
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
Eamonn Boyle
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
MskDotNet Community
 
Reactjs notes.pptx for web development- tutorial and theory
Reactjs  notes.pptx for web development- tutorial and theoryReactjs  notes.pptx for web development- tutorial and theory
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
Mike Melusky
 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with redux
Gaurav Singh
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails Developers
Arkency
 
React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
Learntek1
 
React-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsxReact-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsx
Kulbir4
 
Ad

More from Mike Melusky (20)

Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET Developers
Mike Melusky
 
Containerize all the things!
Containerize all the things!Containerize all the things!
Containerize all the things!
Mike Melusky
 
Building a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet coreBuilding a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet core
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2
Mike Melusky
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)
Mike Melusky
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
Mike Melusky
 
An evening with Angular 2
An evening with Angular 2An evening with Angular 2
An evening with Angular 2
Mike Melusky
 
Securing your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protectionSecuring your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protection
Mike Melusky
 
Ember.js and .NET Integration
Ember.js and .NET IntegrationEmber.js and .NET Integration
Ember.js and .NET Integration
Mike Melusky
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
Mike Melusky
 
Emberjs and ASP.NET
Emberjs and ASP.NETEmberjs and ASP.NET
Emberjs and ASP.NET
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
An evening with querydsl
An evening with querydslAn evening with querydsl
An evening with querydsl
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
Fun with windows services
Fun with windows servicesFun with windows services
Fun with windows services
Mike Melusky
 
Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1
Mike Melusky
 
Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET Developers
Mike Melusky
 
Containerize all the things!
Containerize all the things!Containerize all the things!
Containerize all the things!
Mike Melusky
 
Building a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet coreBuilding a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet core
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2
Mike Melusky
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)
Mike Melusky
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
Mike Melusky
 
An evening with Angular 2
An evening with Angular 2An evening with Angular 2
An evening with Angular 2
Mike Melusky
 
Securing your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protectionSecuring your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protection
Mike Melusky
 
Ember.js and .NET Integration
Ember.js and .NET IntegrationEmber.js and .NET Integration
Ember.js and .NET Integration
Mike Melusky
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
Mike Melusky
 
Emberjs and ASP.NET
Emberjs and ASP.NETEmberjs and ASP.NET
Emberjs and ASP.NET
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
An evening with querydsl
An evening with querydslAn evening with querydsl
An evening with querydsl
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
Fun with windows services
Fun with windows servicesFun with windows services
Fun with windows services
Mike Melusky
 
Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1
Mike Melusky
 
Ad

Recently uploaded (20)

DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 

Progressive Web Apps and React

  • 1. Progressive Web Apps and React Mike Melusky – Philly.NET August 16, 2017
  • 2. Motivation for the Talk • Keeping up with the Javascript ecosystem and front end web can be intimidating  E.g. Ember, Angular, Erlang, Elixir, Yarn, Reason, Typescript, Flow, Redux … • Geared more for traditional ASP.NET MVC developers who haven’t had the chance to work with • Presence of Javascript in development of native “apps” (e.g. Ionic)
  • 3. Prerequisites • HTML • Javascript • nodejs • Basic CLI knowledge (very simple) • IDE of your choice (Atom, Webstorm, Visual Studio Code, et al.)
  • 4. About the Speaker • Mike Melusky (@mrjavascript)  Software Developer at Audacious Inquiry in Baltimore  Instructor at Penn State and Franklin and Marshall College
  • 5. Topics • Introduction to Progressive Web Apps • RESTful APIs • AJAX • CSS Frameworks • Javascript Libraries (React in particular)  React Components  React Navigation between Views  Infinite Scrolling • Web App Manifest • Service Workers • Final Steps
  • 7. Progressive Web Apps • A Progressive Web App (PWA) is a web app that uses modern web capabilities to deliver an app-like experience to users • You can deploy your app as a PWA as well as Native app and take advantage of both channels
  • 10. RESTful APIs • REST (REpresentational State Transfer) APIs and web services provide an easy way to communicate with a backend architecture without the need to understand or mess with the architecture itself • To put it more simply, as a frontend developer, you are going to be interacting with one or more endpoints (i.e. URIs) that are part of an API that resides on a server, cluster or similar backend, that someone else has created for you • If the API is well-designed, you will be given clear and concise documentation on how to go about requesting, creating and editing resources on the backend (provided that you are properly authorized), without ever having to write backend code • This effectively allows frontend developers to deal with just the View and Controller parts of the MVC
  • 11. AJAX • AJAX (Asyncronous JavaScript And XML) has been around for years and every web developer has used it in one way or another (most of us through jQuery) • Using AJAX, we can request resources from one or more places online (or locally, if your page resides on the same server as your requested URI), anytime we want, without our web applications slowing down or needing to get all the data to start rendering • Used to get content from a RESTful API, using AJAX calls
  • 12. AJAX
  • 13. Placeholder Content Resources • JSON Placeholder—Placeholder text outputted in JSON format, covering many common use-cases. Very easy to get started with, perfect to populate a mockup web application such as the one we will be making. • Unsplash It—Placeholder content is not complete without images and this is the definitive place to get them. The documentation is really clear and easy- to-follow, so you can get started in no-time. • Random User Generator—Another high-quality resource, providing you with generated user profiles that can be custom-tailored to your needs. It allows for a plethora of options, but we will only need a select few in the course of this post.
  • 14. Presentation w/ CSS frameworks • Most developers use Bootstrap, which is well-documented, has a nice, large community and is feature-rich • We’re going to use mini.css • Before we can render anything on the screen, we should create an application shell • ** DEMO **
  • 16. What is React? • Javascript framework for creating user interfaces  Full single page web applications  Just certain parts of a website (like a search form) • Component-Based • Very fast (Virtual DOM) • Created By Facebook
  • 17. Javascript Components • Search component • Directory component  HTML / DOM • Signup component
  • 18. Creating React Project in Webstorm • ** DEMO **
  • 19. React App in Webstorm
  • 20. Create React App •npm install -g create-react-app
  • 21. React Native in Webstorm
  • 22. React Native CLI • npm install -g react-native-cli
  • 23. Running the React App • npm start
  • 24. Running the Unit Tests • npm test
  • 26. React and the Virtual DOM
  • 27. JSX / ES6 / BABEL • We write React Apps in… Browsers Understand…  JSX -Vanilla JS  ES6  BABEL
  • 30. React Components • Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. • Conceptually, components are like JavaScript functions. They accept arbitrary inputs (called "props") and return React elements describing what should appear on the screen.
  • 33. Rendering the React Component
  • 34. Rendering the React Component • Let's recap what happens in this example: 1. We call ReactDOM.render() with the <Welcome name="Sara" /> element. 2. React calls the Welcome component with {name: 'Sara'} as the props. 3. Our Welcome component returns a <h1>Hello, Sara</h1> element as the result. 4. React DOM efficiently updates the DOM to match <h1>Hello, Sara</h1>.
  • 35. React Components • Most of our React code consists of components  Search Bar component  Sign-up component  To-do list component  List item component  Add new item (form) component  Interact with components using “props” and “state”  ** DEMO **
  • 37. React CLI • npm install -g react-create • react-create component <component name> --jsx
  • 38. Converting existing app to React Components
  • 39. Converting to React Components • ** DEMO **
  • 41. Converting to React Components • Other features to add:  Additional view and navigation  Infinite Scrolling
  • 44. Service Workers • Service Worker is a recent web platform specification that allows you to cache resources locally in order to make sure that your app still works, even if the user is not connected to the internet • Service workers handle three core events:  install is fired on the first load and is used to perform the initial setup of the Service Worker, such as setting up offline caches.  activate is fired after the Service Worker is registered and has been successfully installed.  fetch is fired whenever an AJAX request is sent over the network and can be used to serve cached resources (especially useful when offline).
  • 45. Service Worker - Install
  • 46. Service Worker – Activate
  • 49. Web App Manifest • A requirement for a PWA is updating the manifest.json file. • This file consists of your application’s name, short name, icons, et al.
  • 52. Final Steps • Evaluate your Web App  Google Lighthouse  https://developers.google.com/web/tools/lighthouse/  Google Mobile Speed Test  https://testmysite.thinkwithgoogle.com/intl/en-us
  • 53. Thank you • “A Beginner’s Guide to Progressive Web Apps and the Front End Web” by Angelos Chalaris  https://hackernoon.com/a-beginners-guide-to-progressive-web-apps-the-frontend- web-424b6d697e35 • “React Tutorials” by The Net Ninja:  https://www.youtube.com/playlist?list=PL4cUxeGkcC9i0_2FF-WhtRIfIJ1lXlTZR
  • 54. Additional Resources • React Dev Tools (Chrome Extension):  https://chrome.google.com/webstore/detail/react-developer- tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en • Swagger UI (API documentation):  https://swagger.io/swagger-ui/ • Web App Manifest Generator:  https://tomitm.github.io/appmanifest/ • UI Icons:  http://fontawesome.io/  https://feathericons.com/ • Icon Generator  http://www.favicon-generator.org/
  • 55. Even More Resources • Preact – slimmed down alternative to React:  https://preactjs.com/ • “The Service Worker Lifecycle”:  https://developers.google.com/web/fundamentals/instant-and-offline/service- worker/lifecycle • React Documentation (via Facebook)  https://facebook.github.io/react/docs/hello-world.html