SlideShare a Scribd company logo
1 of 36
Download to read offline
VUE JS
THE SIMPLE REVOLUTION_
@Rafael_Casuso
A B O U T M E
•Head of JavaScript @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
A
GENTLE
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 LIFECYCLE_
INSTANCE EXAMPLE_
PROPERTIES & METHODS_
‣ METHODS ARE FUNCTIONS TO USE IN THE INSTANCE OR IN DIRECTIVE EXPRESSIONS
‣ PROPERTIES ARE REACTIVE ATTRIBUTES PROXIED BY THE INSTANCE FROM DATA OBJECT
INTERPOLATIONS, DIRECTIVES & FILTERS_
‣ 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
THE
REACTIVITY
EXPLORATION
+ MEDIUM
REACTIVITY_
REACTIVITY INTERNALS_
‣ CHANGES ARE TRACKED THROUGH GETTERS (DEPENDENCIES) AND
SETTERS (NOTIFICATIONS) ON DATA PROPERTIES
‣ REACTIVE ROOT PROPERTIES MUST BE DECLARED UPFRONT, NESTED
CAN BE ADDED WITH VM.SET
‣ ALL DOM UPDATES ARE ASYNCHRONOUS, WITH A QUEUE THAT
BUFFERS ALL CHANGES WITHIN THE SAME EVENT LOOP AND WILL BE
RENDERED IN THE NEXT TICK
COMPUTED PROPERTIES AND WATCHERS_
‣ COMPUTED PROPS ARE COMPLEX
MANIPULATIONS OF REACTIVE PROPS,
CACHED BASED ON THEIR
DEPENDENCIES
‣ WATCHERS ARE GENERIC WAY TO REACT
TO DATA CHANGES, FOR
ASYNCHRONOUS OR EXPENSIVE
OPERATIONS
THE
VIEW
MODIFICATION
+ MEDIUM
VIEW TO MODEL_
‣ V-ON DIRECTIVE TO BIND USER EVENTS TO INSTANCE METHODS
‣ IT ACCEPTS EVENT MODIFIERS
FORM INPUT BINDING_
‣ V-MODEL DIRECTIVE TO BIND USER INPUT TO PROPERTIES
‣ V-FOR FOR LOOP ARRAY PROPERTIES
THE
COMPONENTS
COMPOSITION
+ MEDIUM
COMPONENTS ARCHITECTURE_
‣ APPLICATION AS A TREE OF SELF-CONTAINED REUSABLE COMPONENTS
COMPONENTS DEFINITION_
‣ 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
PROPS_
‣ CUSTOM ATTRIBUTES TO PASS DOWN DATA FROM PARENT TO CHILD COMPONENTS
‣ THEY FOLLOW ONE-WAY-DOWN PATTERN, CAN NOT BE MODIFIED IN CHILD
‣ CHILD MUST DECLARE THE PROPS IT EXPECTS
‣ THEY CAN BE BINDED IN THE TEMPLATE IN ORDER TO UPDATE WHEN PARENT DATA
CHANGES
CUSTOM EVENTS_
‣ VUE INSTANCE IMPLEMENTS AN EVENT INTERFACE:
‣ LISTEN AN EVENT WITH $ON(EVENTNAME)
‣ TRIGGERS AN EVENT WITH $EMIT(EVENTNAME)
‣ PARENT COMPONENT CAN LISTEN CHILD EVENTS WITH V-ON DIRECTLY IN TEMPLATE
CONTENT DISTRIBUTION WITH SLOTS_
‣ EVERYTHING IN PARENT TEMPLATE WILL BE
COMPILED IN PARENT SCOPE
‣ EVERYTHING IN CHILD TEMPLATE WILL BE
COMPILED IN CHILD SCOPE
‣ SLOTS ARE PLACEHOLDERS FOR PARENT
CONTENT INTO CHILD COMPONENT
THE
COMPLEX
APPLICATION
+ MEDIUM
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
ROUTING_
‣ VUE-ROUTER IS THE OFFICIAL CORE PLUGIN
‣ DYNAMIC ROUTING MATCHING WITH PARAMS AND QUERY PARAMS
‣ NESTED ROUTES, NAMED ROUTES
‣ REDIRECT & ALIAS
ROUTING EXAMPLE_
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_
‣ 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
TOOLS_
‣ VUE-CLI FOR SCAFFOLDING
PROJECTS
‣ VUE DEV TOOLS FOR
INSPECTING COMPONENTS,
PROPERTIES AND TIME-TRAVEL
DEBUGGING
VUEJS
VS
OTHERS
+ ADVANCED
VUEJS 2.0 BENCHMARKS_
‣ PERFORMANCE
VUEJS VS REACT_
‣ REACT WINS IN RICHNESS OF ITS ECOSYSTEM AND CUSTOM RENDERERS
‣ VUEJS WINS IN ALL PERFORMANCE PROFILES
‣ ITS VIRTUAL DOM IMPLEMENTATION SNABBDOM-BASED IS FASTER WITH
LESS CALCULATIONS
‣ UPDATE PERFORMANCE:
‣ REACT RE-RENDERS WHOLE SUB-TREE

WHEN COMPONENT STATE CHANGES
‣ VUEJS TRACK DEPS ON RENDERING SO ONLY

UPDATES SPECIFIC COMPONENTS
‣ VUEJS FASTER DEV MODE WITH UP TO 10XFRAME RATE
THANK YOU

More Related Content

What's hot (20)

Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.js
 
The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.js
 
Why Vue.js?
Why Vue.js?Why Vue.js?
Why Vue.js?
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
Deep dive into Vue.js
Deep dive into Vue.jsDeep dive into Vue.js
Deep dive into Vue.js
 
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue
 
Vue.js
Vue.jsVue.js
Vue.js
 
Vue js for beginner
Vue js for beginner Vue js for beginner
Vue js for beginner
 
Nuxt.js - Introduction
Nuxt.js - IntroductionNuxt.js - Introduction
Nuxt.js - Introduction
 
Nuxtjs cheat-sheet
Nuxtjs cheat-sheetNuxtjs cheat-sheet
Nuxtjs cheat-sheet
 
Nuxt.JS Introdruction
Nuxt.JS IntrodructionNuxt.JS Introdruction
Nuxt.JS Introdruction
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring Boot
 
State manager in Vue.js, from zero to Vuex
State manager in Vue.js, from zero to VuexState manager in Vue.js, from zero to Vuex
State manager in Vue.js, from zero to Vuex
 
Reactjs
ReactjsReactjs
Reactjs
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced Routing
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
React js programming concept
React js programming conceptReact js programming concept
React js programming concept
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
Vuex
VuexVuex
Vuex
 
Webpack slides
Webpack slidesWebpack slides
Webpack slides
 

Viewers also liked

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
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構Hina Chen
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]Kuro Hsu
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsTakuya Tejima
 
Vue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thingVue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thingJoonas Lehtonen
 
VueJS meetup (Basics) @ nodum.io
VueJS meetup (Basics) @ nodum.ioVueJS meetup (Basics) @ nodum.io
VueJS meetup (Basics) @ nodum.ioWietse Wind
 
nodum.io MongoDB Meetup (Dutch)
nodum.io MongoDB Meetup (Dutch)nodum.io MongoDB Meetup (Dutch)
nodum.io MongoDB Meetup (Dutch)Wietse Wind
 
World of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the WorldWorld of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the WorldElena Gorman
 
VueJS - Uma alternativa elegante
VueJS - Uma alternativa eleganteVueJS - Uma alternativa elegante
VueJS - Uma alternativa eleganteJonathan Bijos
 
Gui Input Tools for Math [UKMC09]
Gui Input Tools for Math [UKMC09]Gui Input Tools for Math [UKMC09]
Gui Input Tools for Math [UKMC09]Greg TAPPERO
 
Politische Ponerologie
Politische PonerologiePolitische Ponerologie
Politische PonerologieMCExorzist
 
Muammar al-Gaddafi - Das Grüne Buch
Muammar al-Gaddafi - Das Grüne BuchMuammar al-Gaddafi - Das Grüne Buch
Muammar al-Gaddafi - Das Grüne BuchMCExorzist
 
Real History - The Bad War (english 115s)
Real History - The Bad War (english 115s)Real History - The Bad War (english 115s)
Real History - The Bad War (english 115s)MCExorzist
 
Gerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233SGerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233SMCExorzist
 
Thomas Goodrich - Hellstorm The Death Of Nazi Germany
Thomas Goodrich - Hellstorm The Death Of Nazi GermanyThomas Goodrich - Hellstorm The Death Of Nazi Germany
Thomas Goodrich - Hellstorm The Death Of Nazi GermanyMCExorzist
 
JavaScript - The Universal Platform?
JavaScript - The Universal Platform?JavaScript - The Universal Platform?
JavaScript - The Universal Platform?Jonas Bandi
 

Viewers also liked (20)

Microservices Architecture For Conversational Intelligence Platform
Microservices Architecture For Conversational Intelligence PlatformMicroservices Architecture For Conversational Intelligence Platform
Microservices Architecture For Conversational Intelligence Platform
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]
 
Vuejs testing
Vuejs testingVuejs testing
Vuejs testing
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js
 
How tovuejs
How tovuejsHow tovuejs
How tovuejs
 
Vue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thingVue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thing
 
JS class slides (2016)
JS class slides (2016)JS class slides (2016)
JS class slides (2016)
 
VueJS meetup (Basics) @ nodum.io
VueJS meetup (Basics) @ nodum.ioVueJS meetup (Basics) @ nodum.io
VueJS meetup (Basics) @ nodum.io
 
nodum.io MongoDB Meetup (Dutch)
nodum.io MongoDB Meetup (Dutch)nodum.io MongoDB Meetup (Dutch)
nodum.io MongoDB Meetup (Dutch)
 
World of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the WorldWorld of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the World
 
VueJS - Uma alternativa elegante
VueJS - Uma alternativa eleganteVueJS - Uma alternativa elegante
VueJS - Uma alternativa elegante
 
Gui Input Tools for Math [UKMC09]
Gui Input Tools for Math [UKMC09]Gui Input Tools for Math [UKMC09]
Gui Input Tools for Math [UKMC09]
 
JS Class 2016
JS Class 2016JS Class 2016
JS Class 2016
 
Politische Ponerologie
Politische PonerologiePolitische Ponerologie
Politische Ponerologie
 
Muammar al-Gaddafi - Das Grüne Buch
Muammar al-Gaddafi - Das Grüne BuchMuammar al-Gaddafi - Das Grüne Buch
Muammar al-Gaddafi - Das Grüne Buch
 
Real History - The Bad War (english 115s)
Real History - The Bad War (english 115s)Real History - The Bad War (english 115s)
Real History - The Bad War (english 115s)
 
Gerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233SGerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233S
 
Thomas Goodrich - Hellstorm The Death Of Nazi Germany
Thomas Goodrich - Hellstorm The Death Of Nazi GermanyThomas Goodrich - Hellstorm The Death Of Nazi Germany
Thomas Goodrich - Hellstorm The Death Of Nazi Germany
 
JavaScript - The Universal Platform?
JavaScript - The Universal Platform?JavaScript - The Universal Platform?
JavaScript - The Universal Platform?
 

Similar to VueJS: The Simple Revolution

Component-Oriented Progressive Web Applications with VueJS
Component-Oriented Progressive Web Applications with VueJSComponent-Oriented Progressive Web Applications with VueJS
Component-Oriented Progressive Web Applications with VueJSRafael Casuso Romate
 
Introduction to Weex: Mobile Apps with VueJS
Introduction to Weex: Mobile Apps with VueJSIntroduction to Weex: Mobile Apps with VueJS
Introduction to Weex: Mobile Apps with VueJSRafael Casuso Romate
 
State management for enterprise angular applications
State management for enterprise angular applicationsState management for enterprise angular applications
State management for enterprise angular applicationsIlia Idakiev
 
Moving existing apps to the cloud
 Moving existing apps to the cloud Moving existing apps to the cloud
Moving existing apps to the cloudRam Maddali
 
Business Driven Architecture
Business Driven ArchitectureBusiness Driven Architecture
Business Driven ArchitectureVinay Shivaswamy
 
Lecture 05 - Creating a website with Razor Pages.pdf
Lecture 05 - Creating a website with Razor Pages.pdfLecture 05 - Creating a website with Razor Pages.pdf
Lecture 05 - Creating a website with Razor Pages.pdfLê Thưởng
 
Improve your Cloud Integrations with Test-driven Development
Improve your Cloud Integrations with Test-driven Development Improve your Cloud Integrations with Test-driven Development
Improve your Cloud Integrations with Test-driven Development OPITZ CONSULTING Deutschland
 
VueJS Best Practices
VueJS Best PracticesVueJS Best Practices
VueJS Best PracticesFatih Acet
 
Application architecture doesn't have to suck
Application architecture doesn't have to suckApplication architecture doesn't have to suck
Application architecture doesn't have to suckjtregunna
 
Declarative observability management for Microservice architectures
Declarative observability management for Microservice architecturesDeclarative observability management for Microservice architectures
Declarative observability management for Microservice architecturesSven Bernhardt
 
TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...
TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...
TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...CA Technologies
 
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
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.jsMax Klymyshyn
 
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
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)Kranthi Kumar
 

Similar to VueJS: The Simple Revolution (20)

Intro to VueJS Workshop
Intro to VueJS WorkshopIntro to VueJS Workshop
Intro to VueJS Workshop
 
Component-Oriented Progressive Web Applications with VueJS
Component-Oriented Progressive Web Applications with VueJSComponent-Oriented Progressive Web Applications with VueJS
Component-Oriented Progressive Web Applications with VueJS
 
VueJS in Action
VueJS in ActionVueJS in Action
VueJS in Action
 
Introduction to Weex: Mobile Apps with VueJS
Introduction to Weex: Mobile Apps with VueJSIntroduction to Weex: Mobile Apps with VueJS
Introduction to Weex: Mobile Apps with VueJS
 
State management for enterprise angular applications
State management for enterprise angular applicationsState management for enterprise angular applications
State management for enterprise angular applications
 
Moving existing apps to the cloud
 Moving existing apps to the cloud Moving existing apps to the cloud
Moving existing apps to the cloud
 
Business Driven Architecture
Business Driven ArchitectureBusiness Driven Architecture
Business Driven Architecture
 
Lecture 05 - Creating a website with Razor Pages.pdf
Lecture 05 - Creating a website with Razor Pages.pdfLecture 05 - Creating a website with Razor Pages.pdf
Lecture 05 - Creating a website with Razor Pages.pdf
 
Improve your Cloud Integrations with Test-driven Development
Improve your Cloud Integrations with Test-driven Development Improve your Cloud Integrations with Test-driven Development
Improve your Cloud Integrations with Test-driven Development
 
VueJS Best Practices
VueJS Best PracticesVueJS Best Practices
VueJS Best Practices
 
Asp.net
Asp.netAsp.net
Asp.net
 
Application architecture doesn't have to suck
Application architecture doesn't have to suckApplication architecture doesn't have to suck
Application architecture doesn't have to suck
 
Declarative observability management for Microservice architectures
Declarative observability management for Microservice architecturesDeclarative observability management for Microservice architectures
Declarative observability management for Microservice architectures
 
TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...
TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...
TechTalk: Going Full Circle - Linking Code to Tests to Requirements and Back ...
 
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
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.js
 
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
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)
 
Karthik .net resume
Karthik  .net resumeKarthik  .net resume
Karthik .net resume
 
Cloud Native Operations
Cloud Native OperationsCloud Native Operations
Cloud Native Operations
 

More from Rafael Casuso Romate

More from Rafael Casuso Romate (7)

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
 
Google Assistant Revolution
Google Assistant RevolutionGoogle Assistant Revolution
Google Assistant 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

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 

Recently uploaded (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 

VueJS: The Simple Revolution

  • 1. VUE JS THE SIMPLE REVOLUTION_
  • 2. @Rafael_Casuso A B O U T M E •Head of JavaScript @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 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
  • 8. PROPERTIES & METHODS_ ‣ METHODS ARE FUNCTIONS TO USE IN THE INSTANCE OR IN DIRECTIVE EXPRESSIONS ‣ PROPERTIES ARE REACTIVE ATTRIBUTES PROXIED BY THE INSTANCE FROM DATA OBJECT
  • 9. INTERPOLATIONS, DIRECTIVES & FILTERS_ ‣ 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
  • 12. REACTIVITY INTERNALS_ ‣ CHANGES ARE TRACKED THROUGH GETTERS (DEPENDENCIES) AND SETTERS (NOTIFICATIONS) ON DATA PROPERTIES ‣ REACTIVE ROOT PROPERTIES MUST BE DECLARED UPFRONT, NESTED CAN BE ADDED WITH VM.SET ‣ ALL DOM UPDATES ARE ASYNCHRONOUS, WITH A QUEUE THAT BUFFERS ALL CHANGES WITHIN THE SAME EVENT LOOP AND WILL BE RENDERED IN THE NEXT TICK
  • 13. COMPUTED PROPERTIES AND WATCHERS_ ‣ COMPUTED PROPS ARE COMPLEX MANIPULATIONS OF REACTIVE PROPS, CACHED BASED ON THEIR DEPENDENCIES ‣ WATCHERS ARE GENERIC WAY TO REACT TO DATA CHANGES, FOR ASYNCHRONOUS OR EXPENSIVE OPERATIONS
  • 15. VIEW TO MODEL_ ‣ V-ON DIRECTIVE TO BIND USER EVENTS TO INSTANCE METHODS ‣ IT ACCEPTS EVENT MODIFIERS
  • 16. FORM INPUT BINDING_ ‣ V-MODEL DIRECTIVE TO BIND USER INPUT TO PROPERTIES ‣ V-FOR FOR LOOP ARRAY PROPERTIES
  • 18. COMPONENTS ARCHITECTURE_ ‣ APPLICATION AS A TREE OF SELF-CONTAINED REUSABLE COMPONENTS
  • 19. COMPONENTS DEFINITION_ ‣ 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
  • 21. 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
  • 22. PROPS_ ‣ CUSTOM ATTRIBUTES TO PASS DOWN DATA FROM PARENT TO CHILD COMPONENTS ‣ THEY FOLLOW ONE-WAY-DOWN PATTERN, CAN NOT BE MODIFIED IN CHILD ‣ CHILD MUST DECLARE THE PROPS IT EXPECTS ‣ THEY CAN BE BINDED IN THE TEMPLATE IN ORDER TO UPDATE WHEN PARENT DATA CHANGES
  • 23. CUSTOM EVENTS_ ‣ VUE INSTANCE IMPLEMENTS AN EVENT INTERFACE: ‣ LISTEN AN EVENT WITH $ON(EVENTNAME) ‣ TRIGGERS AN EVENT WITH $EMIT(EVENTNAME) ‣ PARENT COMPONENT CAN LISTEN CHILD EVENTS WITH V-ON DIRECTLY IN TEMPLATE
  • 24. CONTENT DISTRIBUTION WITH SLOTS_ ‣ EVERYTHING IN PARENT TEMPLATE WILL BE COMPILED IN PARENT SCOPE ‣ EVERYTHING IN CHILD TEMPLATE WILL BE COMPILED IN CHILD SCOPE ‣ SLOTS ARE PLACEHOLDERS FOR PARENT CONTENT INTO CHILD COMPONENT
  • 26. 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
  • 27. ROUTING_ ‣ VUE-ROUTER IS THE OFFICIAL CORE PLUGIN ‣ DYNAMIC ROUTING MATCHING WITH PARAMS AND QUERY PARAMS ‣ NESTED ROUTES, NAMED ROUTES ‣ REDIRECT & ALIAS
  • 29. 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
  • 30. 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
  • 31. TOOLS_ ‣ VUE-CLI FOR SCAFFOLDING PROJECTS ‣ VUE DEV TOOLS FOR INSPECTING COMPONENTS, PROPERTIES AND TIME-TRAVEL DEBUGGING
  • 34. VUEJS VS REACT_ ‣ REACT WINS IN RICHNESS OF ITS ECOSYSTEM AND CUSTOM RENDERERS ‣ VUEJS WINS IN ALL PERFORMANCE PROFILES ‣ ITS VIRTUAL DOM IMPLEMENTATION SNABBDOM-BASED IS FASTER WITH LESS CALCULATIONS ‣ UPDATE PERFORMANCE: ‣ REACT RE-RENDERS WHOLE SUB-TREE
 WHEN COMPONENT STATE CHANGES ‣ VUEJS TRACK DEPS ON RENDERING SO ONLY
 UPDATES SPECIFIC COMPONENTS ‣ VUEJS FASTER DEV MODE WITH UP TO 10XFRAME RATE
  • 35.