SlideShare a Scribd company logo
Vue.JSThe progressive JavaScript Framework
Yet Another JS Framework
Or Is it?
David Ličen, 

Freelance Front-End Developer


Twitter: @davision

Blog: davidlicen.com
VueJS Introduction
The facts
The Founder
Evan You
• Previously worked as a Creative
Technologist at Google
• Core Dev at Meteor
• From 2016 working full-time on
Vue.JS framework.



—> patreon.com/evanyou
History
• Started in late 2013
• First release Feb. 2014 (v0.6)
• v1.0.0 Evangelion Oct. 2015
• Latest release v2.3.3
VueJS Introduction
VueJS gets into in Laravel 5.3
Optional
Today (on 24.5.2017)
vs. AngularJS
vs. React
Today (on 24.5.2017)
vs. Ruby ;)
Today (on 24.5.2017)
562K downloads/month
Who is using it?
• GitLab 

https://about.gitlab.com/2016/10/20/why-we-chose-vue/
• Weex 

https://weex.apache.org/ Maintained by Alibaba Group
• Baidu

Chinese search engine
How does it work?
Technical stuff
How it works?
• Inspired by Model–view–
viewmodel (MVVM)
architectural pattern
• Uses Declarative Rendering
• Dependency tracking system
with getter/setters
The Vue Instance
• Vue Constructor function
• Properties and Methods (data / events)
• Instance Lifecycle Hooks
var vm = new Vue({
// options
})
The Vue Instance Lifecycle
VueJS Introduction
var vm = new Vue({
data: {
a: 1
},
created: function () {
// `this` points to the vm instance
console.log('a is: ' + this.a)
}
})
vm.$watch('a', function (newVal, oldVal) {
// this callback will be called when `vm.a` changes
})
Let see some code examples
Practical stuff
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js</title>
<script src="vue.js"></script>
</head>
<body>
<div id="selector">
<h1>{{ message }}</h1>
</div>
</body>
</html>

// Define a plain JSON
// object to hold the data
var data = {
message: "Hello"
};
// Instantiate Vue on an element
new Vue ({
el: "#selector",
data: data
})
// Works since getters/setters
// are now proxied
data.message = "Hi";
Directives
v-bind
<!-- full syntax -->
<a v-bind:href="url"></a>
<!-- shorthand -->
<a :href="url"></a>

v-on
<!-- full syntax -->
<a v-on:click="doSomething"></a>
<!-- shorthand -->
<a @click="doSomething"></a>
<div :class="{
'active': isActive,
'text-danger': HasError }
">
</div>

data: {
isActive: true,
hasError: false
}
Binding HTML Classes
<div id="events">
<button v-on:click="counter += 1”>
Add +1</button>
<p>You clicked {{ counter }}</p>
<button @click=“say(‘what')">
Say what</button>
</div>

new Vue ({
el: '#events',
data: {
counter: 0
},
methods: {
say: function (message) {
alert(message)
}
}
})
Event handling
<div v-if="type === 'A'"> A </div>
<div v-else-if="type === 'B'"> B </div>
<div v-else-if="type === 'C'"> C </div>
<div v-else> Not A/B/C </div>
Conditional Rendering
<ul id=“list">
<li v-for="(item, index) in items">
{{ parentMessage }} -
{{ index }} -
{{ item.message }}
</li>
</ul>

new Vue({
el: '#list',
data: {
parentMessage: ‘Parent',
items: [
{ message: 'Foo' },
{ message: 'Bar' }
]
}
})
Loops
<!-- the click event's propagation will be stopped -->
<a @click.stop="oThis"></a>
<!-- the submit event will no longer reload the page -->
<form @submit.prevent="onSubmit"></form>
<!-- modifiers can be chained -->
<a @click.stop.prevent="doThat"></a>
<!-- also available .tab, .delete, .esc, .space, ...-->
<input @keyup.enter="submit">
Event & Key Modifiers
Etc..
https://vuejs.org/v2/guide/
Single File Components
Introducing
Made by Webpack (or Browserify)
Now we get
• Complete syntax highlighting
• CommonJS modules
• Component-scoped CSS
• Use of preprocessors (Pug, Babel, Stylus, Sass…)
VueJS Introduction
new Vue ({
el: "#selector",
data: {
message: 'Hello'
}
})

export default {
data () {
return {
message: 'Hello'
}
}
}
Mind the difference
Let’s do some 💩
and build our first VueJS app
npm install --global vue-cli
vue init webpack my-project
? Project name vue-webpack
? Project description A Vue.js project
? Author davidlicen <david@artnetik.si>
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Airbnb
? Setup unit tests with Karma + Mocha? No
? Setup e2e tests with Nightwatch? No
We’re packed!
cd my-project
npm install
npm run dev
yarn anyone?
VueJS Introduction
VueJS Introduction
Dev tools ⚒
VueJS Introduction
Doubts 🤔
Some say…
• Vue initiated by a single developer
• The community is not yet as large as the ones of
Angular or React
• Currently, there’s not so many libraries for Vue…
Sauce!
github.com/vuejs/awesome-vue
Sauce!
vuejs.org
WROCŁAW, POLAND • JUNE 21-23, 2017
Thank you!

More Related Content

PDF
introduction to Vue.js 3
ArezooKmn
 
PDF
Vue.js
Jadson Santos
 
ODP
An Introduction to Vuejs
Paddy Lock
 
PPT
Vue.js Getting Started
Murat Doğan
 
ODP
Basics of VueJS
Squash Apps Pvt Ltd
 
PDF
Intro to vue.js
TechMagic
 
PDF
Konsep dasar UI/UX
Deska Setiawan Yusra
 
PPTX
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
introduction to Vue.js 3
ArezooKmn
 
An Introduction to Vuejs
Paddy Lock
 
Vue.js Getting Started
Murat Doğan
 
Basics of VueJS
Squash Apps Pvt Ltd
 
Intro to vue.js
TechMagic
 
Konsep dasar UI/UX
Deska Setiawan Yusra
 
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 

What's hot (20)

PDF
Why Vue.js?
Jonathan Goode
 
PPTX
Vue js for beginner
Chandrasekar G
 
PDF
An introduction to Vue.js
Javier Lafora Rey
 
PDF
Vue.js for beginners
Julio Bitencourt
 
PDF
Introduction to React JS
Bethmi Gunasekara
 
PPTX
[Final] ReactJS presentation
洪 鹏发
 
PDF
React JS - Introduction
Sergey Romaneko
 
PPTX
Introduction to React
Rob Quick
 
PPTX
React js
Alireza Akbari
 
PPTX
Introduction to React JS for beginners
Varun Raj
 
PDF
VueJS: The Simple Revolution
Rafael Casuso Romate
 
PPTX
Reactjs
Neha Sharma
 
PDF
The Point of Vue - Intro to Vue.js
Holly Schinsky
 
PPTX
Introduction to React JS for beginners | Namespace IT
namespaceit
 
PPTX
React JS: A Secret Preview
valuebound
 
PPTX
Intro to React
Eric Westfall
 
PDF
ReactJS presentation
Thanh Tuong
 
PPTX
React workshop
Imran Sayed
 
PDF
React Router: React Meetup XXL
Rob Gietema
 
Why Vue.js?
Jonathan Goode
 
Vue js for beginner
Chandrasekar G
 
An introduction to Vue.js
Javier Lafora Rey
 
Vue.js for beginners
Julio Bitencourt
 
Introduction to React JS
Bethmi Gunasekara
 
[Final] ReactJS presentation
洪 鹏发
 
React JS - Introduction
Sergey Romaneko
 
Introduction to React
Rob Quick
 
React js
Alireza Akbari
 
Introduction to React JS for beginners
Varun Raj
 
VueJS: The Simple Revolution
Rafael Casuso Romate
 
Reactjs
Neha Sharma
 
The Point of Vue - Intro to Vue.js
Holly Schinsky
 
Introduction to React JS for beginners | Namespace IT
namespaceit
 
React JS: A Secret Preview
valuebound
 
Intro to React
Eric Westfall
 
ReactJS presentation
Thanh Tuong
 
React workshop
Imran Sayed
 
React Router: React Meetup XXL
Rob Gietema
 
Ad

Similar to VueJS Introduction (20)

PDF
Front End Development for Back End Developers - Denver Startup Week 2017
Matt Raible
 
PDF
Vue.js part1
욱래 김
 
PPTX
Level up apps and websites with vue.js
Violetta Villani
 
PPTX
Level up apps and websites with vue.js
Commit University
 
PPTX
Google app engine by example
Alexander Zamkovyi
 
PDF
Drupal point of vue
David Ličen
 
PPTX
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
Gavin Pickin
 
PPTX
An introduction to Vue.js
TO THE NEW Pvt. Ltd.
 
PDF
Yeoman AngularJS and D3 - A solid stack for web apps
climboid
 
PDF
Meet VueJs
Mathieu Breton
 
PPT
Vanjs backbone-powerpoint
Michael Yagudaev
 
PPTX
Introduction à AngularJS
Nicolas PENNEC
 
PDF
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
Ortus Solutions, Corp
 
PPTX
A (very) opinionated guide to MSBuild and Project Files
David Wengier
 
PPTX
Vue js and Dyploma
Yoram Kornatzky
 
PPT
Backbone.js
Knoldus Inc.
 
PDF
Workshop: Building Vaadin add-ons
Sami Ekblad
 
PDF
The Art of Angular in 2016 - vJUG24
Matt Raible
 
PPTX
Bringing the light to the client with KnockoutJS
Boyan Mihaylov
 
PDF
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Thinkful
 
Front End Development for Back End Developers - Denver Startup Week 2017
Matt Raible
 
Vue.js part1
욱래 김
 
Level up apps and websites with vue.js
Violetta Villani
 
Level up apps and websites with vue.js
Commit University
 
Google app engine by example
Alexander Zamkovyi
 
Drupal point of vue
David Ličen
 
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
Gavin Pickin
 
An introduction to Vue.js
TO THE NEW Pvt. Ltd.
 
Yeoman AngularJS and D3 - A solid stack for web apps
climboid
 
Meet VueJs
Mathieu Breton
 
Vanjs backbone-powerpoint
Michael Yagudaev
 
Introduction à AngularJS
Nicolas PENNEC
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
Ortus Solutions, Corp
 
A (very) opinionated guide to MSBuild and Project Files
David Wengier
 
Vue js and Dyploma
Yoram Kornatzky
 
Backbone.js
Knoldus Inc.
 
Workshop: Building Vaadin add-ons
Sami Ekblad
 
The Art of Angular in 2016 - vJUG24
Matt Raible
 
Bringing the light to the client with KnockoutJS
Boyan Mihaylov
 
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Thinkful
 
Ad

Recently uploaded (20)

PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PDF
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PDF
How to Seamlessly Integrate Salesforce Data Cloud with Marketing Cloud.pdf
NSIQINFOTECH
 
PDF
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PPTX
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
How to Seamlessly Integrate Salesforce Data Cloud with Marketing Cloud.pdf
NSIQINFOTECH
 
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
Activate_Methodology_Summary presentatio
annapureddyn
 
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
oapresentation.pptx
mehatdhavalrajubhai
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 

VueJS Introduction