Vue.js 2 Design Patterns and Best Practices: Build enterprise-ready, modular Vue.js applications with Vuex and Nuxt

Paul Halliday

  • 出版商: Packt Publishing
  • 出版日期: 2018-03-13
  • 售價: $1,940
  • 貴賓價: 9.5$1,843
  • 語言: 英文
  • 頁數: 344
  • 裝訂: Paperback
  • ISBN: 178883979X
  • ISBN-13: 9781788839792
  • 相關分類: Vue.jsDesign Pattern
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

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

Key Features

  • Craft highly modular applications by exploring the design patterns and component architecture of Vue.js
  • Enforce a Flux-like application architecture in your Vue.js applications with Vuex
  • Easy-to-follow examples that can be used to create reusable code and extensible designs

Book Description

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

Further 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 router 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 antipatterns 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.

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

Who This Book Is For

This book targets Vue Developers who care about framework design principles and utilize commonly found design patterns in developing web applications.

Table of Contents

  1. Vue.js Principles and Comparisons
  2. Proper Creation of Vue Projects
  3. Writing Clean and Lean code with Vue
  4. Vue.js Directives
  5. Secured communication with Vue.js Components
  6. Creating better UI
  7. HTTPS
  8. Vue Router Patterns
  9. State Management with Vuex
  10. Testing your app
  11. Performance Optimisation
  12. Server Side Rendering with Nuxt
  13. Anti Patterns

商品描述(中文翻譯)

成為一位專業的 Vue 開發者,透過了解 Vue.js 的設計模式和組件架構,撰寫乾淨且易於維護的程式碼。

主要特點:

- 通過探索 Vue.js 的設計模式和組件架構,打造高度模組化的應用程式
- 在 Vue.js 應用程式中使用 Vuex 實現類似 Flux 的應用程式架構
- 提供易於理解的範例,可用於創建可重複使用的程式碼和可擴展的設計

書籍描述:

本書首先比較 Vue.js 與其他框架,並設置應用程式的開發環境,逐步撰寫和設計乾淨、易於維護和可重複使用的組件,以供應用程式全面使用。

接著,您將研究常見的 UI 模式、Vue 表單提交以及各種修飾符,例如惰性綁定、數字類型轉換和字串修剪,以創建更好的使用者介面。您還將探索將 HTTP 整合到 Vue.js 應用程式中的最佳實踐,以創建具有動態數據的應用程式。

路由是任何單頁應用程式的重要組成部分,因此您將專注於 Vue 路由器,並探索將使用者路由到多個頁面的方法。接下來,您還將探索使用 Vuex 進行狀態管理,為應用程式編寫可測試的程式碼,並使用 Nuxt 創建高效的伺服器端渲染應用程式。

最後,我們將探討常見的反模式,以避免讓您減少許多嘗試和開發上的困擾。

通過閱讀本書,您將成為一位專業的 Vue 開發者,能夠利用設計模式高效地架構應用程式的設計,並撰寫乾淨且易於維護的程式碼。

您將學到:

- 理解 Vue.js 的理論和模式
- 構建可擴展和模組化的 Vue.js 應用程式
- 利用 Vuex 進行反應式狀態管理
- 使用 vue-router 創建單頁應用程式
- 使用 Nuxt 創建快速的伺服器端渲染 Vue 應用程式
- 將應用程式轉換為漸進式網路應用程式(PWA),並添加 ServiceWorkers、離線支援等功能
- 遵循最佳實踐建立 Vue.js 應用程式,並探索常見的反模式以避免

本書適合對框架設計原則感興趣並在開發網頁應用程式時使用常見設計模式的 Vue 開發者。

目錄:

1. Vue.js 原則和比較
2. 正確創建 Vue 專案
3. 使用 Vue 撰寫乾淨和精簡的程式碼
4. Vue.js 指令
5. 使用 Vue.js 組件進行安全通訊
6. 創建更好的使用者介面
7. HTTPS
8. Vue 路由模式
9. 使用 Vuex 進行狀態管理
10. 測試您的應用程式
11. 效能優化
12. 使用 Nuxt 進行伺服器端渲染
13. 反模式