SlideShare a Scribd company logo
1 of 24
Download to read offline
1 / 24
Web Frameworks:
The VueJs Case
Software Developers’ Thursday 3 Jun 2021
2 / 24
The pronunciation
/vjuː/
3 / 24
The Best Web Framework
WebSocket
DOM
Service Workers
Web Workers
SSE
4 / 24
Why Choosing A Framework
It simplify “boring” (important) choices:
●
Architecture
●
Design Patterns
●
Infrastructure implementation
●
Deployment format
●
Security
●
...
5 / 24
So, Why Vue?
●
Reactivity
●
Components
●
Small
●
Excellent tooling
●
Wide ecosystem
6 / 24
Reactivity
7 / 24
Reactivity the Cool Part
<template>
<div>
<div class="col">
<input type="number" v-model="counter" />
</div>
<div class="col">
{{ counter }}
</div>
</div>
</template>
<script>
export default {
name: 'my-counter',
data() {
return { counter: 0 }
}
}
</script>
8 / 24
Reactivity the Cool Part / 2
<template>
...
<input type="number"
v-bind:value="counter"
v-on:input="counter = $event" />
...
</template>
9 / 24
Limitation in Reactivity
An attribute must exists to be watched!
Vue cannot detect the adding o deleting of an
attribute of an object.
You cannot combine reactive objects with non-
reactive objects!
10 / 24
Vue Component
export default {
el: ‘#mount-element’,
template: ‘<div>Template as string</div>’,
name: 'component-id',
props: [],
mixins: [],
data() { /* return an object */ },
methods: { /* functions */ },
watch: { /* watched parameters */ },
computed: { /* sort of “magic” getters */ },
render(createElement) {
// function that return the VNode
}
}
11 / 24
Mixins
The way to share reusable functions in Vue
●
You can share normal
functions
●
You can easily share
functions between different
projecs not just components
●
Total separation between
components
●
Is a custom composition
●
Can be weird to use
●
You cannot use “this”
12 / 24
Vue Component Lifecycle
export default {
beforeCreate() {},
created() {},
beforeMount() {},
mounted() {},
beforeUpdate() {},
updated() {},
activated() {},
deactivated() {},
beforeDestroy() {},
destroyed() {},
errorCaptured() {},
}
13 / 24
Vue Component Lifecycle
export default {
beforeCreate() {},
created() {},
beforeMount() {},
mounted() {},
beforeUpdate() {},
updated() {},
activated() {},
deactivated() {},
beforeDestroy() {},
destroyed() {},
errorCaptured() {},
}
14 / 24
Tooling
●
Vue Cli
●
Powered by Webpack
●
Development server with hot reload
●
Development IDE plugins
●
Project build
●
Unit testing
●
Debugging
●
Documentation
●
...more
15 / 24
Vue Router
import Vue from “vue”
import VueRouter from “vue-router”
// ...import components…
const router = new VueRouter({
{ path: '/foo', component: Foo },
{ path: '/bar', component: Bar }
})
const app = new Vue({
router,
}).$mount('#app')
16 / 24
Vuex
●
When you need to
share a state between
multiple components
●
To separate APIs from
the App components
●
For complex
applications
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
increment (state) {
state.count++
}
}
})
MobX, XState, Redux as alternatives
17 / 24
SPA
●
Your app is just plain HTML, CSS and JavaScript
●
You can use a simple web server to publish it
●
The app and the back-end can be independent
●
The back-end will just serve the data and be
much simple and with less load
●
Good user experience and interactivity
●
You can parallelize development of FE and BE
18 / 24
SPA
●
It can be slow in rendering some times
●
No great SEO
●
If your app is big with many pages it can be very
heavy in clients memory
●
You have to build the app before deployment
●
Debugging deployed app can be complex
19 / 24
Some Solution For SPA
To address slow rendering and SEO we can
implement the following features:
●
Pages Entry Points
●
Prerendering
●
Server-Side Rendering
20 / 24
Progressing Web Applications
Vue offer a vue cli template and scaffolding to
create PWA apps
21 / 24
Vue Just For Components
22 / 24
Vue 3 Why
●
Performance enhancements
– Small size for core
– Rewrite of DOM API to increase performance
●
Composable API
– setup()
– “hooks”
●
New features
– Fragments
– Suspense
– Teleport
23 / 24
Vue 3: Should I Use It?
●
Still use Vue 2 for production
●
Not many libs are available for Vue 3
●
You can experiment or use for small projects
●
Check your dependencies before upgrade your
app from version 2
24 / 24
References
●
Vue https://vuejs.org/
●
Vue Devtools https://github.com/vuejs/vue-devtools
●
GitHub https://github.com/vuejs/vue
●
Vue 3 https://v3.vuejs.org/
●
Vue Cli https://cli.vuejs.org/
●
Vue Router https://router.vuejs.org/
●
Vuex https://vuex.vuejs.org/
●
SSR https://ssr.vuejs.org/
●
Article: “Create your Vue.Js component and use it everywhere”

More Related Content

What's hot

Pre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifyPre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifynuppla
 
Load testing with gatling
Load testing with gatlingLoad testing with gatling
Load testing with gatlingChris Birchall
 
Vue.js
Vue.jsVue.js
Vue.jsBADR
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4Vijay Shukla
 
Bundling your front-end with Webpack
Bundling your front-end with WebpackBundling your front-end with Webpack
Bundling your front-end with WebpackDanillo Corvalan
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019Paul Bele
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An OverviewNaveen Pete
 
The WordPress Performance Team
The WordPress Performance TeamThe WordPress Performance Team
The WordPress Performance TeamFelix Arntz
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.jsTechMagic
 
AngularJS with RequireJS
AngularJS with RequireJSAngularJS with RequireJS
AngularJS with RequireJSJohannes Weber
 

What's hot (20)

Pre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifyPre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlify
 
Load testing with gatling
Load testing with gatlingLoad testing with gatling
Load testing with gatling
 
Vue.js
Vue.jsVue.js
Vue.js
 
Webpack
WebpackWebpack
Webpack
 
React october2017
React october2017React october2017
React october2017
 
Vue js for beginner
Vue js for beginner Vue js for beginner
Vue js for beginner
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
 
Bundling your front-end with Webpack
Bundling your front-end with WebpackBundling your front-end with Webpack
Bundling your front-end with Webpack
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019
 
Server side rendering review
Server side rendering reviewServer side rendering review
Server side rendering review
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
VueJS: The Simple Revolution
VueJS: The Simple RevolutionVueJS: The Simple Revolution
VueJS: The Simple Revolution
 
The WordPress Performance Team
The WordPress Performance TeamThe WordPress Performance Team
The WordPress Performance Team
 
MEAN stack
MEAN stackMEAN stack
MEAN stack
 
React Server Side Rendering with Next.js
React Server Side Rendering with Next.jsReact Server Side Rendering with Next.js
React Server Side Rendering with Next.js
 
Deploy like a pro!
Deploy like a pro!Deploy like a pro!
Deploy like a pro!
 
SnapyX - ParisJS
SnapyX - ParisJSSnapyX - ParisJS
SnapyX - ParisJS
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.js
 
Vue presentation
Vue presentationVue presentation
Vue presentation
 
AngularJS with RequireJS
AngularJS with RequireJSAngularJS with RequireJS
AngularJS with RequireJS
 

Similar to Vuejs

JavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and FutureJavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and FutureIgalia
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.jsPagepro
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developerEdureka!
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperEdureka!
 
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...OdessaJS Conf
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
Vuejs and Web components - current state
Vuejs and Web components - current stateVuejs and Web components - current state
Vuejs and Web components - current stateMikhail Kuznetcov
 
Modernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptxModernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptxEd Charbeneau
 
Modernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptxModernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptxEd Charbeneau
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEORNodeXperts
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsTakuya Tejima
 
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechVue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechDivante
 
Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)
Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)
Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)Obeo
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JSFestUA
 
Why is this ASP.NET web app running slowly?
Why is this ASP.NET web app running slowly?Why is this ASP.NET web app running slowly?
Why is this ASP.NET web app running slowly?Mark Friedman
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patternsAlbert Brand
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applicationsAstrails
 

Similar to Vuejs (20)

JavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and FutureJavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and Future
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
 
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
 
Vue js and Dyploma
Vue js and DyplomaVue js and Dyploma
Vue js and Dyploma
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Vuejs and Web components - current state
Vuejs and Web components - current stateVuejs and Web components - current state
Vuejs and Web components - current state
 
Modernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptxModernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptx
 
Modernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptxModernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptx
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js
 
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechVue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
 
Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)
Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)
Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)
 
React loadable
React loadableReact loadable
React loadable
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Why is this ASP.NET web app running slowly?
Why is this ASP.NET web app running slowly?Why is this ASP.NET web app running slowly?
Why is this ASP.NET web app running slowly?
 
Nilesh umaretiya CV 2016
Nilesh umaretiya CV 2016Nilesh umaretiya CV 2016
Nilesh umaretiya CV 2016
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patterns
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applications
 

More from Mario Alexandro Santini (9)

A Safe Dock for our Programs
A Safe Dock for our ProgramsA Safe Dock for our Programs
A Safe Dock for our Programs
 
Rust With async / .await
Rust With async / .awaitRust With async / .await
Rust With async / .await
 
Rust_Threads.pdf
Rust_Threads.pdfRust_Threads.pdf
Rust_Threads.pdf
 
The_Borrow_Checker.pdf
The_Borrow_Checker.pdfThe_Borrow_Checker.pdf
The_Borrow_Checker.pdf
 
The Rust Programming Language
The Rust Programming LanguageThe Rust Programming Language
The Rust Programming Language
 
Introduction to typescript
Introduction to typescriptIntroduction to typescript
Introduction to typescript
 
The myth of the small script
The myth of the small scriptThe myth of the small script
The myth of the small script
 
Docker jug taa
Docker   jug taaDocker   jug taa
Docker jug taa
 
Lambda architecture
Lambda architectureLambda architecture
Lambda architecture
 

Recently uploaded

Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
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.pdfkalichargn70th171
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
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
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

Vuejs

  • 1. 1 / 24 Web Frameworks: The VueJs Case Software Developers’ Thursday 3 Jun 2021
  • 2. 2 / 24 The pronunciation /vjuː/
  • 3. 3 / 24 The Best Web Framework WebSocket DOM Service Workers Web Workers SSE
  • 4. 4 / 24 Why Choosing A Framework It simplify “boring” (important) choices: ● Architecture ● Design Patterns ● Infrastructure implementation ● Deployment format ● Security ● ...
  • 5. 5 / 24 So, Why Vue? ● Reactivity ● Components ● Small ● Excellent tooling ● Wide ecosystem
  • 7. 7 / 24 Reactivity the Cool Part <template> <div> <div class="col"> <input type="number" v-model="counter" /> </div> <div class="col"> {{ counter }} </div> </div> </template> <script> export default { name: 'my-counter', data() { return { counter: 0 } } } </script>
  • 8. 8 / 24 Reactivity the Cool Part / 2 <template> ... <input type="number" v-bind:value="counter" v-on:input="counter = $event" /> ... </template>
  • 9. 9 / 24 Limitation in Reactivity An attribute must exists to be watched! Vue cannot detect the adding o deleting of an attribute of an object. You cannot combine reactive objects with non- reactive objects!
  • 10. 10 / 24 Vue Component export default { el: ‘#mount-element’, template: ‘<div>Template as string</div>’, name: 'component-id', props: [], mixins: [], data() { /* return an object */ }, methods: { /* functions */ }, watch: { /* watched parameters */ }, computed: { /* sort of “magic” getters */ }, render(createElement) { // function that return the VNode } }
  • 11. 11 / 24 Mixins The way to share reusable functions in Vue ● You can share normal functions ● You can easily share functions between different projecs not just components ● Total separation between components ● Is a custom composition ● Can be weird to use ● You cannot use “this”
  • 12. 12 / 24 Vue Component Lifecycle export default { beforeCreate() {}, created() {}, beforeMount() {}, mounted() {}, beforeUpdate() {}, updated() {}, activated() {}, deactivated() {}, beforeDestroy() {}, destroyed() {}, errorCaptured() {}, }
  • 13. 13 / 24 Vue Component Lifecycle export default { beforeCreate() {}, created() {}, beforeMount() {}, mounted() {}, beforeUpdate() {}, updated() {}, activated() {}, deactivated() {}, beforeDestroy() {}, destroyed() {}, errorCaptured() {}, }
  • 14. 14 / 24 Tooling ● Vue Cli ● Powered by Webpack ● Development server with hot reload ● Development IDE plugins ● Project build ● Unit testing ● Debugging ● Documentation ● ...more
  • 15. 15 / 24 Vue Router import Vue from “vue” import VueRouter from “vue-router” // ...import components… const router = new VueRouter({ { path: '/foo', component: Foo }, { path: '/bar', component: Bar } }) const app = new Vue({ router, }).$mount('#app')
  • 16. 16 / 24 Vuex ● When you need to share a state between multiple components ● To separate APIs from the App components ● For complex applications import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { count: 0 }, mutations: { increment (state) { state.count++ } } }) MobX, XState, Redux as alternatives
  • 17. 17 / 24 SPA ● Your app is just plain HTML, CSS and JavaScript ● You can use a simple web server to publish it ● The app and the back-end can be independent ● The back-end will just serve the data and be much simple and with less load ● Good user experience and interactivity ● You can parallelize development of FE and BE
  • 18. 18 / 24 SPA ● It can be slow in rendering some times ● No great SEO ● If your app is big with many pages it can be very heavy in clients memory ● You have to build the app before deployment ● Debugging deployed app can be complex
  • 19. 19 / 24 Some Solution For SPA To address slow rendering and SEO we can implement the following features: ● Pages Entry Points ● Prerendering ● Server-Side Rendering
  • 20. 20 / 24 Progressing Web Applications Vue offer a vue cli template and scaffolding to create PWA apps
  • 21. 21 / 24 Vue Just For Components
  • 22. 22 / 24 Vue 3 Why ● Performance enhancements – Small size for core – Rewrite of DOM API to increase performance ● Composable API – setup() – “hooks” ● New features – Fragments – Suspense – Teleport
  • 23. 23 / 24 Vue 3: Should I Use It? ● Still use Vue 2 for production ● Not many libs are available for Vue 3 ● You can experiment or use for small projects ● Check your dependencies before upgrade your app from version 2
  • 24. 24 / 24 References ● Vue https://vuejs.org/ ● Vue Devtools https://github.com/vuejs/vue-devtools ● GitHub https://github.com/vuejs/vue ● Vue 3 https://v3.vuejs.org/ ● Vue Cli https://cli.vuejs.org/ ● Vue Router https://router.vuejs.org/ ● Vuex https://vuex.vuejs.org/ ● SSR https://ssr.vuejs.org/ ● Article: “Create your Vue.Js component and use it everywhere”