SlideShare a Scribd company logo
1 of 23
A NEW VUE FOR WEB
DEVELOPMENT
CHAD CAMPBELL
(@CHADCAMPBELL)
WHAT IS
VUE.JS?
A JavaScript framework for
building user interfaces
(reasoning)
Created by Evan You
(@youyuxi)
AGENDA
• Why Vue.js?
• Vue.js Concepts
WHY VUE.JS?
Speed Simplicity Licensing
SPEED
• Manipulating the DOM is expensive
• Virtual DOM inspired by Snabbdom
SPEED
1.02
1.04
1.06
1.08
1.1
1.12
1.14
1.16
Vue.js v2.3.3 Angular v4.1.2 React v.15.5.4
source: http://www.stefankrause.net/js-frameworks-benchmark6/webdriver-ts-results/table.html
(shorter bars mean faster time to completion of predefined tasks)
SIMPLICITY
• Templating
• Good ol’ HTML
• Minimize the amount of code you write
• Insulate you from changes
• Declarative Bindings
• Bridge between UI and data
• Removes the burden of managing the DOM
• Approachable
<html>
<head>
<title>My App</title>
</head>
<body>
<div id="app">
Hello {{ greeting }}
</div>
<script src="https://unpkg.com/vue" type="text/javascript"></script>
<script type="text/javascript">
var app = new Vue({
el: document.getElementById('app’),
data: { greeting: 'world’ }
});
</script>
</body>
</html>
Source:
https://twitter.com/henrikjoreteg/status/364989455414726657
LICENSING
Vue.js
MIT License
Angular
MIT License
React
3-Clause BSD License
with Facebook
Addendum
VUE.JS CONCEPTS
• Templates
• Directives
• Modifiers
• Components
• Routing
• State Management
• Transitions
TEMPLATE
<div>
<div v-for="item in inventory">
<div v-if="item.inStock === true">
{{ item.name }}
<rating :value="item.rating"></rating>
</div>
<div v-else><del>{{ item.name }}</del></div>
</div>
</div>
DIRECTIVES
• Tell Vue to do something with a
DOM element
• You can create your own custom
directives!
• Consider components first though
Out of the Box
v-cloak v-for v-pre
v-if v-text v-bind
v-else-if v-html v-on
v-else v-model v-once
v-show
MODIFIERS
• A way to filter an event
• Enforce separation between UI and
logic
Out of the Box
prevent enter up
capture tab down
stop delete left
self escape right
once space alt
left middle ctrl
meta shift trim
<input type="search"
v-model.trim="query"
v-on:keypress.enter.prevent=“runQuery"
v-on:keyup.ctrl.enter=“runInNewWindow"
/>
Example
COMPONENTS
• Building blocks for
apps
• Can be local or global
• Can be in a single-file
Vue.component('rating', {
template: '<ul class="list-inline">' +
'<li v-for="i in max">' +
'<i v-bind:class="{'open-star':(i>value),
'star':(i<=value) }">{{ i }}</i></li>' +
'</ul>’,
data: function() {
return { max: 5 };
},
props: {
value: {
type: Number,
default: 0
}
}
});
ROUTING
• Routes map URLs to
templates
• Not “part” of Vue
• Officially supported library:
vue-router
• Works with third-party
routers:
• Page.js
• Director
/
/customers
/customers/12345 /customers/tickets
/orders
/orders/12345 /orders/shipped
ROUTING - EXAMPLE
<div id="app">
<h1>Hello</h1>
<router-link to="/page-1">page 1</router-link>
<router-link to="/page-2">page 2</router-link>
<router-view></router-view>
</div>
const PageOne = {
template: '<div><h3>Page 1</h3></div>’
};
const PageTwo = {
template: '<div><h3>Page 2</h3></div>’
};
const router = new VueRouter({
routes: [
{ path: '/page-1', component: PageOne },
{ path: '/page-2', component: PageTwo }
]
});
STATE MANAGEMENT
• Important for larger apps
• Centralized state-management
provided by vuex
Data Store
component 1 component 2
shared state
TRANSITIONS
• i.e. Animations
• Supported at various
levels:
• Elements
• Items
• Views
• Data
• Mainly driven by CSS
.fade-enter-active, .fade-leave-active {
transition: opacity 1.0s
}
.fade-enter, .fade-leave-to {
opacity: 0
}
TRANSITION - EXAMPLE
<div id="app">
<h1>Hello</h1>
<router-link to="/page-1">page 1</router-link>
<router-link to="/page-2">page 2</router-link>
<transition name="fade">
<router-view></router-view>
</transition>
</div>
const PageOne = {
template: '<div><h3>Page 1</h3></div>’
};
const PageTwo = {
template: '<div><h3>Page 2</h3></div>’
};
const router = new VueRouter({
routes: [
{ path: '/page-1', component: PageOne },
{ path: '/page-2', component: PageTwo }
]
});
FEATURES
• Templates
• Directives
• Modifiers
• Components
• Routing
• State Management
• Transitions
Covered in my Vue.js: Getting Started Training Course
Covered in my Vue.js: Going Deeper Course
THE NEW JQUERY
“Vue provides an answer to the issue of JavaScript
fatigue, and it is a worthy successor to the legacy of
jQuery.”
Peter Jang – Dean of Instruction at Actualize
source: http://anyonecanlearntocode.com/blog_posts/why-vue-not-react-is-the-new-jquery
QUESTIONS, COMMENTS, QUALMS?
ME
@chadcampbell
https://www.ecofic.com
NEXT STEP
https://goo.gl/CEFFkv

More Related Content

What's hot

introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3 ArezooKmn
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?Mike Wilcox
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vueDavid Ličen
 
Modern Applications With Asp.net Core 5 and Vue JS 3
Modern Applications With Asp.net Core 5 and Vue JS 3Modern Applications With Asp.net Core 5 and Vue JS 3
Modern Applications With Asp.net Core 5 and Vue JS 3Alexandre Malavasi
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsZachary Klein
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseAaron Silverman
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Boris Livshutz
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]Kuro Hsu
 
Building a Single Page Application with VueJS
Building a Single Page Application with VueJSBuilding a Single Page Application with VueJS
Building a Single Page Application with VueJSdanpastori
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angularBasarat Syed
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsMike McNeil
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applicationsSC5.io
 
Drupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsDrupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsAlex S
 
Single Page WebApp Architecture
Single Page WebApp ArchitectureSingle Page WebApp Architecture
Single Page WebApp ArchitectureMorgan Cheng
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...tdc-globalcode
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesWesley Hales
 

What's hot (20)

introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
 
Modern Applications With Asp.net Core 5 and Vue JS 3
Modern Applications With Asp.net Core 5 and Vue JS 3Modern Applications With Asp.net Core 5 and Vue JS 3
Modern Applications With Asp.net Core 5 and Vue JS 3
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.js
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
 
Webpack
Webpack Webpack
Webpack
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster
 
Intro to Sails.js
Intro to Sails.jsIntro to Sails.js
Intro to Sails.js
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]
 
Building a Single Page Application with VueJS
Building a Single Page Application with VueJSBuilding a Single Page Application with VueJS
Building a Single Page Application with VueJS
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applications
 
Drupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsDrupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systems
 
Single Page WebApp Architecture
Single Page WebApp ArchitectureSingle Page WebApp Architecture
Single Page WebApp Architecture
 
Drupal8 + AngularJS
Drupal8 + AngularJSDrupal8 + AngularJS
Drupal8 + AngularJS
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devices
 

Similar to A NEW VUE FOR WEB DEVELOPMENT

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
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)Hendrik Ebbers
 
Windows Azure Cloud Services
Windows Azure Cloud Services Windows Azure Cloud Services
Windows Azure Cloud Services Shiju Varghese
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletongDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletonGeorge Nguyen
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSmurtazahaveliwala
 
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaFrom Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaAlexandre Morgaut
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Lucas Jellema
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedStéphane Bégaudeau
 
gDayX - Advanced angularjs
gDayX - Advanced angularjsgDayX - Advanced angularjs
gDayX - Advanced angularjsgdgvietnam
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesMark Rackley
 
AngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo TokyoAngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo TokyoChris Bannon
 

Similar to A NEW VUE FOR WEB DEVELOPMENT (20)

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
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
 
Node azure
Node azureNode azure
Node azure
 
Windows Azure Cloud Services
Windows Azure Cloud Services Windows Azure Cloud Services
Windows Azure Cloud Services
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletongDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaFrom Web App Model Design to Production with Wakanda
From Web App Model Design to Production with Wakanda
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...
 
Vue js and Dyploma
Vue js and DyplomaVue js and Dyploma
Vue js and Dyploma
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
 
gDayX - Advanced angularjs
gDayX - Advanced angularjsgDayX - Advanced angularjs
gDayX - Advanced angularjs
 
CG_CS25010_Lecture
CG_CS25010_LectureCG_CS25010_Lecture
CG_CS25010_Lecture
 
Node.js on Azure
Node.js on AzureNode.js on Azure
Node.js on Azure
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Mini-Training: AngularJS
Mini-Training: AngularJSMini-Training: AngularJS
Mini-Training: AngularJS
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
 
AngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo TokyoAngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo Tokyo
 

Recently uploaded

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
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
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
 
+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
 
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
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
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.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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
 

Recently uploaded (20)

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
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
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
 
+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...
 
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
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
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
 
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 ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
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...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 

A NEW VUE FOR WEB DEVELOPMENT

  • 1. A NEW VUE FOR WEB DEVELOPMENT CHAD CAMPBELL (@CHADCAMPBELL)
  • 2. WHAT IS VUE.JS? A JavaScript framework for building user interfaces (reasoning) Created by Evan You (@youyuxi)
  • 3. AGENDA • Why Vue.js? • Vue.js Concepts
  • 5. SPEED • Manipulating the DOM is expensive • Virtual DOM inspired by Snabbdom
  • 6. SPEED 1.02 1.04 1.06 1.08 1.1 1.12 1.14 1.16 Vue.js v2.3.3 Angular v4.1.2 React v.15.5.4 source: http://www.stefankrause.net/js-frameworks-benchmark6/webdriver-ts-results/table.html (shorter bars mean faster time to completion of predefined tasks)
  • 7. SIMPLICITY • Templating • Good ol’ HTML • Minimize the amount of code you write • Insulate you from changes • Declarative Bindings • Bridge between UI and data • Removes the burden of managing the DOM • Approachable
  • 8. <html> <head> <title>My App</title> </head> <body> <div id="app"> Hello {{ greeting }} </div> <script src="https://unpkg.com/vue" type="text/javascript"></script> <script type="text/javascript"> var app = new Vue({ el: document.getElementById('app’), data: { greeting: 'world’ } }); </script> </body> </html>
  • 11. VUE.JS CONCEPTS • Templates • Directives • Modifiers • Components • Routing • State Management • Transitions
  • 12. TEMPLATE <div> <div v-for="item in inventory"> <div v-if="item.inStock === true"> {{ item.name }} <rating :value="item.rating"></rating> </div> <div v-else><del>{{ item.name }}</del></div> </div> </div>
  • 13. DIRECTIVES • Tell Vue to do something with a DOM element • You can create your own custom directives! • Consider components first though Out of the Box v-cloak v-for v-pre v-if v-text v-bind v-else-if v-html v-on v-else v-model v-once v-show
  • 14. MODIFIERS • A way to filter an event • Enforce separation between UI and logic Out of the Box prevent enter up capture tab down stop delete left self escape right once space alt left middle ctrl meta shift trim <input type="search" v-model.trim="query" v-on:keypress.enter.prevent=“runQuery" v-on:keyup.ctrl.enter=“runInNewWindow" /> Example
  • 15. COMPONENTS • Building blocks for apps • Can be local or global • Can be in a single-file Vue.component('rating', { template: '<ul class="list-inline">' + '<li v-for="i in max">' + '<i v-bind:class="{'open-star':(i>value), 'star':(i<=value) }">{{ i }}</i></li>' + '</ul>’, data: function() { return { max: 5 }; }, props: { value: { type: Number, default: 0 } } });
  • 16. ROUTING • Routes map URLs to templates • Not “part” of Vue • Officially supported library: vue-router • Works with third-party routers: • Page.js • Director / /customers /customers/12345 /customers/tickets /orders /orders/12345 /orders/shipped
  • 17. ROUTING - EXAMPLE <div id="app"> <h1>Hello</h1> <router-link to="/page-1">page 1</router-link> <router-link to="/page-2">page 2</router-link> <router-view></router-view> </div> const PageOne = { template: '<div><h3>Page 1</h3></div>’ }; const PageTwo = { template: '<div><h3>Page 2</h3></div>’ }; const router = new VueRouter({ routes: [ { path: '/page-1', component: PageOne }, { path: '/page-2', component: PageTwo } ] });
  • 18. STATE MANAGEMENT • Important for larger apps • Centralized state-management provided by vuex Data Store component 1 component 2 shared state
  • 19. TRANSITIONS • i.e. Animations • Supported at various levels: • Elements • Items • Views • Data • Mainly driven by CSS .fade-enter-active, .fade-leave-active { transition: opacity 1.0s } .fade-enter, .fade-leave-to { opacity: 0 }
  • 20. TRANSITION - EXAMPLE <div id="app"> <h1>Hello</h1> <router-link to="/page-1">page 1</router-link> <router-link to="/page-2">page 2</router-link> <transition name="fade"> <router-view></router-view> </transition> </div> const PageOne = { template: '<div><h3>Page 1</h3></div>’ }; const PageTwo = { template: '<div><h3>Page 2</h3></div>’ }; const router = new VueRouter({ routes: [ { path: '/page-1', component: PageOne }, { path: '/page-2', component: PageTwo } ] });
  • 21. FEATURES • Templates • Directives • Modifiers • Components • Routing • State Management • Transitions Covered in my Vue.js: Getting Started Training Course Covered in my Vue.js: Going Deeper Course
  • 22. THE NEW JQUERY “Vue provides an answer to the issue of JavaScript fatigue, and it is a worthy successor to the legacy of jQuery.” Peter Jang – Dean of Instruction at Actualize source: http://anyonecanlearntocode.com/blog_posts/why-vue-not-react-is-the-new-jquery