We will start the evening by covering some interesting topics from the VueJS conference in Amsterdam we have attended on the 16th of February. We also plan to have collated all the speakers slides by then and share them with you guys should you want to digest these more in-depth in your own time. This first half of the event will be hosted by Angelika Johansson and Jason Staerck.
The second talk will be on Vuex. State management is a feature that is expected for every modern JavaScript web framework to support. In this talk, Temitope Faro will be showing you how
you can manage the complexity of large applications using Vuex, patterns for cleanly binding your Vuex store to your form components, using vue-devtools to debug your Vue app state in development, and testing your Vuex actions and mutations.
7. 7
Evan You
Edd Yerburgh
Eduardo San Martin Morote
Alex & Sebastien Chopin
Sarah Drasner
Gerard
Sans
Guillaume
Chau
Plamen
Zdravkov
Ives
Van
Hoorne
Jen Looper
Roman
Kuba
9. 9
Create an engaging mobile app with
NativeScript and Vue.js
Jen Looper
Senior Developer Advocate, Progress
Co-Founder: Wellesley Chinese Language School
10. 10
?
A framework for building native cross-platform
mobile apps
No-compromise, smoothly-animating native
mobile apps for iOS and Android
12. 12
Why Vue for mobile?
• Native mobile rendering with Vue’s adoption of a virtual DOM
• Great way for web developers to embrace mobile platforms
• Vue is lightweight
• NativeScript and Vue have great code-sharing potential!
47. 47
What, Why & how
•Adding new tech is always an INVESTMENT
•Competing tech will run in parallel
•A full SPA is probably not possible at all
•Split the process into phases
61. 61
Introduction to State Management
State management is a core requirement for building modern day
frontend applications
There is a need to manage data flow in the application across various
components, communication to backend systems, internal updates, etc.
A good modern frontend framework is expected to provide a clear way of
managing the application state
66. 66
Locally managing data within components
Products Example – Passing data to child components via props
67. 67
Locally managing data within components
Order Summary Example – Passing data to child components via props
68. 68
Introduction to State Management
• Locally managing data within components
• Managing data using the Event Bus
• Using Vuex
• Locally managing data within components
69. 69
Managing Data using Event Bus
• Uses Vue Event system
• Does not require direct parent/child relationship
• Components typically communicate by emitting and listening on events
71. 71
Managing Data using Event Bus
• Uses Vue Event system
• Does not require direct parent/child
relationship
• Components typically communicate by
emitting and listening on events
75. 75
Managing Data using Event Bus
Advantages Disadvantages
• Less coupled
• Data can shared/communicated
beyond parent/child relationship
• Initially easy to setup
• Difficult to maintain in large
applications
• Different components may duplicate
same data
• Difficult to debug
76. 76
Introduction to State Management
• Locally managing data within components
• Managing data using the Event Bus
• Using Vuex
• Managing data using the Event Bus
77. 77
Vuex
• Is defined in the official documentation as both a state management
pattern + library for Vuejs apps.
• Basically serves as a centralized store for all the components in an
application making sure that state can only be mutated in a predictable
fashion.
• Vuex is an implementation of the Flux architecture
79. 79
Vuex – Flux Principles
• #1: Single source of truth
• #2: Data is read only
• #3: Mutations are read synchronous
Vuex implements above Flux principles, hence, ensuring data is kept in
a predictable state while it is being shared across multiple components
80. 80
Vuex – Why Flux?
Facebook invented flux application design pattern to deal with the very
evasive Zombie notification bug in their application.
81. 81
Vuex – Features
• centralized store
• reactivity on any component reading store data
• custom mutations
• hot module reloading
• time travel debugging
88. 88
Vuex – Mutations
• Mutations is the only way to change state in the Vuex store.
• Each mutation has a string type and a handler
• Has to be synchronous
95. 9595
Wrap Up
• Slides hosted:
• Next Meetup to be scheduled – mid April
• Want to get involved? – get in touch with
us!
• Looking to get some Vue core team
members / contributors