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

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
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
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
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
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
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
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
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
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
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
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
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
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
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
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
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 ...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
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
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
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
 
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 🔝✔️✔️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

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