Vue.js 2 Design Patterns and Best Practices

Become an expert Vue developer by understanding the design patterns and component architecture of Vue.js to write clean and maintainable code.
Preview in Mapt

Vue.js 2 Design Patterns and Best Practices

Paul Halliday

1 customer reviews
Become an expert Vue developer by understanding the design patterns and component architecture of Vue.js to write clean and maintainable code.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Vue.js 2 Design Patterns and Best Practices Book Cover
Vue.js 2 Design Patterns and Best Practices
$ 35.99
$ 25.20
Enterprise Agility Book Cover
Enterprise Agility
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $40.98
Add to Cart

Book Details

ISBN 139781788839792
Paperback344 pages

Book Description

This book starts off by comparing Vue.js with other frameworks and setting up the development environment for your application. It gradually moves on to writing and styling clean, maintainable, and reusable components that can be used across your application.

Moving on, you'll look at common UI patterns, Vue form submission, and various modifiers such as lazy binding, number typecasting, and string trimming to create better UIs. You will also explore best practices for integrating HTTP into Vue.js applications to create an application with dynamic data.

Routing is a vitally important part of any SPA, so you will focus on the Vue route and explore routing a user between multiple pages. Next, you'll also explore state management with Vuex, write testable code for your application, and create performant, server-side rendered applications with Nuxt.

Towards the end we'll look at common anti-patterns to avoid, to save you from a lot of trial and error and development headaches.

By the end of this book, you'll be well on your way to becoming an expert Vue developer who can leverage design patterns to efficiently architect the design of your application and write clean and maintainable code.

Table of Contents

Chapter 1: Vue.js Principles and Comparisons
Prerequisites
How Vue.js compares
Summary
Chapter 2: Proper Creation of Vue Projects
Visual Studio Code extensions
Vue CLI
VueJS devtools
TypeScript and Vue
RxJS and Vue
Summary
Proxying
Data properties
Computed properties
Watched properties
Lifecycle hooks
Vue.js and the Virtual DOM
Summary
Chapter 3: Writing Clean and Lean Code with Vue
Proxying
Data properties
Computed properties
Watched properties
Lifecycle hooks
Vue.js and the Virtual DOM
Summary
Chapter 4: Vue.js Directives
Model
Iteration with v-for
Bindings
DOM events and v-on
Conditionally showing DOM elements
Filters
Summary
Chapter 5: Secured Communication with Vue.js Components
Your first Vue component
Component communication
Event Bus
Slots
Summary
Chapter 6: Creating Better UI
Animations
CSS animations
Transitions
Form validation
Render/functional components
Summary
Chapter 7: HTTP and WebSocket Communication
HTTP
Real-time chat application with Node and Socket.io
Summary
Chapter 8: Vue Router Patterns
Single Page Applications
Using the router
An SPA project
Summary
Chapter 9: State Management with Vuex
What is Vuex?
Using Vuex
Vuex and Vue devtools
Modules and scalability
Summary
Chapter 10: Testing Vue.js Applications
Why testing?
Unit testing
Using Wallaby.js for a better testing experience
Summary
Chapter 11: Optimization
Progressive Web Applications (PWAs)
Firebase deployment
Continuous Integration (CI)
Service worker
Summary
Chapter 12: Server-Side Rendering with Nuxt
Nuxt
Summary
Chapter 13: Patterns
Components
Summary

What You Will Learn

  • Understand the theory and patterns of Vue.js
  • Build scalable and modular Vue.js applications
  • Take advantage of Vuex for reactive state management.
  • Create Single Page Applications with vue-router.
  • Use Nuxt for FAST server side rendered Vue applications.
  • Convert your application to a Progressive Web App (PWA) and add ServiceWorkers, offline support, and more
  • Build your app with Vue.js by following up with best practices and explore the common anti-patterns to avoid

Authors

Table of Contents

Chapter 1: Vue.js Principles and Comparisons
Prerequisites
How Vue.js compares
Summary
Chapter 2: Proper Creation of Vue Projects
Visual Studio Code extensions
Vue CLI
VueJS devtools
TypeScript and Vue
RxJS and Vue
Summary
Proxying
Data properties
Computed properties
Watched properties
Lifecycle hooks
Vue.js and the Virtual DOM
Summary
Chapter 3: Writing Clean and Lean Code with Vue
Proxying
Data properties
Computed properties
Watched properties
Lifecycle hooks
Vue.js and the Virtual DOM
Summary
Chapter 4: Vue.js Directives
Model
Iteration with v-for
Bindings
DOM events and v-on
Conditionally showing DOM elements
Filters
Summary
Chapter 5: Secured Communication with Vue.js Components
Your first Vue component
Component communication
Event Bus
Slots
Summary
Chapter 6: Creating Better UI
Animations
CSS animations
Transitions
Form validation
Render/functional components
Summary
Chapter 7: HTTP and WebSocket Communication
HTTP
Real-time chat application with Node and Socket.io
Summary
Chapter 8: Vue Router Patterns
Single Page Applications
Using the router
An SPA project
Summary
Chapter 9: State Management with Vuex
What is Vuex?
Using Vuex
Vuex and Vue devtools
Modules and scalability
Summary
Chapter 10: Testing Vue.js Applications
Why testing?
Unit testing
Using Wallaby.js for a better testing experience
Summary
Chapter 11: Optimization
Progressive Web Applications (PWAs)
Firebase deployment
Continuous Integration (CI)
Service worker
Summary
Chapter 12: Server-Side Rendering with Nuxt
Nuxt
Summary
Chapter 13: Patterns
Components
Summary

Book Details

ISBN 139781788839792
Paperback344 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Enterprise Agility Book Cover
Enterprise Agility
$ 39.99
$ 28.00
ASP.NET Web API: Build RESTful web applications and services on the .NET framework Book Cover
ASP.NET Web API: Build RESTful web applications and services on the .NET framework
$ 29.99
$ 21.00
Spring Design Patterns and Best Practices [Video] Book Cover
Spring Design Patterns and Best Practices [Video]
$ 124.99
$ 106.25
Vue JS 2 - The Complete Guide (incl. Vue Router and Vuex) [Video] Book Cover
Vue JS 2 - The Complete Guide (incl. Vue Router and Vuex) [Video]
$ 188.99
$ 160.65
Serverless Design Patterns and Best Practices Book Cover
Serverless Design Patterns and Best Practices
$ 35.99
$ 25.20
Full-Stack Web Development with Vue.js and Node Book Cover
Full-Stack Web Development with Vue.js and Node
$ 35.99
$ 25.20