SlideShare a Scribd company logo
1 of 47
Download to read offline
COMPONENT-ORIENTED

PWAS WITH VUEJS_
@Rafael_Casuso
A B O U T M E
•CTO @StayApp
•CEO @SnowStormIO
•Organizer @VueJsMadrid,
@BotDevMad
•Software Engineer with +10 years
of experience leading teams and
developing.
•Software Architect looking for
revolutionary ways to change the
world.
•Specialties: JavaScript, NodeJS,
Conversational Intelligences.
2
PROGRESSIVE
WEB
APPLICATION
+ BASICS
WHAT IS A PROGRESSIVE WEB APP?_
‣ IN 2015 DESIGNER FRANCES BERRIMAN AND GOOGLE CHROME ENGINEER
ALEX RUSSELL COINED THE TERM
‣ IT IS A WEB APPLICATION THAT INTEGRATES MODERN BROWSER
TECHNOLOGY LIKE SERVICEWORKER AND APP MANIFEST TO UPGRADE
PROGRESSIVELY INTO MOBILE OS TO ADD NATIVE-LIKE FEATURES
PWA MAIN CHARACTERISTICS_
‣ PROGRESSIVE - INTEGRATES INTO OS THROUGH GRADUAL TECHNOLOGIES
‣ RESPONSIVE - ON ALL SCREEN SIZES
‣ CONNECTIVITY-INDEPENDENT - WORKS OFFLINE DUE TO SERVICE WORKER
‣ APP-LIKE - FULLSCREEN, OS NATIVE-LIKE BEHAVIOUR
‣ FRESH - DUE TO SERVICE WORKER UPDATE PROCESS
‣ SAFE - SERVED WITH HTTPS
‣ DISCOVERABLE - AS APP THANKS TO MANIFEST AND SW REGISTRATION
‣ RE-ENGAGEABLE - WITH FEATURES LIKE PUSH NOTIFICATIONS
‣ INSTALLABLE - ADD TO HOMESCREEN WITHOUT APP STORE
‣ LINKABLE - IT CAN BE SHARED WITH A COMMON WEB LINK
APP SHELL ARCHITECTURE_
‣ APP SHELL IS THE MINIMAL HTML, CSS & JS TO POWER THE USER INTERFACE
‣ IT IS CACHED OFFLINE FOR INSTANT PERFORMANCE WITH SERVICE WORKER
APP DECLARATION_
‣ APP DECLARATION INTO MANIFEST.JSON
‣ APP NAME
‣ ICONS FOR ALL DEVICES
‣ SPLASH SCREEN
‣ BACKGROUND COLOR
‣ NAME AND ICON ARE INFERRED
‣ THEME COLOR FOR TOOLBAR
‣ DISPLAY
‣ ORIENTATION
‣ START URL
APP DECLARATION_
APP INSTALATION_
‣ AUTOMATIC ADD TO HOMESCREEN BUTTON
‣ MANIFEST WITH SHORTNAME, NAME,
192X192 ICON & START URL
‣ REGISTERED SERVICE WORKER
‣ SERVED OVER HTTPS
‣ LAUNCH:
‣ CHROME INITIATES
‣ SPLASH SCREEN IS SHOWN
‣ PWA IS LOADED FROM CACHE OR NET
‣ TARGET FOR ITS URL DOMAIN
WHAT IS A SERVICE WORKER?_
‣ IT IS A TYPE OF WEB WORKER THAT RUNS IN AN INDEPENDENT THREAD
DEDICATED TO NETWORK AND PWA SUPPORT
‣ MAIN FEATURES:
‣ INTERCEPTS NETWORK REQUESTS
‣ CACHING
‣ WEB PUSH NOTIFICATIONS
‣ CURRENT SUPPORT:
‣ CHROME
‣ FIREFOX
‣ STILL EXPERIMENTAL IN EDGE AND SAFARI
SERVICE WORKER_
‣ NETWORK PROXY DESIGNED TO BE ASYNC, NON-BLOCKING
‣ CANNOT PERFORM SYNC OPERATIONS
‣ CANNOT ACCESS DOM DIRECTLY
‣ COMMUNICATES WITH MAIN THREAD THROUGH MESSAGES
‣ SECURE, ONLY RUNS ON HTTPS TO PREVENT MAN-IN-THE-MIDDLE ATTACKS
‣ BECOMES IDLE WHEN NOT USED AND REACTS TO EVENTS
‣ USE PROMISES
‣ IT IS REGISTERED ONCE LOADED
CACHING_
‣ SW APP CACHE USES CACHE API, A PERSISTENCE INDEPENDENT OF
BROWSER CACHE
‣ SERVICE WORKER ASSETS PRECACHING
‣ INTEGRATED INTO BUILD PROCESS
‣ SW-PRECACHE PLUGIN
‣ SW-PRECACHE-WEBPACK
‣ OFFLINE DATA CACHING THROUGH VUEJS:
‣ PERSISTED STORE
‣ VUEX PERSISTED STATE
PUSH NOTIFICATIONS_
‣ HOW THEY WORK - BROWSER TO SERVER:
‣ ASK USER FOR PERMISSION
‣ GET SUBSCRIPTION FROM BROWSER SERVICE
‣ STORE IT IN YOUR SERVER
PUSH NOTIFICATIONS_
‣ HOW THEY WORK - RECEIVING PUSHES:
‣ SERVICE WORKER LISTENS PUSH EVENTS AND SHOWS NOTIFICATION
PUSH NOTIFICATIONS_
VUE PWA TEMPLATE_
‣ VUE BOILERPLATE FOR PWA DEVELOPMENT
‣ https://github.com/vuejs-templates/pwa
‣ INCLUDES
‣ SERVICE WORKER PRECACHING OF APP SHELL
‣ SCRIPT ASYNC PRELOADING
‣ APPLICATION MANIFEST
‣ DEV ENVIRONMENT WITH WEBPACK, HMR, LINTER, SOURCEMAPS
‣ PROD BUILD WITH ASSETS MINIFIER, INJECTION IN GENERATED HTML,
‣ TESTING ENVIRONMENTS FOR BOTH UNIT & FUNCTIONAL TESTS
OS
INTEGRATION
NATIVE-LIKE
FEEL
ENGAGEMENT
A VUEJS
QUICK
INTRODUCTION
+ BASICS
WHAT IS VUEJS?_
‣ A PROGRESSIVE FRAMEWORK FOR BUILDING INTERFACES
‣ MVVM PATTERN WITH FOCUS ON THE VIEWMODEL, CONNECTING
VIEW AND MODEL WITH TWO-WAY REACTIVE DATA-BINDING
‣ CORE VALUES: REACTIVITY, COMPONENTIZATION, MODULARITY,
SIMPLICITY AND STABILITY
‣ INFLUENCED BY ANGULARJS, KNOCKOUTJS, RACTIVEJS AND RIVETJS
MVVM_
INSTANCE EXAMPLE_
INSTANCE LIFECYCLE_
FEATURES_
‣ PROPERTIES ARE REACTIVE ATTRIBUTES PROXIED BY THE INSTANCE FROM DATA OBJECT
‣ METHODS ARE FUNCTIONS TO USE IN THE INSTANCE OR IN DIRECTIVE EXPRESSIONS
‣ INTERPOLATIONS CAN BE TEXT OR ATTRIBUTES WITH PROPERTIES OR JS EXPRESSIONS
‣ DIRECTIVES ARE V-ATTRIBUTES THAT MODIFY THE DOM WHEN JS EXPRESSION
CHANGES
‣ FILTERS ARE FOR TEXT TRANSFORMATIONS, COMPUTED PROPS FOR MORE COMPLEX
‣ COMPUTED PROPS ARE COMPLEX MANIPULATIONS OF REACTIVE PROPS, CACHED
BASED ON THEIR DEPENDENCIES
‣ COMPONENTS ARE USED TOGETHER USUALLY IN PARENT-CHILD RELATIONS
‣ PARENT PASSES DOWN DATA TO THE CHILD VIA PROPS
‣ CHILD SENDS MESSAGES TO PARENT VIA EVENTS
REACTIVITY
DEVELOPER
EXPERIENCE
MODULARITY
COMPONENT
ORIENTED
FRONT-END
+ BASICS
WHAT IS A COMPONENT?_
‣ A FUNCTIONAL REUSABLE, ENCAPSULATED AND AUTONOMOUS PIECE OF
USER INTERFACE
‣ IT HAS ITS OWN INTERFACE TO GET DATA AND INTERACT WITH EXTERIOR
‣ IT REPRESENTS MODULARITY INTO A USER INTERFACE
‣ IT IS COMPOSABLE WITH OTHER COMPONENTS
WHY COMPONENTS?_
‣ FUNCTIONALITY ENCAPSULATION ALLOWS DISTRIBUTED DEVELOPMENT
‣ AUTONOMY ALLOWS REUSABILITY
‣ INDEPENDENCE ALLOWS INDIVIDUAL RENDERING
‣ VIRTUAL DOM ALLOWS DIFFS
‣ REACTIVITY IS APPLIED SELECTIVELY
‣ DATA UPDATES ONLY AS REQUIRED
COMPONENTS ARCHITECTURE_
‣ APPLICATION AS A TREE OF SELF-CONTAINED REUSABLE COMPONENTS
COMPONENTS DEFINITION IN VUEJS_
‣ A COMPONENT IS A VUE INSTANCE WITH PREDEFINED OPTIONS
‣ IT EXTENDS A HTML ELEMENT WITH ENCAPSULATED REUSABLE CODE
‣ THEY ARE NOT WEB COMPONENTS SPECIFICATION CUSTOM ELEMENTS:
‣ DO NOT NEED POLYFILLS
‣ IMPORTANT FEATURES LIKE CROSS-COMPONENT DATA FLOW, CUSTOM
EVENT COMMUNICATION AND BUILD TOOLS INTEGRATION
‣ REGISTRATION CAN BE GLOBAL OR LOCAL
‣ DATA (MODEL) MUST BE A FUNCTION TO AVOID SHARING SAME REFERENCE
BETWEEN COMPONENTS
COMPONENT EXAMPLE_
COMPONENTS COMPOSITION_
‣ COMPONENTS ARE USED TOGETHER USUALLY IN PARENT-CHILD RELATIONS
‣ THEIR COMMUNICATION IS SUMMARIZED AS PROPS DOWN, EVENTS UP:
‣ PARENT PASSES DOWN DATA TO THE CHILD VIA PROPS
‣ CHILD SENDS MESSAGES TO PARENT VIA EVENTS
SINGLE-FILE COMPONENTS_
‣ SINGLE FILE .VUE WHERE TEMPLATE,
JAVASCRIPT AND CSS IS
ENCAPSULATED
‣ BUILD TOOL LIKE WEBPACK OR
BROWSERIFY IS NEEDED
‣ VUE-LOADER FOR WEBPACK &
VUEIFY FOR BROWSERIFY
‣ COMPLETE SYNTAX HIGHLIGHTING
‣ COMMONJS MODULES
‣ COMPONENT-SCOPED CSS
FLEXIBILITY
DISTRIBUTED
DEVELOPMENT
REUSABILITY
THE
APPLICATION
OVERVIEW
+ MEDIUM
APPLICATION STRUCTURE_
‣ APPLICATION-LEVEL NAVIGATION:
‣ COMPONENT-BASED ROUTING
‣ PAGE TRANSITIONS
‣ FLEXIBLE NAVIGATION FOR WEB AND APP ENVIRONMENTS
‣ PUSH NOTIFICATIONS DEEP LINKING
APPLICATION STRUCTURE_
‣ APPLICATION-LEVEL DATA:
‣ DECOUPLED FROM PARTICULAR COMPONENTS
‣ ENCAPSULATED MANAGAMENT
‣ MUTATIONS TO PERFORM TRACKED STATE CHANGE
‣ GETTERS FOR COMPUTED PROPERTIES DERIVED FROM STATE
‣ ACTIONS TO RETRIEVE ASYNC DATA
‣ PERSISTED IN STORE
APPLICATION FEATURES_
‣ COMPLEX COMPONENT-BASED VUEJS APPLICATION
‣ ROUTING WITH VUE-ROUTER, INCLUDING CODE-SPLITTING
‣ STATE MANAGEMENT WITH VUEX
‣ SERVER-SIDE RENDERING
‣ SERVER-SIDE DATA PRE-FETCHING
‣ CLIENT-SIDE STATE & DOM HYDRATION
‣ SINGLE-FILE COMPONENTS
‣ HOT RELOADING IN DEVELOPMENT
‣ CSS EXTRACTION IN PRODUCTION
ROUTING_
‣ VUE-ROUTER IS THE OFFICIAL CORE PLUGIN
‣ DYNAMIC ROUTING MATCHING WITH PARAMS AND QUERY PARAMS
‣ NESTED ROUTES, NAMED ROUTES
‣ REDIRECT & ALIAS
ROUTING EXAMPLE_
PAGE TRANSITIONS_
‣ SINCER ROUTER-VIEW IS A BUILT-IN DYNAMIC COMPONENT

IT CAN HAVE TRANSITIONS
STATE MANAGEMENT_
‣ VUEX IS THE ELM-INSPIRED OFFICIAL FLUX-LIKE IMPLEMENTATION
‣ VUEX CORE IS THE STORE, A CONTAINER OF APPLICATION STATE
‣ STORE IS THE SOURCE OF TRUTH
STATE MANAGEMENT_
STATE MANAGEMENT_
‣ STORE PASSED TO ROOT INSTANCE IS
INJECTED IN CHILD COMPONENTS
‣ COMPONENTS CAN STILL HAVE LOCAL
STATE
‣ STORE STATES ONLY CHANGES
THROUGH COMMITTING MUTATIONS
‣ ACTIONS COMMIT MUTATIONS AND
CAN CONTAIN ASYNC OPERATIONS
STATE MANAGEMENT_
‣ PERSISTED STATE TO LOCAL STORAGE WITH VUEX-PERSISTEDSTATE
‣ ALWAYS CHECK IF DATA ALREADY EXISTS IN STATE
‣ YOU DON’T HAVE TO WAIT FOR ACTIONS TO RESOLVE TO PAINT
‣ PERFORM STORE ACTIONS ANYWAY TO RETRIEVE FRESH DATA
UNIT AND FUNCTIONAL TESTING_
‣ COMPONENT-BASED UNIT TESTING WITH JEST
‣ END-TO-END TESTING WITH NIGHTWATCH
‣ MAIN APPLICATION FUNNELS
COMPONENT-
BASED ROUTING
DECOUPLED
STATE
MANAGEMENT
UNIT &
FUNCTIONAL
TESTING
THANK YOU

More Related Content

Similar to Component-Oriented Progressive Web Applications with VueJS

Angular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJSAngular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJSIlia Idakiev
 
Offline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and ReactOffline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and ReactIlia Idakiev
 
Front-end vs Back-end vs Full-stack Developers – Understand the Difference.pptx
Front-end vs Back-end vs Full-stack Developers – Understand the Difference.pptxFront-end vs Back-end vs Full-stack Developers – Understand the Difference.pptx
Front-end vs Back-end vs Full-stack Developers – Understand the Difference.pptxDianna W. Perry
 
Best online js training institute in chandigarh and converted
Best  online   js  training institute  in chandigarh  and convertedBest  online   js  training institute  in chandigarh  and converted
Best online js training institute in chandigarh and convertedshubhamrana767862
 
Microservices Architecture For Conversational Intelligence Platform
Microservices Architecture For Conversational Intelligence PlatformMicroservices Architecture For Conversational Intelligence Platform
Microservices Architecture For Conversational Intelligence PlatformRafael Casuso Romate
 
Best online js training institute in chandigarh and
Best  online   js  training institute  in chandigarh  andBest  online   js  training institute  in chandigarh  and
Best online js training institute in chandigarh andshubhamrana767862
 
State management for enterprise angular applications
State management for enterprise angular applicationsState management for enterprise angular applications
State management for enterprise angular applicationsIlia Idakiev
 
The importance of developing PWAs in ReactJs
The importance of developing PWAs in ReactJsThe importance of developing PWAs in ReactJs
The importance of developing PWAs in ReactJsReactJS
 
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)hayesct
 
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)SolarWinds
 
Introduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web ApplicationsIntroduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web ApplicationsIlia Idakiev
 
A walkthrough on SAP Cloud Platform Mobile Services
A walkthrough on SAP Cloud Platform Mobile Services A walkthrough on SAP Cloud Platform Mobile Services
A walkthrough on SAP Cloud Platform Mobile Services Jitendra Kansal
 
QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...
QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...
QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...Risk Analysis Consultants, s.r.o.
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationPace Integration
 
Twelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring FrameworkTwelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring Frameworkdinkar thakur
 
SolarWinds Federal User Group 2016 - SolarWinds Product Strategy Update
SolarWinds Federal User Group 2016 - SolarWinds Product Strategy UpdateSolarWinds Federal User Group 2016 - SolarWinds Product Strategy Update
SolarWinds Federal User Group 2016 - SolarWinds Product Strategy UpdateSolarWinds
 
One Gateway to Rule them All: Building a Federated API Management Platform
One Gateway to Rule them All: Building a Federated API Management PlatformOne Gateway to Rule them All: Building a Federated API Management Platform
One Gateway to Rule them All: Building a Federated API Management PlatformSven Bernhardt
 
Connect Ops and Security with Flexible Web App and API Protection
Connect Ops and Security with Flexible Web App and API ProtectionConnect Ops and Security with Flexible Web App and API Protection
Connect Ops and Security with Flexible Web App and API ProtectionDevOps.com
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web appsAkshay Sharma
 

Similar to Component-Oriented Progressive Web Applications with VueJS (20)

VueJS: The Simple Revolution
VueJS: The Simple RevolutionVueJS: The Simple Revolution
VueJS: The Simple Revolution
 
Angular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJSAngular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJS
 
Offline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and ReactOffline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and React
 
Front-end vs Back-end vs Full-stack Developers – Understand the Difference.pptx
Front-end vs Back-end vs Full-stack Developers – Understand the Difference.pptxFront-end vs Back-end vs Full-stack Developers – Understand the Difference.pptx
Front-end vs Back-end vs Full-stack Developers – Understand the Difference.pptx
 
Best online js training institute in chandigarh and converted
Best  online   js  training institute  in chandigarh  and convertedBest  online   js  training institute  in chandigarh  and converted
Best online js training institute in chandigarh and converted
 
Microservices Architecture For Conversational Intelligence Platform
Microservices Architecture For Conversational Intelligence PlatformMicroservices Architecture For Conversational Intelligence Platform
Microservices Architecture For Conversational Intelligence Platform
 
Best online js training institute in chandigarh and
Best  online   js  training institute  in chandigarh  andBest  online   js  training institute  in chandigarh  and
Best online js training institute in chandigarh and
 
State management for enterprise angular applications
State management for enterprise angular applicationsState management for enterprise angular applications
State management for enterprise angular applications
 
The importance of developing PWAs in ReactJs
The importance of developing PWAs in ReactJsThe importance of developing PWAs in ReactJs
The importance of developing PWAs in ReactJs
 
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
 
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
SolarWinds Federal Webinar - Maximizing Your Deployment with Appstack (Jan2016)
 
Introduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web ApplicationsIntroduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web Applications
 
A walkthrough on SAP Cloud Platform Mobile Services
A walkthrough on SAP Cloud Platform Mobile Services A walkthrough on SAP Cloud Platform Mobile Services
A walkthrough on SAP Cloud Platform Mobile Services
 
QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...
QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...
QualysGuard InfoDay 2014 - QualysGuard Web Application Security a Web Applica...
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP Integration
 
Twelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring FrameworkTwelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring Framework
 
SolarWinds Federal User Group 2016 - SolarWinds Product Strategy Update
SolarWinds Federal User Group 2016 - SolarWinds Product Strategy UpdateSolarWinds Federal User Group 2016 - SolarWinds Product Strategy Update
SolarWinds Federal User Group 2016 - SolarWinds Product Strategy Update
 
One Gateway to Rule them All: Building a Federated API Management Platform
One Gateway to Rule them All: Building a Federated API Management PlatformOne Gateway to Rule them All: Building a Federated API Management Platform
One Gateway to Rule them All: Building a Federated API Management Platform
 
Connect Ops and Security with Flexible Web App and API Protection
Connect Ops and Security with Flexible Web App and API ProtectionConnect Ops and Security with Flexible Web App and API Protection
Connect Ops and Security with Flexible Web App and API Protection
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 

More from Rafael Casuso Romate

Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRafael Casuso Romate
 
Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)Rafael Casuso Romate
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSRafael Casuso Romate
 
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8Rafael Casuso Romate
 

More from Rafael Casuso Romate (6)

Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend Developer
 
Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)
 
The Core of Agile
The Core of AgileThe Core of Agile
The Core of Agile
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJS
 
The Voice Interface Revolution
The Voice Interface RevolutionThe Voice Interface Revolution
The Voice Interface Revolution
 
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8
 

Recently uploaded

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfryanfarris8
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 

Recently uploaded (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 

Component-Oriented Progressive Web Applications with VueJS

  • 2. @Rafael_Casuso A B O U T M E •CTO @StayApp •CEO @SnowStormIO •Organizer @VueJsMadrid, @BotDevMad •Software Engineer with +10 years of experience leading teams and developing. •Software Architect looking for revolutionary ways to change the world. •Specialties: JavaScript, NodeJS, Conversational Intelligences. 2
  • 4. WHAT IS A PROGRESSIVE WEB APP?_ ‣ IN 2015 DESIGNER FRANCES BERRIMAN AND GOOGLE CHROME ENGINEER ALEX RUSSELL COINED THE TERM ‣ IT IS A WEB APPLICATION THAT INTEGRATES MODERN BROWSER TECHNOLOGY LIKE SERVICEWORKER AND APP MANIFEST TO UPGRADE PROGRESSIVELY INTO MOBILE OS TO ADD NATIVE-LIKE FEATURES
  • 5. PWA MAIN CHARACTERISTICS_ ‣ PROGRESSIVE - INTEGRATES INTO OS THROUGH GRADUAL TECHNOLOGIES ‣ RESPONSIVE - ON ALL SCREEN SIZES ‣ CONNECTIVITY-INDEPENDENT - WORKS OFFLINE DUE TO SERVICE WORKER ‣ APP-LIKE - FULLSCREEN, OS NATIVE-LIKE BEHAVIOUR ‣ FRESH - DUE TO SERVICE WORKER UPDATE PROCESS ‣ SAFE - SERVED WITH HTTPS ‣ DISCOVERABLE - AS APP THANKS TO MANIFEST AND SW REGISTRATION ‣ RE-ENGAGEABLE - WITH FEATURES LIKE PUSH NOTIFICATIONS ‣ INSTALLABLE - ADD TO HOMESCREEN WITHOUT APP STORE ‣ LINKABLE - IT CAN BE SHARED WITH A COMMON WEB LINK
  • 6. APP SHELL ARCHITECTURE_ ‣ APP SHELL IS THE MINIMAL HTML, CSS & JS TO POWER THE USER INTERFACE ‣ IT IS CACHED OFFLINE FOR INSTANT PERFORMANCE WITH SERVICE WORKER
  • 7. APP DECLARATION_ ‣ APP DECLARATION INTO MANIFEST.JSON ‣ APP NAME ‣ ICONS FOR ALL DEVICES ‣ SPLASH SCREEN ‣ BACKGROUND COLOR ‣ NAME AND ICON ARE INFERRED ‣ THEME COLOR FOR TOOLBAR ‣ DISPLAY ‣ ORIENTATION ‣ START URL
  • 9. APP INSTALATION_ ‣ AUTOMATIC ADD TO HOMESCREEN BUTTON ‣ MANIFEST WITH SHORTNAME, NAME, 192X192 ICON & START URL ‣ REGISTERED SERVICE WORKER ‣ SERVED OVER HTTPS ‣ LAUNCH: ‣ CHROME INITIATES ‣ SPLASH SCREEN IS SHOWN ‣ PWA IS LOADED FROM CACHE OR NET ‣ TARGET FOR ITS URL DOMAIN
  • 10. WHAT IS A SERVICE WORKER?_ ‣ IT IS A TYPE OF WEB WORKER THAT RUNS IN AN INDEPENDENT THREAD DEDICATED TO NETWORK AND PWA SUPPORT ‣ MAIN FEATURES: ‣ INTERCEPTS NETWORK REQUESTS ‣ CACHING ‣ WEB PUSH NOTIFICATIONS ‣ CURRENT SUPPORT: ‣ CHROME ‣ FIREFOX ‣ STILL EXPERIMENTAL IN EDGE AND SAFARI
  • 11. SERVICE WORKER_ ‣ NETWORK PROXY DESIGNED TO BE ASYNC, NON-BLOCKING ‣ CANNOT PERFORM SYNC OPERATIONS ‣ CANNOT ACCESS DOM DIRECTLY ‣ COMMUNICATES WITH MAIN THREAD THROUGH MESSAGES ‣ SECURE, ONLY RUNS ON HTTPS TO PREVENT MAN-IN-THE-MIDDLE ATTACKS ‣ BECOMES IDLE WHEN NOT USED AND REACTS TO EVENTS ‣ USE PROMISES ‣ IT IS REGISTERED ONCE LOADED
  • 12. CACHING_ ‣ SW APP CACHE USES CACHE API, A PERSISTENCE INDEPENDENT OF BROWSER CACHE ‣ SERVICE WORKER ASSETS PRECACHING ‣ INTEGRATED INTO BUILD PROCESS ‣ SW-PRECACHE PLUGIN ‣ SW-PRECACHE-WEBPACK ‣ OFFLINE DATA CACHING THROUGH VUEJS: ‣ PERSISTED STORE ‣ VUEX PERSISTED STATE
  • 13. PUSH NOTIFICATIONS_ ‣ HOW THEY WORK - BROWSER TO SERVER: ‣ ASK USER FOR PERMISSION ‣ GET SUBSCRIPTION FROM BROWSER SERVICE ‣ STORE IT IN YOUR SERVER
  • 14. PUSH NOTIFICATIONS_ ‣ HOW THEY WORK - RECEIVING PUSHES: ‣ SERVICE WORKER LISTENS PUSH EVENTS AND SHOWS NOTIFICATION
  • 16. VUE PWA TEMPLATE_ ‣ VUE BOILERPLATE FOR PWA DEVELOPMENT ‣ https://github.com/vuejs-templates/pwa ‣ INCLUDES ‣ SERVICE WORKER PRECACHING OF APP SHELL ‣ SCRIPT ASYNC PRELOADING ‣ APPLICATION MANIFEST ‣ DEV ENVIRONMENT WITH WEBPACK, HMR, LINTER, SOURCEMAPS ‣ PROD BUILD WITH ASSETS MINIFIER, INJECTION IN GENERATED HTML, ‣ TESTING ENVIRONMENTS FOR BOTH UNIT & FUNCTIONAL TESTS
  • 19. WHAT IS VUEJS?_ ‣ A PROGRESSIVE FRAMEWORK FOR BUILDING INTERFACES ‣ MVVM PATTERN WITH FOCUS ON THE VIEWMODEL, CONNECTING VIEW AND MODEL WITH TWO-WAY REACTIVE DATA-BINDING ‣ CORE VALUES: REACTIVITY, COMPONENTIZATION, MODULARITY, SIMPLICITY AND STABILITY ‣ INFLUENCED BY ANGULARJS, KNOCKOUTJS, RACTIVEJS AND RIVETJS
  • 20. MVVM_
  • 23. FEATURES_ ‣ PROPERTIES ARE REACTIVE ATTRIBUTES PROXIED BY THE INSTANCE FROM DATA OBJECT ‣ METHODS ARE FUNCTIONS TO USE IN THE INSTANCE OR IN DIRECTIVE EXPRESSIONS ‣ INTERPOLATIONS CAN BE TEXT OR ATTRIBUTES WITH PROPERTIES OR JS EXPRESSIONS ‣ DIRECTIVES ARE V-ATTRIBUTES THAT MODIFY THE DOM WHEN JS EXPRESSION CHANGES ‣ FILTERS ARE FOR TEXT TRANSFORMATIONS, COMPUTED PROPS FOR MORE COMPLEX ‣ COMPUTED PROPS ARE COMPLEX MANIPULATIONS OF REACTIVE PROPS, CACHED BASED ON THEIR DEPENDENCIES ‣ COMPONENTS ARE USED TOGETHER USUALLY IN PARENT-CHILD RELATIONS ‣ PARENT PASSES DOWN DATA TO THE CHILD VIA PROPS ‣ CHILD SENDS MESSAGES TO PARENT VIA EVENTS
  • 26. WHAT IS A COMPONENT?_ ‣ A FUNCTIONAL REUSABLE, ENCAPSULATED AND AUTONOMOUS PIECE OF USER INTERFACE ‣ IT HAS ITS OWN INTERFACE TO GET DATA AND INTERACT WITH EXTERIOR ‣ IT REPRESENTS MODULARITY INTO A USER INTERFACE ‣ IT IS COMPOSABLE WITH OTHER COMPONENTS
  • 27. WHY COMPONENTS?_ ‣ FUNCTIONALITY ENCAPSULATION ALLOWS DISTRIBUTED DEVELOPMENT ‣ AUTONOMY ALLOWS REUSABILITY ‣ INDEPENDENCE ALLOWS INDIVIDUAL RENDERING ‣ VIRTUAL DOM ALLOWS DIFFS ‣ REACTIVITY IS APPLIED SELECTIVELY ‣ DATA UPDATES ONLY AS REQUIRED
  • 28. COMPONENTS ARCHITECTURE_ ‣ APPLICATION AS A TREE OF SELF-CONTAINED REUSABLE COMPONENTS
  • 29. COMPONENTS DEFINITION IN VUEJS_ ‣ A COMPONENT IS A VUE INSTANCE WITH PREDEFINED OPTIONS ‣ IT EXTENDS A HTML ELEMENT WITH ENCAPSULATED REUSABLE CODE ‣ THEY ARE NOT WEB COMPONENTS SPECIFICATION CUSTOM ELEMENTS: ‣ DO NOT NEED POLYFILLS ‣ IMPORTANT FEATURES LIKE CROSS-COMPONENT DATA FLOW, CUSTOM EVENT COMMUNICATION AND BUILD TOOLS INTEGRATION ‣ REGISTRATION CAN BE GLOBAL OR LOCAL ‣ DATA (MODEL) MUST BE A FUNCTION TO AVOID SHARING SAME REFERENCE BETWEEN COMPONENTS
  • 31. COMPONENTS COMPOSITION_ ‣ COMPONENTS ARE USED TOGETHER USUALLY IN PARENT-CHILD RELATIONS ‣ THEIR COMMUNICATION IS SUMMARIZED AS PROPS DOWN, EVENTS UP: ‣ PARENT PASSES DOWN DATA TO THE CHILD VIA PROPS ‣ CHILD SENDS MESSAGES TO PARENT VIA EVENTS
  • 32. SINGLE-FILE COMPONENTS_ ‣ SINGLE FILE .VUE WHERE TEMPLATE, JAVASCRIPT AND CSS IS ENCAPSULATED ‣ BUILD TOOL LIKE WEBPACK OR BROWSERIFY IS NEEDED ‣ VUE-LOADER FOR WEBPACK & VUEIFY FOR BROWSERIFY ‣ COMPLETE SYNTAX HIGHLIGHTING ‣ COMMONJS MODULES ‣ COMPONENT-SCOPED CSS
  • 35. APPLICATION STRUCTURE_ ‣ APPLICATION-LEVEL NAVIGATION: ‣ COMPONENT-BASED ROUTING ‣ PAGE TRANSITIONS ‣ FLEXIBLE NAVIGATION FOR WEB AND APP ENVIRONMENTS ‣ PUSH NOTIFICATIONS DEEP LINKING
  • 36. APPLICATION STRUCTURE_ ‣ APPLICATION-LEVEL DATA: ‣ DECOUPLED FROM PARTICULAR COMPONENTS ‣ ENCAPSULATED MANAGAMENT ‣ MUTATIONS TO PERFORM TRACKED STATE CHANGE ‣ GETTERS FOR COMPUTED PROPERTIES DERIVED FROM STATE ‣ ACTIONS TO RETRIEVE ASYNC DATA ‣ PERSISTED IN STORE
  • 37. APPLICATION FEATURES_ ‣ COMPLEX COMPONENT-BASED VUEJS APPLICATION ‣ ROUTING WITH VUE-ROUTER, INCLUDING CODE-SPLITTING ‣ STATE MANAGEMENT WITH VUEX ‣ SERVER-SIDE RENDERING ‣ SERVER-SIDE DATA PRE-FETCHING ‣ CLIENT-SIDE STATE & DOM HYDRATION ‣ SINGLE-FILE COMPONENTS ‣ HOT RELOADING IN DEVELOPMENT ‣ CSS EXTRACTION IN PRODUCTION
  • 38. ROUTING_ ‣ VUE-ROUTER IS THE OFFICIAL CORE PLUGIN ‣ DYNAMIC ROUTING MATCHING WITH PARAMS AND QUERY PARAMS ‣ NESTED ROUTES, NAMED ROUTES ‣ REDIRECT & ALIAS
  • 40. PAGE TRANSITIONS_ ‣ SINCER ROUTER-VIEW IS A BUILT-IN DYNAMIC COMPONENT
 IT CAN HAVE TRANSITIONS
  • 41. STATE MANAGEMENT_ ‣ VUEX IS THE ELM-INSPIRED OFFICIAL FLUX-LIKE IMPLEMENTATION ‣ VUEX CORE IS THE STORE, A CONTAINER OF APPLICATION STATE ‣ STORE IS THE SOURCE OF TRUTH
  • 43. STATE MANAGEMENT_ ‣ STORE PASSED TO ROOT INSTANCE IS INJECTED IN CHILD COMPONENTS ‣ COMPONENTS CAN STILL HAVE LOCAL STATE ‣ STORE STATES ONLY CHANGES THROUGH COMMITTING MUTATIONS ‣ ACTIONS COMMIT MUTATIONS AND CAN CONTAIN ASYNC OPERATIONS
  • 44. STATE MANAGEMENT_ ‣ PERSISTED STATE TO LOCAL STORAGE WITH VUEX-PERSISTEDSTATE ‣ ALWAYS CHECK IF DATA ALREADY EXISTS IN STATE ‣ YOU DON’T HAVE TO WAIT FOR ACTIONS TO RESOLVE TO PAINT ‣ PERFORM STORE ACTIONS ANYWAY TO RETRIEVE FRESH DATA
  • 45. UNIT AND FUNCTIONAL TESTING_ ‣ COMPONENT-BASED UNIT TESTING WITH JEST ‣ END-TO-END TESTING WITH NIGHTWATCH ‣ MAIN APPLICATION FUNNELS