The Majesty of Vue.js 2
Learn Vue.js 2 from scratch!
This book will guide you through the path of the rapidly spreading Javascript Framework Vue.js!
By the end of this book, you will be able to create fast front end applications and increase the performance of your existing projects with Vue.js 2 integration.
Learn Vue.js 2 from scratch!
This book will guide you through the path of the rapidly spreading Javascript Framework Vue.js!
By the end of this book, you will be able to create fast front end applications and increase the performance of your existing projects with Vue.js 2 integration.
Minimum price
$24.90
$31.90
You pay
$31.90Authors earn
$25.52About
About the Book
TL;DR: This title is the updated version ofThe Majesty of Vue.js, which sold over 700 copies, and was considered one of the first and top learning resources for the Vue.js framework. The book will be constantly updated to keep up with Vue.js 2 changes and new chapters will be added for a long time.
This book is addressed to anyone interested in learning Vue.js. It is useful for developers who are new to Vue.js as well as those who already use Vue.js and want to expand their knowledge. It is also helpful for developers who are looking to migrate to Vue.js 2.
A percentage (20%) of book earnings will be donated to Evan You to support the excellent work he's doing with the Vue framework.
If you are looking for more advanced topics like Vuex, Firebase, etc, check outVue School.
This book will guide you through the path of the rapidly spreading Javascript Framework called Vue.js!
Some time ago, we started a new project based on Laravel and Vue.js. After thoroughly reading Vue.js' guide and a few tutorials, we discovered a lack of resources about Vue.js around the web. During the development of our project, we gained a lot of experience, so we came up with the idea to write this book in order to share our acquired knowledge with the world. Now that Vue.js 2 is out we decided it was time to update our book by publishing a second version where all examples and their relative contents are rewritten.
The book is written in an informal, intuitive, and easy-to-follow format, wherein all examples are appropriately detailed enough to provide adequate guidance to everyone. We’ll start with the very basics and through many examples, we’ll cover the most significant features of Vue.js 2.
The best way to learn code is to write code, so we have prepared one exercise at the end of most chapters for you to solve and actually test yourself on what you have learned. We have also updated the exercises and solutions for Vue 2, and strongly recommend you to try as much as possible to solve them in order to gain a better understanding of Vue.js.
By the end of this book, you will be able to create fast front end applications and increase the performance of your existing projects with Vue.js integration.
Who is this book for
Everyone who has spent time to learn modern web development has seen Bootstrap, Javascript, and many Javascript frameworks.
This book is for anyone interested in learning a lightweight and simple Javascript framework.
No excessive knowledge is required, though it would be good to be familiar with HTML and Javascript. If you don't know what the difference is between a string and an object, maybe you need to do some digging first.
This book is also useful for any reader who already know their way around Vue.js and want to expand their knowledge.
Author
About the Authors
Alex Kyriakidis is an ambitious, award winner developer, software engineer perfectionist and currently addicted to Laravel and Vue.js. He has worked with several teams delivering high quality cross-platform applications, APIs and websites.
Alex spends his time learning cutting edge technologies every day, striving to make the best developer out of himself.
Translations
Translations
Contents
Table of Contents
Introduction
About Vue.js
- Vue.js Overview
- What people say about Vue.js
- Comparison with Other Frameworks
- Angular 1
- Angular 2
- React
- Ember
- Polymer
- Riot
Welcome
- About the Book
- Who is this Book for
- Get In Touch
- Homework
- Sample Code
- Errata
- Conventions
- This is a Warning
- This is a Tip
- This is an Information box
- This is a Note
- This is a Hint
- This is a Terminal Command
- This is a Comparison text
- This is a link toGithub.
- IVue.js Fundamentals
1.Install Vue.js
- 1.1Standalone Version
- 1.1.1Download from vuejs.org
- 1.1.2Include from CDN
- 1.2Download using NPM
- 1.3Download using Bower
2.Getting Started
- 2.1Hello World
- Info
- 2.2Two-way Binding
- 2.3Comparison with jQuery.
- Code Examples
- 2.4Homework
- Note
- Potential Solution
3.A Flavor of Directives.
- 3.1v-show
- Info
- Info
- 3.2v-if
- 3.2.1Template v-if
- Warning
- 3.3v-else
- Warning
- 3.4v-if vs. v-show
- Code Examples
- 3.5Homework
- Hint
- Potential Solution
4.List Rendering
- 4.1Install & Use Bootstrap
- Info
- Tip
- 4.2v-for
- Warning
- 4.2.1Range v-for
- Note
- 4.3Array Rendering
- 4.3.1Loop Through an Array
- Info
- 4.3.2Loop Through an Array of Objects
- 4.4Object v-for
- Info
- Code Examples
- 4.5Homework
- Potential Solution
5.Interactivity
- 5.1Event Handling
- Info
- 5.1.1Handling Events Inline
- 5.1.2Handling Events using Methods
- Warning
- 5.1.3Shorthand for
v-on - 5.2Event Modifiers
- Note
- 5.3Key Modifiers
- Tip
- 5.4Computed Properties
- Note
- Code Examples
- 5.5Homework
- Hint
- Potential Solution
6.Filters
- 6.1Filtered Results
- Info
- Info
- Note
- 6.1.1Using Computed Properties
- 6.2Ordered Results
- 6.3Custom Filters
- 6.4Utility Libraries
- Syntax
- Tip
- Code Examples
- 6.5Homework
- Hint
- Potential Solution
7.Components
- 7.1What are Components?
- 7.2Using Components
- Note
- 7.3Templates
- Info
- 7.4Properties
- Warning
- Info
- 7.5Reusability
- Info
- Note
- Tip
- Warning
- 7.6Altogether
- Code Examples
- 7.7Homework
- Potential Solution
8.Custom Events
- 8.1Emit and Listen
- 8.1.1Lifecycle Hooks
- 8.2Parent-Child Communication
- 8.3Passing Arguments
- Info
- 8.4Non Parent-Child Communication
- Warning
- 8.5Removing Event Listeners
- 8.6Back to stories
- Info
- Code Examples
- 8.7Homework
- Hint
- Hint
- Potential Solution
9.Class and Style Bindings
- 9.1Class binding
- 9.1.1Object Syntax
- Info
- 9.1.2Array Syntax
- Info
- Tip
- 9.2Style binding
- 9.2.1Object Syntax
- 9.2.2Array Syntax
- Info for Intermediates
- 9.3Bindings in Action
- Code Examples
- 9.4Homework
- Hint
- Potential Solution
- IIConsuming an API
10.Preface
- 10.1CRUD
- 10.2API
- 10.2.1Download Book’s Code
- Note
- 10.2.2API Endpoints
- Tip
11.Working with real data
- Info
- 11.1Get Data Asynchronous
- Info
- Warning
- Warning
- 11.2Refactoring
- 11.3Update Data
- 11.4Delete Data
12.HTTP Clients
- 12.1Introduction
- 12.2Vue-resource
- Info
- 12.3Axios
- Tip
- 12.4Integrating axios
- Info
- 12.5Enhancing Functionality
- 12.5.1Edit Stories
- Info
- 12.5.2Create New Stories
- Info
- Tip
- 12.5.3Store & Update Unit
- Tip
- 12.6JavaScript File
- 12.7Source Code
- Code Examples
- 12.8Homework
- 12.8.1Preface
- 12.8.2API Endpoints
- 12.8.3Your Code
- Potential Solution
13.Pagination
- Info
- 13.1Implementation
- 13.2Pagination Links
- Code Examples
- 13.3Homework
- IIIBuilding Large-Scale Applications
14.ECMAScript 6
- Info
- 14.1Introduction
- 14.1.1Compatibility
- Note
- 14.2Variable Declarations
- 14.2.1Let Declarations
- 14.2.2Constant Declarations
- Info
- 14.3Arrow Functions
- 14.4Modules
- 14.5Classes
- 14.6Default Parameter Values
- 14.7Template literals
15.Advanced Workflow
- 15.1Compiling ES6 with Babel
- Info
- 15.1.1Installation
- What is
package.json? - 15.1.2Configuration
- Tip
- 15.1.3Build alias
- 15.1.4Usage
- Info
- 15.1.5Homework
- Hint
- Hint 2
- Potential Solution
- 15.2Workflow Automation with Gulp
- 15.2.1Task Runners
- Why use a task runner?
- Gulp vs Grunt
- 15.2.2Installation
- 15.2.3Usage
- 15.2.4Watch
- 15.2.5Homework
- Note
- Potential Solution
- 15.3Module Bundling with Webpack
- 15.3.1Module Bundlers
- 15.3.2Webpack
- 15.3.3Installation
- Tip
- 15.3.4Usage
- 15.3.5Automation
- Further Learning
- 15.4Summary
- Note
16.Working with Single File Components
- 16.1The
vue-cli - Info
- 16.1.1Vue’s Templates
- 16.1.2Installation
- 16.1.3Usage
- Tip
- Info
- Standard vs Airbnb
- Info
- 16.2Webpack Template
- Warning
- Note
- 16.2.1Project Structure
- 16.2.2index.html
- 16.2.3Hello.vue
- Warning
- 16.2.4App.vue
- 16.2.5main.js
- Note
- Info
- 16.3Forming
.vueFiles - Note
- 16.3.1Nested Components
- Note
- Code Examples
17.Eliminating Duplicate State
- 17.1Sharing with Properties
- 17.2Global Store
- Warning
- Code Examples
18.Swapping Components
- 18.1Dynamic Components
- 18.1.1The
isspecial attribute - 18.1.2Navigation
- Code Examples
19.Vue Router
- Info
- 19.1Installation
- 19.2Usage
- Info
- Tip
- Note
- 19.3Named Routes
- 19.4History mode
- Info
- 19.5Nested routes
- 19.6Auto-CSS active class
- 19.6.1Custom Active Class
- 19.7Route Object
- 19.8Dynamic Segments
- Info
- Note
- Note
- 19.9Route Alias
- 19.10Programmatic Navigation
- Warning
- 19.11Transitions
- 19.11.1Introduction
- 19.11.2Usage
- 19.11.33rd-party CSS animations
- 19.12Navigation Guards
- Code Examples
- 19.13Homework
- Info
- Hint 1
- Hint 2
20.Closing Thoughts
- Don’t be a stranger!
21.Further Learning
- 21.1Tutorials
- 21.2Videos
- 21.3Books
- 21.4Open source projects
- 21.5Awesome Vue
Contributor
About the Contributors
Eugenia Papoulia
Eugenia is an English teacher. She works as a translator and her main field is literature. However, she is challenged by all kinds of books. In her free time she likes to make subtitles for TV-series.
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
The Leanpub 60 Day 100% Happiness Guarantee
Within60 days of purchase you can get a100% refund on any Leanpub purchase, intwo clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay80% royalties on purchases of$7.99 or more, and80% royalties minus a 50 cent flat fee on purchases between$0.99 and $7.98.You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell5000 non-refunded copies of your book for $20, you'll earn$80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.