KEMBAR78
Scalable Front-end Development with Vue.JS
Scalable Front-end
Development with Vue.JS
Galih Pratama
Head Front-end Developer at
Who are you?
Galih Pratama
Front-end Developer with 30+ web/apps developed.
Tech-based Edu Content Creator with 100+ videos
created, since 2011.
Current Work / Projects
Me in a nutshell
Current State of Javascript
stateofjs.com/2017/front-end/results
stateofjs.com/2017/opinions
stateofdev.com/c/frontend
What is “Scalable
Development” means?
Improve development speed
Decrease future technical debt
Modular
Good programming pattern
Not over-engineering things
Why Vue.JS?
You can use it simply like this...
...or like this...
Learning curve is easy Hot reload
Two-way data binding
Less boilerplate code
Vuex
Vue Devtools
vue-cli
Small file size
Can used on existing app
Detailed documentation
Write HTML like an usual
Reactive
Fun
Flexible
Simplicity
Single page apps
Single Page Apps (SPA)
Why SPA?
App rendered in browser
Less server overhead
(no need to render anything in server, only serve html/css/js)
Separation of Concerns
(frontend do frontend, backend do backend)
Routing? Included.
vue-router
Wuzz wuzz
Vue Devtools
Makes developing on Vue.js even easier than it already is.
vue-cli
A simple CLI for scaffolding Vue.js projects.
vue init <templatename> <projectname>
You can use it in any way!
● webpack
A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
● webpack-simple
A simple Webpack + vue-loader setup for quick prototyping.
● browserify
A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.
● browserify-simple
A simple Browserify + vueify setup for quick prototyping.
● pwa
PWA template for vue-cli based on the webpack template
● simple
The simplest possible Vue setup in a single HTML file
Vuex
Vue.js on Steroids
How Vue.js “one-way data flow” lifecycle works
The problem?
> One state for multiple component
> Reusable action from different component
How to handle this?
Solution?
Vuex Store
A place to “store” globally in your app
Vuex State Vue Data
Vuex Action Vue Methods
How About SEO?
Google(bot) can index Single Page Apps
SPA & Googlebot
● Googlebot run the Javascript on the page and the Ajax calls are properly executed
● Googlebot waits between 5 to 20 seconds before taking a snapshot of each page
More :
https://medium.com/@l.mugnaini/spa-and-seo-is-googlebot-able-to-render-a-single-page-application-1f74e706ab11
Prerender?
Use prerender-spa-plugin
Server-side rendering?
Use Nuxt.js instead
Conclusion
1. Building javascript apps is somewhat confusing
2. Need to scale up without make it more complicated.
3. Vue.JS make it easier without sacrificing scalability.
4. Official project generator using vue-cli
5. Ready to use devtools with zero configuration
6. Use Vuex in large-scale apps
7. SEO is safe (like Google said)
Conclusion
Thank….
… one more thing
Want to know how
to build it ?
Thank you!
Questions?
galpratama pratama.galih hi@galihpratama.net

Scalable Front-end Development with Vue.JS