SlideShare a Scribd company logo
1 of 47
Download to read offline
Vue.JSThe progressive JavaScript Framework
Yet Another JS Framework
Or Is it?
David Ličen, 

Freelance Front-End Developer


Twitter: @davision

Blog: davidlicen.com
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 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
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…)
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?
Dev tools ⚒
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

What's hot

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
 

What's hot (20)

Vue.js for beginners
Vue.js for beginnersVue.js for beginners
Vue.js for beginners
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
Why Vue.js?
Why Vue.js?Why Vue.js?
Why Vue.js?
 
Nuxt.JS Introdruction
Nuxt.JS IntrodructionNuxt.JS Introdruction
Nuxt.JS Introdruction
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.js
 
Vue js for beginner
Vue js for beginner Vue js for beginner
Vue js for beginner
 
A la découverte de vue.js
A la découverte de vue.jsA la découverte de vue.js
A la découverte de vue.js
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]第一次用 Vue.js 就愛上 [改]
第一次用 Vue.js 就愛上 [改]
 
Vue Vuex 101
Vue Vuex 101Vue Vuex 101
Vue Vuex 101
 
Deep dive into Vue.js
Deep dive into Vue.jsDeep dive into Vue.js
Deep dive into Vue.js
 
react redux.pdf
react redux.pdfreact redux.pdf
react redux.pdf
 
Vue.js
Vue.jsVue.js
Vue.js
 
Express js
Express jsExpress js
Express js
 
Nuxt.js - Introduction
Nuxt.js - IntroductionNuxt.js - Introduction
Nuxt.js - Introduction
 
Vue JS Intro
Vue JS IntroVue JS Intro
Vue JS Intro
 
Laravel presentation
Laravel presentationLaravel presentation
Laravel presentation
 
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue
 
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)...
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 

Similar to VueJS Introduction

Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Thinkful
 

Similar to VueJS Introduction (20)

Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017
 
Vue.js part1
Vue.js part1Vue.js part1
Vue.js part1
 
Level up apps and websites with vue.js
Level up  apps and websites with vue.jsLevel up  apps and websites with vue.js
Level up apps and websites with vue.js
 
Level up apps and websites with vue.js
Level up  apps and websites with vue.jsLevel up  apps and websites with vue.js
Level up apps and websites with vue.js
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
 
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 VueJS cod...
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web appsYeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web apps
 
Meet VueJs
Meet VueJsMeet VueJs
Meet VueJs
 
Vanjs backbone-powerpoint
Vanjs backbone-powerpointVanjs backbone-powerpoint
Vanjs backbone-powerpoint
 
Introduction à AngularJS
Introduction à AngularJSIntroduction à AngularJS
Introduction à AngularJS
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
 
A (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project FilesA (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project Files
 
Vue js and Dyploma
Vue js and DyplomaVue js and Dyploma
Vue js and Dyploma
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
 
The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24
 
Bringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJSBringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJS
 
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
 

Recently uploaded

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
VishalKumarJha10
 

Recently uploaded (20)

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
 
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
 
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-...
 
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
 
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 🔝✔️✔️
 
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 ...
 
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 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
 
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...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.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 🔝✔️✔️
 
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...
 
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
 
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
 
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
 
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
 
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
 
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
 

VueJS Introduction

  • 2. Yet Another JS Framework Or Is it?
  • 3. David Ličen, 
 Freelance Front-End Developer 
 Twitter: @davision
 Blog: davidlicen.com
  • 4.
  • 6. 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
  • 7. History • Started in late 2013 • First release Feb. 2014 (v0.6) • v1.0.0 Evangelion Oct. 2015 • Latest release v2.3.3
  • 8.
  • 9. VueJS gets into in Laravel 5.3 Optional
  • 10. Today (on 24.5.2017) vs. AngularJS vs. React
  • 12. Today (on 24.5.2017) 562K downloads/month
  • 13. 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
  • 14. How does it work? Technical stuff
  • 15. How it works? • Inspired by Model–view– viewmodel (MVVM) architectural pattern • Uses Declarative Rendering • Dependency tracking system with getter/setters
  • 16. The Vue Instance • Vue Constructor function • Properties and Methods (data / events) • Instance Lifecycle Hooks var vm = new Vue({ // options })
  • 17. The Vue Instance Lifecycle
  • 18.
  • 19. 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 })
  • 20. Let see some code examples Practical stuff
  • 21. <!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";
  • 22. 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>
  • 23. <div :class="{ 'active': isActive, 'text-danger': HasError } "> </div>
 data: { isActive: true, hasError: false } Binding HTML Classes
  • 24. <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
  • 25. <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
  • 26. <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
  • 27. <!-- 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
  • 29. Single File Components Introducing Made by Webpack (or Browserify)
  • 30. Now we get • Complete syntax highlighting • CommonJS modules • Component-scoped CSS • Use of preprocessors (Pug, Babel, Stylus, Sass…)
  • 31.
  • 32. new Vue ({ el: "#selector", data: { message: 'Hello' } })
 export default { data () { return { message: 'Hello' } } } Mind the difference
  • 33. Let’s do some 💩 and build our first VueJS app
  • 35. vue init webpack my-project
  • 36. ? 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!
  • 37. cd my-project npm install npm run dev yarn anyone?
  • 38.
  • 39.
  • 41.
  • 43. 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…
  • 46. WROCŁAW, POLAND • JUNE 21-23, 2017