Vuex Quick Start Guide: Centralized State Management for your Vue.js applications

Andrea Koutifaris

  • 出版商: Packt Publishing
  • 出版日期: 2018-04-05
  • 售價: $1,410
  • 貴賓價: 9.5$1,340
  • 語言: 英文
  • 頁數: 152
  • 裝訂: Paperback
  • ISBN: 1788999932
  • ISBN-13: 9781788999939
  • 相關分類: Vue.js
  • 海外代購書籍(需單獨結帳)

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

商品描述

Develop consistent web apps with Vuex by easily centralizing the state of your application

Key Features

  • Uncover the hidden features of Vuex to build applications that are powerful, consistent, and maintainable
  • Enforce a Flux-like application architecture in your Vue application
  • Test your Vuex elements and Vue components using Karma/Jasmine testing framework

Book Description

State management preserves the state of controls in a user interface. Vuex is a state management tool for Vue.js that makes the architecture easier to understand, maintain and evolve. This book is the easiest way to get started with Vuex to improve your Vue.js application architecture and overall user experience.

Our book begins by explaining the problem that Vuex solves, and how it helps your applications. You will learn about the Vuex core concepts, including the Vuex store, changing application state, carrying out asynchronous operations and persisting state changes, all with an eye to scalability.

You will learn how to test Vuex elements and Vue components with the Karma and Jasmine testing frameworks. You will see this in the context of a testing first approach, following the fundamentals of Test Driven Development. TDD will help you to identify which components need testing and how to test them. You will build a full Vuex application by creating the application components and services, and persist the state.

Vuex comes with a plugin system that allows programmers to extend Vuex features. You will learn about some of the most powerful plugins, and make use of the built-in logger plugin. You write a custom Google Analytics plugin to send actions to its analytics API, and an Undo/Redo plugin.

What you will learn

  • Moving from classical MVC to a Flux-like architecture
  • Implementing predictable centralized state management in your applications using Vuex
  • Using ECMAScript 6 features for developing a real application
  • Using webpack in conjunction with Vue single file components
  • Testing your Vue/Vuex applications using Karma/Jasmine and inject-loader
  • Simple and effective Test Driven Development
  • Extending your application with Vuex plugins

Who This Book Is For

If you are a JavaScript developer, working on Vue.js and want to extend your web development skills to develop and maintain bigger applications using state management, then this book is for you. No knowledge of Vuex is required.

Table of Contents

  1. Rethinking User Interfaces with Flux, Vue and Vuex
  2. Implementing Flux architecture with Vuex
  3. Setting Up Development and Test Environment
  4. Coding the EveryNote App Using Vuex State Management
  5. Debugging Vuex Applications
  6. Using the Vuex plugin system

商品描述(中文翻譯)

使用Vuex開發一致的網頁應用程式,輕鬆集中應用程式的狀態。

主要特點:
- 揭示Vuex的隱藏功能,建立功能強大、一致且易於維護的應用程式
- 在Vue應用程式中實施類似Flux的應用程式架構
- 使用Karma/Jasmine測試框架測試Vuex元素和Vue元件

書籍描述:
狀態管理在使用者介面中保留控制項的狀態。Vuex是Vue.js的狀態管理工具,使架構更易於理解、維護和演進。本書是使用Vuex入門的最簡單方式,以改善Vue.js應用程式架構和整體使用者體驗。

本書首先解釋了Vuex解決的問題,以及它如何幫助您的應用程式。您將學習Vuex的核心概念,包括Vuex存儲庫、更改應用程式狀態、執行異步操作和持久化狀態更改,並注重可擴展性。

您將學習如何使用Karma和Jasmine測試框架測試Vuex元素和Vue元件。您將在測試驅動開發的基礎上進行學習,這將幫助您確定哪些元件需要測試以及如何測試它們。您將通過創建應用程式元件和服務並持久化狀態來構建完整的Vuex應用程式。

Vuex附帶了一個插件系統,允許程序員擴展Vuex功能。您將學習一些最強大的插件,並使用內置的日誌記錄插件。您將編寫一個自定義的Google Analytics插件,以將操作發送到其分析API,以及一個撤消/重做插件。

您將學到:
- 從傳統MVC轉向類似Flux的架構
- 使用Vuex實施可預測的集中式狀態管理
- 使用ECMAScript 6功能開發真實應用程式
- 與Vue單文件元件一起使用webpack
- 使用Karma/Jasmine和inject-loader測試Vue/Vuex應用程式
- 簡單而有效的測試驅動開發
- 使用Vuex插件擴展應用程式

本書適合對Vue.js有經驗且希望擴展網頁開發技能以開發和維護更大型應用程式的JavaScript開發人員。不需要對Vuex有任何了解。

目錄:
1. 重新思考使用Flux、Vue和Vuex的使用者介面
2. 使用Vuex實施Flux架構
3. 設置開發和測試環境
4. 使用Vuex狀態管理編寫EveryNote應用程式
5. 調試Vuex應用程式
6. 使用Vuex插件系統