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

SlideShare a Scribd company logo
Building a Single Page
Application (SPA) with
VueJS
@danpastori
Hi 👋
Hi 👋
I’m Dan Pastori
I’m From Wisconsin
I’m passionate about traveling ✈
Drinking coffee ☕
I’m passionate about traveling ✈
Drinking coffee ☕
I’m passionate about traveling ✈
Being in nature 🍁
Drinking coffee ☕
I’m passionate about traveling ✈
Being in nature 🍁
And of course…
Drinking coffee ☕
I’m passionate about traveling ✈
Being in nature 🍁
And of course…
Everything to do with
making apps!!!
I’ve been developing for 12 years
I’ve been developing for 12 years
8 years ago, Jay Rogers and I started
521 Dimensions
https://521dimensions.com
@521dimensions
We build 100% custom web and
mobile applications and specialize in API
Driven Development (SPA + API)
For our applications, we use a variety of
tools and languages….
For our applications, we use a variety of
tools and languages….
But our preferred front end framework is
VueJS!
Before we dive in, I wanted
to make 2 points:
Before we dive in, I wanted
to make 2 points:
1. This will be an open talk!
Meaning I’ll share my
experiences, show tutorials,
and discuss the wonders of
VueJS
But…. It’s also a time for you
all to pipe up with questions,
concerns, comments
whatever you think is
beneficial to the group and
understanding!
Before we dive in, I wanted
to make 2 points:
2. Like all developers, I have
an opinion
That doesn’t mean I’m right
and anyone using Angular,
React, Stimulus, etc. is
wrong..
I just ❤ Vue and my goal is
show you how awesome it is
even as an alternative.. And
that SPAs are awesome too!
Which is probably
controversial.. but we will get
there 🥰
First off, how many of you
have used Vue? ✋
How many have built an
SPA? 🛁
How many of you have used
ReactJS, AngularJS, or
something similar? ✋
Let’s do a quick comparison
between Vue + React & Vue +
Angular
Let’s do a quick comparison
between Vue + React & Vue +
Angular
I’ll do my best being out of the ReactJS and Angular
communities for some time
https://vuejs.org/v2/guide/comparison.html
VueJS vs Angular 🥊
Angular is Backed by Google
Angular is Backed by Google
(VueJS creator Evan You worked on Angular when he was
at Google)
Angular is built heavily on TypeScript, VueJS it’s
optional
https://buttercms.com/blog/comparing-angular-vs-vue
Angular is Backed by Google
(VueJS creator Evan You worked on Angular when he was
at Google)
https://buttercms.com/blog/comparing-angular-vs-vue
Angular is Backed by Google
(VueJS creator Evan You worked on Angular when he was
at Google)
Angular is built heavily on TypeScript, VueJS it’s
optional
Angular has a much more opinionated
architecture where VueJS is flexible
Angular is Backed by Google
(VueJS creator Evan You worked on Angular when he was
at Google)
Angular has a much larger footprint (500+ KB vs
80KB)
https://www.themexpert.com/blog/angular-vs-react-vs-vue
Angular is built heavily on TypeScript, VueJS it’s
optional
Angular has a much more opinionated
architecture where VueJS is flexible
Angular is Backed by Google
(VueJS creator Evan You worked on Angular when he was
at Google)
Angular has a much larger footprint (500+ KB vs
80KB)
https://www.themexpert.com/blog/angular-vs-react-vs-vue
Angular is built heavily on TypeScript, VueJS it’s
optional
Angular has a much more opinionated
architecture where VueJS is flexible
Angular is MVVM (Model-View-ViewModel)
VueJS vs React 🥊
React is Backed by Facebook
React is Backed by Facebook
React uses JSX. Vue allows you to use Web
Components ❤ or JSX
QUICK TANGENT! 🚨
Web Components are AAAAHHHMAZING!!
<template>
<router-link :to="route" class="no-underline">
<div class="mt-2 mb-2 left-nav-link text-center h-16 flex flex-col items-center justify-center
cursor-pointer"
v-bind:class="{ 'bg-blue-500 border-l-2 border-white border-solid' : currentRoute ==
route }">
<slot name="image"></slot>
<span class="text-xs mt-2 block text-center"
v-bind:class="{
'text-gray-400': currentRoute != route,
'text-white' : currentRoute == route
}">
<slot name="name"></slot>
</span>
</div>
</router-link>
</template>
<script>
export default {
props: ['route'],
data(){
return {
currentRoute: this.$router.currentRoute.name
}
},
}
</script>
React is Backed by Facebook
React uses JSX. Vue allows you to use Web
Components ❤ or JSX
Official packages (state management and router)
for React are 3rd Party
https://buttercms.com/blog/comparing-angular-vs-vue
React is Backed by Facebook
React uses JSX. Vue allows you to use Web
Components ❤ or JSX
Official packages (state management and router)
for React are 3rd Party
https://buttercms.com/blog/comparing-angular-vs-vue
React has React Native. VueJS has ports like
NativeScript
So why I love Vue!
So why I love Vue!
1. The documentation is incredible
So why I love Vue!
1. The documentation is incredible
* Third party docs are amazing as well!
So why I love Vue!
2. Ability to use Web Components
So why I love Vue!
2. Ability to use Web Components
All Javscript, Template HTML, and
CSS are in one re-usable file
So why I love Vue!
2. Ability to use Web Components
All Javscript, Template HTML, and
CSS are in one re-usable file
With slots, it’s even more reusable!
So why I love Vue!
3. State Management and Router are
NOT 3rd Party!
So why I love Vue!
3. State Management and Router are
NOT 3rd Party!
That’s right! Vue-Router and Vuex are
official.
So why I love Vue!
4. Not maintained by a large
corporation
So why I love Vue!
4. Not maintained by a large
corporation
This may sound weird, but I love how
Vue is run and managed.
So why I love Vue!
5. Excellent tools
So why I love Vue!
5. Excellent tools
•Chrome Debugger
•Server Side Rendering
•Vue CLI
https://insights.stackoverflow.com/survey/2019#most-loved-
dreaded-and-wanted
Other Devs Love Vue Too!
Let’s talk a little bit about the
core modules of VueJS!
First, we have the core library
https://vuejs.org
This is where all of the core
features are packed such as:
• Reactivity
• Housing of local data
• Template Rendering
• Registering of Components
You also get features like:
• Mixins
• Transitions
• Form Input Bindings
• Computed Properties
Don’t worry, we will see all of
this in action! 🔥
Next, we have the vue-router
library
https://router.vuejs.org/
Vue Router takes care of
• HTML 5 History API Management
• Navigating without full page reloading
• Nested Routing
With Vue Router you also get
features like:
• Named Routes
• Route Meta Data
• Redirecting
• Hooks that can be used for guarding and
authorization.
Essentially, Vue-Router is
what makes Single Page
Applications Possible!
🏄
Last but not least, we have the
Vuex library
https://vuex.vuejs.org/
Vuex is Vue’s version of Redux
for React. It’s a “state
management pattern +
library” inspired by Redux and
Flux
For the React Devs in the
room, you may recognize Dan
Abramov’s quote.
“Flux libraries are like glasses: you’ll know when you
need them.”
For the React Devs in the
room, you may recognize Dan
Abramov’s quote.
“Flux libraries are like glasses: you’ll know when you
need them.”
That’s by far the best definition of when you should use a flux library.
Vuex handles the state for
your large scale SPAs.
State is made up of modules
which in turn have:
• Localized State
• Getters
• Mutations
• Actions
https://vuex.vuejs.org/
The way I look at it. If you keep passing
properties and you need the same data
on your page more than 5 times, might
be time to look at Vuex.
Let’s mix it all together and
make some VueJS Magic!
-
Real quick, has anyone built an
SPA?
Let’s spend 1 minute defining what an
SPA is.
A Single Page Application Means:
•The page doesn’t make a full refresh when
navigating
A Single Page Application Means:
•The page doesn’t make a full refresh when
navigating
•We rely on the HTML 5 History API for navigation
A Single Page Application Means:
•The page doesn’t make a full refresh when
navigating
•We rely on the HTML 5 History API for navigation
•Usually communicates to some sort of API to
retrieve data
A Single Page Application Means:
•The page doesn’t make a full refresh when
navigating
•We rely on the HTML 5 History API for navigation
•Usually communicates to some sort of API to
retrieve data
•You make an initial load of assets and then load
the rest on demand
What we are building
•Simple Contact Book
•We will have 3 Routes
•Contacts
•Contact
•Add Contact
•We will have Vuex for state, vue-router for nav
and Vue for display.
📒
Let’s begin!!
So I did a little set up… Just to save
time ⏱
1. I set up a quick project using the Vue
CLI (Yup, they have that too). Which
installed Vue, Vuex, and Vue Router.
2. Next I installed Axios.js for HTTP
requests.
https://github.com/axios/axios
3. I added two directories:
• ./src/api
•./src/state
4. I added the contacts module and
imported it into the store.
5. I added the contacts API and
imported it into the contacts module.
This allows us to keep our API routes
separate and easy to edit.
6. I also set up a simple PHP API we
will hit. It has the following routes:
• GET /api/v1/contacts
• GET /api/v1/contacts/{id}
• POST /api/v1/contacts
• PUT /api/v1/contacts/{id}
This does not have authentication, you
will see the route in this presentation. It
will be accessible on the network.
Please be nice ☺
Time to switch to VS Code!!
Vue Life Cycle Diagram
https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram
https://vuex.vuejs.org/
Vuex Flow
Any Feedback, Questions, Etc?
Thank you!
If you need any help you can find me at:
@danpastori
https://serversideup.net
https://github.com/521dimensions

More Related Content

What's hot

An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
Pagepro
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019
Paul Bele
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
ArezooKmn
 
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
 
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
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.js
TechMagic
 
Vue.js for beginners
Vue.js for beginnersVue.js for beginners
Vue.js for beginners
Julio Bitencourt
 
Vue JS Intro
Vue JS IntroVue JS Intro
Vue JS Intro
Muhammad Rizki Rijal
 
Vue Introduction
Vue IntroductionVue Introduction
Vue Introduction
Elad Gasner
 
An Introduction to Vuejs
An Introduction to VuejsAn Introduction to Vuejs
An Introduction to Vuejs
Paddy Lock
 
Javascript MVVM with Vue.JS
Javascript MVVM with Vue.JSJavascript MVVM with Vue.JS
Javascript MVVM with Vue.JS
Eueung Mulyana
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
Hina Chen
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended Version
Murat Doğan
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
houzman
 
Modern frontend development with VueJs
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJs
Tudor Barbu
 
Vue presentation
Vue presentationVue presentation
Vue presentation
Norbert Nader
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.js
monterail
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
David Ličen
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue Material
Eueung Mulyana
 

What's hot (20)

An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
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
 
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
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.js
 
Vue.js for beginners
Vue.js for beginnersVue.js for beginners
Vue.js for beginners
 
Vue JS Intro
Vue JS IntroVue JS Intro
Vue JS Intro
 
Vue Introduction
Vue IntroductionVue Introduction
Vue Introduction
 
An Introduction to Vuejs
An Introduction to VuejsAn Introduction to Vuejs
An Introduction to Vuejs
 
Javascript MVVM with Vue.JS
Javascript MVVM with Vue.JSJavascript MVVM with Vue.JS
Javascript MVVM with Vue.JS
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended Version
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
 
Modern frontend development with VueJs
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJs
 
Vue presentation
Vue presentationVue presentation
Vue presentation
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.js
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue Material
 

Similar to Building a Single Page Application with VueJS

From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
sparkfabrik
 
Riding the Edge with Ember.js
Riding the Edge with Ember.jsRiding the Edge with Ember.js
Riding the Edge with Ember.js
aortbals
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
Yochay Kiriaty
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
Sébastien Levert
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Tom Johnson
 
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure FunctionsSharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
Sébastien Levert
 
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
 
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
 
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWSAWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
Amazon Web Services
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
Ivano Malavolta
 
Drupal is not your Website
Drupal is not your Website Drupal is not your Website
Drupal is not your Website
Phase2
 
Progressive EPiServer Development
Progressive EPiServer DevelopmentProgressive EPiServer Development
Progressive EPiServer Development
joelabrahamsson
 
Angular js
Angular jsAngular js
Angular js
Mauro Servienti
 
StackEngine Problem Space Demo
StackEngine Problem Space DemoStackEngine Problem Space Demo
StackEngine Problem Space Demo
Boyd Hemphill
 
Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...
boxuno
 
Deploying Web Apps with PaaS and Docker Tools
Deploying Web Apps with PaaS and Docker ToolsDeploying Web Apps with PaaS and Docker Tools
Deploying Web Apps with PaaS and Docker Tools
Eddie Lau
 
Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...
Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...
Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...
Katy Slemon
 
Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
Using-AngularJS-with-Sitefinity.pptx
Using-AngularJS-with-Sitefinity.pptxUsing-AngularJS-with-Sitefinity.pptx
Using-AngularJS-with-Sitefinity.pptx
kisofe
 

Similar to Building a Single Page Application with VueJS (20)

From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
 
Riding the Edge with Ember.js
Riding the Edge with Ember.jsRiding the Edge with Ember.js
Riding the Edge with Ember.js
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure FunctionsSharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
 
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 ...
 
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...
 
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWSAWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
 
Drupal is not your Website
Drupal is not your Website Drupal is not your Website
Drupal is not your Website
 
Progressive EPiServer Development
Progressive EPiServer DevelopmentProgressive EPiServer Development
Progressive EPiServer Development
 
Angular js
Angular jsAngular js
Angular js
 
StackEngine Problem Space Demo
StackEngine Problem Space DemoStackEngine Problem Space Demo
StackEngine Problem Space Demo
 
Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...
 
Deploying Web Apps with PaaS and Docker Tools
Deploying Web Apps with PaaS and Docker ToolsDeploying Web Apps with PaaS and Docker Tools
Deploying Web Apps with PaaS and Docker Tools
 
Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...
Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...
Top 12 Vue.js Developer Tools and Component Libraries (To Speed Up Vue.js Dev...
 
Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta
 
Using-AngularJS-with-Sitefinity.pptx
Using-AngularJS-with-Sitefinity.pptxUsing-AngularJS-with-Sitefinity.pptx
Using-AngularJS-with-Sitefinity.pptx
 

Recently uploaded

High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...
High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...
High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...
shoeb2926
 
Female Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service Available
Female Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service AvailableFemale Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service Available
Female Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service Available
isha sharman06
 
Exploring the Ethics and Implications of AI-Generated Nude Images.pdf
Exploring the Ethics and Implications of AI-Generated Nude Images.pdfExploring the Ethics and Implications of AI-Generated Nude Images.pdf
Exploring the Ethics and Implications of AI-Generated Nude Images.pdf
Undress Baby
 
How do you install the WHM and cPanel on AlmaLinux?
How do you install the WHM and cPanel on AlmaLinux?How do you install the WHM and cPanel on AlmaLinux?
How do you install the WHM and cPanel on AlmaLinux?
CasperLAWRENCE
 
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
nitu gupta#N06
 
Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...
Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...
Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...
vickythakur209464
 
European Standard S1000D, an Unnecessary Expense to OEM.pptx
European Standard S1000D, an Unnecessary Expense to OEM.pptxEuropean Standard S1000D, an Unnecessary Expense to OEM.pptx
European Standard S1000D, an Unnecessary Expense to OEM.pptx
Digital Teacher
 
Call Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service Available
Call Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service AvailableCall Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service Available
Call Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service Available
sapnaanpad7
 
Folding Cheat Sheet #6 - sixth in a series
Folding Cheat Sheet #6 - sixth in a seriesFolding Cheat Sheet #6 - sixth in a series
Folding Cheat Sheet #6 - sixth in a series
Philip Schwarz
 
AllProjectsS24 of software engineering.pdf
AllProjectsS24 of software engineering.pdfAllProjectsS24 of software engineering.pdf
AllProjectsS24 of software engineering.pdf
Shahid464656
 
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
 
Top 5 Ways To Use Instagram API in 2024 for your business
Top 5 Ways To Use Instagram API in 2024 for your businessTop 5 Ways To Use Instagram API in 2024 for your business
Top 5 Ways To Use Instagram API in 2024 for your business
Yara Milbes
 
Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...
Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...
Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...
sapnasaifi408
 
🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...
🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...
🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...
tinakumariji156
 
Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...
Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...
Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...
sapnasaifi408
 
Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...
Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...
Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...
jiyav969
 
🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...
🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...
🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...
nikhilkumarji0156
 
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
eydbbz
 
Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...
ns9201415
 
Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...
Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...
Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...
anshsharma8761
 

Recently uploaded (20)

High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...
High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...
High-Class Call Girls In Chennai 📞7014168258 Available With Direct Cash Payme...
 
Female Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service Available
Female Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service AvailableFemale Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service Available
Female Bangalore Call Girls 👉 7023059433 👈 Vip Escorts Service Available
 
Exploring the Ethics and Implications of AI-Generated Nude Images.pdf
Exploring the Ethics and Implications of AI-Generated Nude Images.pdfExploring the Ethics and Implications of AI-Generated Nude Images.pdf
Exploring the Ethics and Implications of AI-Generated Nude Images.pdf
 
How do you install the WHM and cPanel on AlmaLinux?
How do you install the WHM and cPanel on AlmaLinux?How do you install the WHM and cPanel on AlmaLinux?
How do you install the WHM and cPanel on AlmaLinux?
 
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
 
Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...
Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...
Call Girls in Rajkot (7426014248) call me [🔝Rajkot🔝] Escort In Rajkot service...
 
European Standard S1000D, an Unnecessary Expense to OEM.pptx
European Standard S1000D, an Unnecessary Expense to OEM.pptxEuropean Standard S1000D, an Unnecessary Expense to OEM.pptx
European Standard S1000D, an Unnecessary Expense to OEM.pptx
 
Call Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service Available
Call Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service AvailableCall Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service Available
Call Girls Goa 💯Call Us 🔝 7426014248 🔝 Independent Goa Escorts Service Available
 
Folding Cheat Sheet #6 - sixth in a series
Folding Cheat Sheet #6 - sixth in a seriesFolding Cheat Sheet #6 - sixth in a series
Folding Cheat Sheet #6 - sixth in a series
 
AllProjectsS24 of software engineering.pdf
AllProjectsS24 of software engineering.pdfAllProjectsS24 of software engineering.pdf
AllProjectsS24 of software engineering.pdf
 
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
 
Top 5 Ways To Use Instagram API in 2024 for your business
Top 5 Ways To Use Instagram API in 2024 for your businessTop 5 Ways To Use Instagram API in 2024 for your business
Top 5 Ways To Use Instagram API in 2024 for your business
 
Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...
Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...
Independent Call Girls In Bangalore 💯Call Us 🔝 7426014248 🔝Independent Bangal...
 
🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...
🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...
🔥 Chennai Call Girls  👉 6350257716 👫 High Profile Call Girls Whatsapp Number ...
 
Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...
Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...
Hi-Fi Call Girls In Hyderabad 💯Call Us 🔝 7426014248 🔝Independent Hyderabad Es...
 
Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...
Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...
Independent Call Girls In Pune 💯Call Us 🔝 7426014248 🔝Independent Pune Escort...
 
🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...
🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...
🔥 Call Girls In Pune 💯Call Us 🔝 7737669865 🔝💃Top Class Call Girl Service Avai...
 
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
 
Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Ahmedabad ✔ 7737669865 ✔ Hi I Am Divya Vip Call Girl Servic...
 
Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...
Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...
Call Girls Solapur ☎️ +91-7426014248 😍 Solapur Call Girl Beauty Girls Solapur...
 

Building a Single Page Application with VueJS

  • 1. Building a Single Page Application (SPA) with VueJS @danpastori
  • 5. I’m passionate about traveling ✈
  • 6. Drinking coffee ☕ I’m passionate about traveling ✈
  • 7. Drinking coffee ☕ I’m passionate about traveling ✈ Being in nature 🍁
  • 8. Drinking coffee ☕ I’m passionate about traveling ✈ Being in nature 🍁 And of course…
  • 9. Drinking coffee ☕ I’m passionate about traveling ✈ Being in nature 🍁 And of course… Everything to do with making apps!!!
  • 10. I’ve been developing for 12 years
  • 11. I’ve been developing for 12 years 8 years ago, Jay Rogers and I started 521 Dimensions https://521dimensions.com @521dimensions
  • 12. We build 100% custom web and mobile applications and specialize in API Driven Development (SPA + API)
  • 13. For our applications, we use a variety of tools and languages….
  • 14. For our applications, we use a variety of tools and languages…. But our preferred front end framework is VueJS!
  • 15. Before we dive in, I wanted to make 2 points:
  • 16. Before we dive in, I wanted to make 2 points: 1. This will be an open talk!
  • 17. Meaning I’ll share my experiences, show tutorials, and discuss the wonders of VueJS
  • 18. But…. It’s also a time for you all to pipe up with questions, concerns, comments whatever you think is beneficial to the group and understanding!
  • 19. Before we dive in, I wanted to make 2 points: 2. Like all developers, I have an opinion
  • 20. That doesn’t mean I’m right and anyone using Angular, React, Stimulus, etc. is wrong..
  • 21. I just ❤ Vue and my goal is show you how awesome it is even as an alternative.. And that SPAs are awesome too!
  • 22. Which is probably controversial.. but we will get there 🥰
  • 23. First off, how many of you have used Vue? ✋
  • 24. How many have built an SPA? 🛁
  • 25. How many of you have used ReactJS, AngularJS, or something similar? ✋
  • 26. Let’s do a quick comparison between Vue + React & Vue + Angular
  • 27. Let’s do a quick comparison between Vue + React & Vue + Angular I’ll do my best being out of the ReactJS and Angular communities for some time https://vuejs.org/v2/guide/comparison.html
  • 29. Angular is Backed by Google
  • 30. Angular is Backed by Google (VueJS creator Evan You worked on Angular when he was at Google)
  • 31. Angular is built heavily on TypeScript, VueJS it’s optional https://buttercms.com/blog/comparing-angular-vs-vue Angular is Backed by Google (VueJS creator Evan You worked on Angular when he was at Google)
  • 32. https://buttercms.com/blog/comparing-angular-vs-vue Angular is Backed by Google (VueJS creator Evan You worked on Angular when he was at Google) Angular is built heavily on TypeScript, VueJS it’s optional Angular has a much more opinionated architecture where VueJS is flexible
  • 33. Angular is Backed by Google (VueJS creator Evan You worked on Angular when he was at Google) Angular has a much larger footprint (500+ KB vs 80KB) https://www.themexpert.com/blog/angular-vs-react-vs-vue Angular is built heavily on TypeScript, VueJS it’s optional Angular has a much more opinionated architecture where VueJS is flexible
  • 34. Angular is Backed by Google (VueJS creator Evan You worked on Angular when he was at Google) Angular has a much larger footprint (500+ KB vs 80KB) https://www.themexpert.com/blog/angular-vs-react-vs-vue Angular is built heavily on TypeScript, VueJS it’s optional Angular has a much more opinionated architecture where VueJS is flexible Angular is MVVM (Model-View-ViewModel)
  • 36. React is Backed by Facebook
  • 37. React is Backed by Facebook React uses JSX. Vue allows you to use Web Components ❤ or JSX
  • 39. Web Components are AAAAHHHMAZING!! <template> <router-link :to="route" class="no-underline"> <div class="mt-2 mb-2 left-nav-link text-center h-16 flex flex-col items-center justify-center cursor-pointer" v-bind:class="{ 'bg-blue-500 border-l-2 border-white border-solid' : currentRoute == route }"> <slot name="image"></slot> <span class="text-xs mt-2 block text-center" v-bind:class="{ 'text-gray-400': currentRoute != route, 'text-white' : currentRoute == route }"> <slot name="name"></slot> </span> </div> </router-link> </template> <script> export default { props: ['route'], data(){ return { currentRoute: this.$router.currentRoute.name } }, } </script>
  • 40. React is Backed by Facebook React uses JSX. Vue allows you to use Web Components ❤ or JSX Official packages (state management and router) for React are 3rd Party https://buttercms.com/blog/comparing-angular-vs-vue
  • 41. React is Backed by Facebook React uses JSX. Vue allows you to use Web Components ❤ or JSX Official packages (state management and router) for React are 3rd Party https://buttercms.com/blog/comparing-angular-vs-vue React has React Native. VueJS has ports like NativeScript
  • 42. So why I love Vue!
  • 43. So why I love Vue! 1. The documentation is incredible
  • 44. So why I love Vue! 1. The documentation is incredible * Third party docs are amazing as well!
  • 45. So why I love Vue! 2. Ability to use Web Components
  • 46. So why I love Vue! 2. Ability to use Web Components All Javscript, Template HTML, and CSS are in one re-usable file
  • 47. So why I love Vue! 2. Ability to use Web Components All Javscript, Template HTML, and CSS are in one re-usable file With slots, it’s even more reusable!
  • 48. So why I love Vue! 3. State Management and Router are NOT 3rd Party!
  • 49. So why I love Vue! 3. State Management and Router are NOT 3rd Party! That’s right! Vue-Router and Vuex are official.
  • 50. So why I love Vue! 4. Not maintained by a large corporation
  • 51. So why I love Vue! 4. Not maintained by a large corporation This may sound weird, but I love how Vue is run and managed.
  • 52. So why I love Vue! 5. Excellent tools
  • 53. So why I love Vue! 5. Excellent tools •Chrome Debugger •Server Side Rendering •Vue CLI
  • 55. Let’s talk a little bit about the core modules of VueJS!
  • 56. First, we have the core library https://vuejs.org
  • 57. This is where all of the core features are packed such as: • Reactivity • Housing of local data • Template Rendering • Registering of Components
  • 58. You also get features like: • Mixins • Transitions • Form Input Bindings • Computed Properties
  • 59. Don’t worry, we will see all of this in action! 🔥
  • 60. Next, we have the vue-router library https://router.vuejs.org/
  • 61. Vue Router takes care of • HTML 5 History API Management • Navigating without full page reloading • Nested Routing
  • 62. With Vue Router you also get features like: • Named Routes • Route Meta Data • Redirecting • Hooks that can be used for guarding and authorization.
  • 63. Essentially, Vue-Router is what makes Single Page Applications Possible! 🏄
  • 64. Last but not least, we have the Vuex library https://vuex.vuejs.org/
  • 65. Vuex is Vue’s version of Redux for React. It’s a “state management pattern + library” inspired by Redux and Flux
  • 66. For the React Devs in the room, you may recognize Dan Abramov’s quote. “Flux libraries are like glasses: you’ll know when you need them.”
  • 67. For the React Devs in the room, you may recognize Dan Abramov’s quote. “Flux libraries are like glasses: you’ll know when you need them.” That’s by far the best definition of when you should use a flux library.
  • 68. Vuex handles the state for your large scale SPAs. State is made up of modules which in turn have: • Localized State • Getters • Mutations • Actions
  • 70. The way I look at it. If you keep passing properties and you need the same data on your page more than 5 times, might be time to look at Vuex.
  • 71. Let’s mix it all together and make some VueJS Magic! -
  • 72. Real quick, has anyone built an SPA?
  • 73. Let’s spend 1 minute defining what an SPA is.
  • 74. A Single Page Application Means: •The page doesn’t make a full refresh when navigating
  • 75. A Single Page Application Means: •The page doesn’t make a full refresh when navigating •We rely on the HTML 5 History API for navigation
  • 76. A Single Page Application Means: •The page doesn’t make a full refresh when navigating •We rely on the HTML 5 History API for navigation •Usually communicates to some sort of API to retrieve data
  • 77. A Single Page Application Means: •The page doesn’t make a full refresh when navigating •We rely on the HTML 5 History API for navigation •Usually communicates to some sort of API to retrieve data •You make an initial load of assets and then load the rest on demand
  • 78. What we are building •Simple Contact Book •We will have 3 Routes •Contacts •Contact •Add Contact •We will have Vuex for state, vue-router for nav and Vue for display. 📒
  • 80. So I did a little set up… Just to save time ⏱
  • 81. 1. I set up a quick project using the Vue CLI (Yup, they have that too). Which installed Vue, Vuex, and Vue Router.
  • 82. 2. Next I installed Axios.js for HTTP requests. https://github.com/axios/axios
  • 83. 3. I added two directories: • ./src/api •./src/state
  • 84. 4. I added the contacts module and imported it into the store.
  • 85. 5. I added the contacts API and imported it into the contacts module. This allows us to keep our API routes separate and easy to edit.
  • 86. 6. I also set up a simple PHP API we will hit. It has the following routes: • GET /api/v1/contacts • GET /api/v1/contacts/{id} • POST /api/v1/contacts • PUT /api/v1/contacts/{id}
  • 87. This does not have authentication, you will see the route in this presentation. It will be accessible on the network. Please be nice ☺
  • 88. Time to switch to VS Code!!
  • 89. Vue Life Cycle Diagram https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram
  • 93. If you need any help you can find me at: @danpastori https://serversideup.net https://github.com/521dimensions