SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Why Vue.js?
Why Vue.js?Why Vue.js?
Why Vue.js?
 
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
 
Vue.js
Vue.jsVue.js
Vue.js
 
Vue js for beginner
Vue js for beginner Vue js for beginner
Vue js for beginner
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019
 
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
 
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
Vue JS Intro
Vue JS IntroVue JS Intro
Vue JS Intro
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & Vuex
 
Life Cycle hooks in VueJs
Life Cycle hooks in VueJsLife Cycle hooks in VueJs
Life Cycle hooks in VueJs
 
React Router: React Meetup XXL
React Router: React Meetup XXLReact Router: React Meetup XXL
React Router: React Meetup XXL
 
Reactjs
Reactjs Reactjs
Reactjs
 
Deep dive into Vue.js
Deep dive into Vue.jsDeep dive into Vue.js
Deep dive into Vue.js
 
MSDN - ASP.NET MVC
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVC
 
reactJS
reactJSreactJS
reactJS
 
Vuex
VuexVuex
Vuex
 

Destaque

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
 

Destaque (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?
 

Semelhante a 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
 

Semelhante a 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
 

Mais de Rafael Casuso Romate

Mais de 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
 

Último

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 

Último (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

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.