The presentation deals with the special use cases of Vue.js, contains an overview of existing solutions like React, Angular and compare them on a high level, shows in which cases Vue.js can boost developers productivity.
This presentation by Igor Nesterenko (Lead Software Engineer, Consultant, GlobalLogic Kharkiv) was delivered at GlobalLogic Kharkiv JS TechTalk on December 18, 2017.
2. 2
Agenda
1. Why Vue.js ?
2. Good Parts of Vue.js
3. Case 1 Proof of Concept
4. Case 2 Legacy non-SPA
5. Case 3 Legacy SPA
6. Case 4 Diversity in team experience
7. Case 5 From POC to MVP
8. Summary
3. 3
Terms
1. SPA - single page application
2. POC - proof of concept
3. MVP - minimal viable product
4. Progressive Framework - set of libraries developed by the same
team with high attention to backward compatibility and features
interoperability
5. JavaScript Fatigue - time spend on configuring js environment
5. 5
Github Stars Over Years
• What concern it helps to
solve ?
• Why Vue.js is growing so
rapidly?
• Is it not enough React.js ?
• Why Angular in the bottom,
however it’s on a top list in
hiring ?
Photo is
example for
placement and
max. size
8. 8
Pragmatic Overview
● Overview few most important
aspects when choosing any
solution.
● What concepts I have to learn
to start using solution ?
● What main special traits of
Vue.js to compare to React
and Angular ?
10. 10
Vue Comparison
● Vue’s Docs is rockstar
● Vue is smallest one
● Official Router, unlike React
● Official Store unlike Angular and React
● Official Tests Utils, however in beta
● MIT License, however No Big Company behind
12. 12
Vue Things To Learn
● ES 5 and HTML would be enough
● Even easier that React
● Much more easier the Angular
13. 13
Good parts of Vue.js
● Can run in browser natively
● It’s joy to learn
● Vue familiar as for Angular as for React developer
● Official guidelines, tools and plugins to scale
application
15. 15
Case 1 Proof of concept
● You have some idea to validate before presenting to
customer
● Customer ask you to make some prototype of new
feature or try new approach
● Just few days
27. 27
Case 1 Summary
● courage to learn jsp/asp or php ;-)
● pair programming
● share best practices of component development
● educate non-Components people
● ! be aware of security issues
28. 28
Case 1 Summary
● no additional tooling
● Single File Component like dev experience for free
● no REST API pre-requirements
● more clean and maintainable code
30. 30
Case 3 Legacy SPA
● Can’t evolve/maintain, outdated stac
● Example: Backbone, Marionet, AngularJS, RequireJs
● Usual backbone problems: component composition
and state management
● Danger ! in some cases the only way to rewrite app
from scratch
32. 32
Build Backbone View adapter for Vue
Backbone.View
BackboneVueAdapter
Override Event Delegation
and use component instead
of template
33. 33
Build Backbone View adapter for Vue
BackboneVueAdapter
Backbone.ModelDOM
VueComponent
Pass Props to Update Component
Direct DOM Manipulations
Reactive
Updates
Listen for changes and
change data through
methods
34. 34
Build Backbone View adapter for Vue
BackboneVueAdapter
Backbone.ModelDOM
VueComponent
Listen for changes and
change data through
methods
Reactive
Updates
Pass Props and Listen for
Events
35. 35
Leave BackboneVueAdapter for Smart Components
BackboneVueAdapter
Backbone.Model
VueComponent
Listen for changes and
modify data through
methods
VueComponent VueComponent
Pass Props and Listen for
Events
Pass Props and Listen for
Events
40. 40
Case 3 Legacy SPA - Summary
● No additional tools required
● Vue allows to decouple Backbone.View from DOM
● Limit places with data manipulation
● Allows to refactor app step by step into component
architecture
● ! Don’t modify the same DOM attributes
42. 42
Case 4 Diversity in Team Experience
● good for newbie
● familiar for Angular people, because templates syntax
● familiar for React people, because only components
philosophy
● as result it’s a good tool for team with a big diversity in
experience
50. 50
Summary
● jQuery-like first user experience
● allows you to go in unfriendly environments
● all you need for complex UI solutions
● may helps in dealing with team diversity
● provide a progressive framework, so you can evolve
your POC in scalable app