(Go: >> BACK << -|- >> HOME <<)

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

What's hot

Vue.js
Vue.jsVue.js
The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.js
Holly Schinsky
 
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
 
Why Vue.js?
Why Vue.js?Why Vue.js?
Why Vue.js?
Jonathan Goode
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
Javier Lafora Rey
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
Sunil Yadav
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
Samundra khatri
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
Squash Apps Pvt Ltd
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
 
Vue.js
Vue.jsVue.js
Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2
Knoldus Inc.
 
jQuery
jQueryjQuery
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & Vuex
Bernd Alter
 
React state
React  stateReact  state
React state
Ducat
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced Routing
Laurent Duveau
 
Life Cycle hooks in VueJs
Life Cycle hooks in VueJsLife Cycle hooks in VueJs
Life Cycle hooks in VueJs
Squash Apps Pvt Ltd
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
Eyal Vardi
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
valuebound
 
React JS - Introduction
React JS - IntroductionReact JS - Introduction
React JS - Introduction
Sergey Romaneko
 

What's hot (20)

Vue.js
Vue.jsVue.js
Vue.js
 
The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.js
 
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)...
 
Why Vue.js?
Why Vue.js?Why Vue.js?
Why Vue.js?
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Vue.js
Vue.jsVue.js
Vue.js
 
Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2
 
jQuery
jQueryjQuery
jQuery
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & Vuex
 
React state
React  stateReact  state
React state
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced Routing
 
Life Cycle hooks in VueJs
Life Cycle hooks in VueJsLife Cycle hooks in VueJs
Life Cycle hooks in VueJs
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
React JS - Introduction
React JS - IntroductionReact JS - Introduction
React JS - Introduction
 

Similar to VueJS Introduction

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
Matt Raible
 
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
Violetta Villani
 
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
Commit University
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
Alexander Zamkovyi
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
David Ličen
 
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...
Gavin Pickin
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
TO THE NEW Pvt. Ltd.
 
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
climboid
 
Meet VueJs
Meet VueJsMeet VueJs
Meet VueJs
Mathieu Breton
 
Vanjs backbone-powerpoint
Vanjs backbone-powerpointVanjs backbone-powerpoint
Vanjs backbone-powerpoint
Michael Yagudaev
 
Introduction à AngularJS
Introduction à AngularJSIntroduction à AngularJS
Introduction à AngularJS
Nicolas PENNEC
 
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...
Ortus Solutions, Corp
 
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
David Wengier
 
Vue js and Dyploma
Vue js and DyplomaVue js and Dyploma
Vue js and Dyploma
Yoram Kornatzky
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
Knoldus Inc.
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
Sami Ekblad
 
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
Matt Raible
 
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
Boyan Mihaylov
 
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

Development of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML TechnologiesDevelopment of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML Technologies
MaisnamLuwangPibarel
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
AUGNYC
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
Ortus Solutions, Corp
 
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
Ortus Solutions, Corp
 
dachnug51 - HCL Domino Roadmap .pdf
dachnug51 - HCL Domino Roadmap      .pdfdachnug51 - HCL Domino Roadmap      .pdf
dachnug51 - HCL Domino Roadmap .pdf
DNUG e.V.
 
Artificial Intelligence by CP Mahto1.pptx
Artificial Intelligence by CP Mahto1.pptxArtificial Intelligence by CP Mahto1.pptx
Artificial Intelligence by CP Mahto1.pptx
kamleshabss
 
Revolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBoxRevolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBox
Ortus Solutions, Corp
 
UI-UX Design - Definition and Importance of UI-UX.pptx
UI-UX Design - Definition and Importance of UI-UX.pptxUI-UX Design - Definition and Importance of UI-UX.pptx
UI-UX Design - Definition and Importance of UI-UX.pptx
Mitchell Marsh
 
NLJUG speaker academy 2024 - session 1, June 2024
NLJUG speaker academy 2024 - session 1, June 2024NLJUG speaker academy 2024 - session 1, June 2024
NLJUG speaker academy 2024 - session 1, June 2024
Bert Jan Schrijver
 
Enhancing non-Perl bioinformatic applications with Perl
Enhancing non-Perl bioinformatic applications with PerlEnhancing non-Perl bioinformatic applications with Perl
Enhancing non-Perl bioinformatic applications with Perl
Christos Argyropoulos
 
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
Hironori Washizaki
 
Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!
Ortus Solutions, Corp
 
Design system: The basis for a consistent design
Design system: The basis for a consistent designDesign system: The basis for a consistent design
Design system: The basis for a consistent design
Ortus Solutions, Corp
 
Security Assessment (SECA)_English_PDF.pdf
Security Assessment (SECA)_English_PDF.pdfSecurity Assessment (SECA)_English_PDF.pdf
Security Assessment (SECA)_English_PDF.pdf
Q-Advise
 
Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01
williamrobertherman
 
Managing and Controlling Data Proliferation.pdf
Managing and Controlling Data Proliferation.pdfManaging and Controlling Data Proliferation.pdf
Managing and Controlling Data Proliferation.pdf
Ortus Solutions, Corp
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
Ortus Solutions, Corp
 
BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
Ortus Solutions, Corp
 
Data Recovery Tool | Recover lost Data | BLR Tools
Data Recovery Tool | Recover lost Data | BLR ToolsData Recovery Tool | Recover lost Data | BLR Tools
Data Recovery Tool | Recover lost Data | BLR Tools
lotus spa
 
YouTube SEO Mastery ......................
YouTube SEO Mastery ......................YouTube SEO Mastery ......................
YouTube SEO Mastery ......................
islamiato717
 

Recently uploaded (20)

Development of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML TechnologiesDevelopment of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML Technologies
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
 
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
How to debug ColdFusion Applications using “ColdFusion Builder extension for ...
 
dachnug51 - HCL Domino Roadmap .pdf
dachnug51 - HCL Domino Roadmap      .pdfdachnug51 - HCL Domino Roadmap      .pdf
dachnug51 - HCL Domino Roadmap .pdf
 
Artificial Intelligence by CP Mahto1.pptx
Artificial Intelligence by CP Mahto1.pptxArtificial Intelligence by CP Mahto1.pptx
Artificial Intelligence by CP Mahto1.pptx
 
Revolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBoxRevolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBox
 
UI-UX Design - Definition and Importance of UI-UX.pptx
UI-UX Design - Definition and Importance of UI-UX.pptxUI-UX Design - Definition and Importance of UI-UX.pptx
UI-UX Design - Definition and Importance of UI-UX.pptx
 
NLJUG speaker academy 2024 - session 1, June 2024
NLJUG speaker academy 2024 - session 1, June 2024NLJUG speaker academy 2024 - session 1, June 2024
NLJUG speaker academy 2024 - session 1, June 2024
 
Enhancing non-Perl bioinformatic applications with Perl
Enhancing non-Perl bioinformatic applications with PerlEnhancing non-Perl bioinformatic applications with Perl
Enhancing non-Perl bioinformatic applications with Perl
 
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
 
Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!Ortus Solutions - Headless Content for the Win!
Ortus Solutions - Headless Content for the Win!
 
Design system: The basis for a consistent design
Design system: The basis for a consistent designDesign system: The basis for a consistent design
Design system: The basis for a consistent design
 
Security Assessment (SECA)_English_PDF.pdf
Security Assessment (SECA)_English_PDF.pdfSecurity Assessment (SECA)_English_PDF.pdf
Security Assessment (SECA)_English_PDF.pdf
 
Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01
 
Managing and Controlling Data Proliferation.pdf
Managing and Controlling Data Proliferation.pdfManaging and Controlling Data Proliferation.pdf
Managing and Controlling Data Proliferation.pdf
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
 
BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
 
Data Recovery Tool | Recover lost Data | BLR Tools
Data Recovery Tool | Recover lost Data | BLR ToolsData Recovery Tool | Recover lost Data | BLR Tools
Data Recovery Tool | Recover lost Data | BLR Tools
 
YouTube SEO Mastery ......................
YouTube SEO Mastery ......................YouTube SEO Mastery ......................
YouTube SEO Mastery ......................
 

VueJS Introduction

  • 2. Yet Another JS Framework Or Is it?
  • 3. David Ličen, 
 Freelance Front-End Developer 
 Twitter: @davision
 Blog: davidlicen.com
  • 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
  • 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
  • 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…)
  • 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?
  • 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