Vue.js 3 By Example
eBook - ePub

Vue.js 3 By Example

Blueprints to learn Vue web development, full-stack development, and cross-platform development quickly

John Au-Yeung

Buch teilen
  1. 320 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Vue.js 3 By Example

Blueprints to learn Vue web development, full-stack development, and cross-platform development quickly

John Au-Yeung

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Kick-start your Vue.js development career by learning the fundamentals of Vue 3 and its integration with modern web technologies such as Electron, GraphQL, Ionic, and Laravel

Key Features

  • Download complete source code for all Vue.js projects built throughout the book
  • Discover steps to build production-ready Vue.js apps across web, mobile, and desktop
  • Build a compelling portfolio of web apps, including shopping cart system, booking app, slider puzzle game, real-time chat app, and more

Book Description

With its huge ecosystem and wide adoption, Vue is one of the leading frameworks thanks to its ease of use when developing applications. However, it can get challenging for aspiring Vue.js developers to make sense of the ecosystem and build meaningful applications.

This book will help you understand how you can leverage Vue effectively to develop impressive apps quickly using its latest version – Vue 3.0.

The book takes an example-based approach to help you get to grips with the basics of Vue 3 and create a simple application by exploring features such as components and directives. You'll then enhance your app building skills by learning how to test the app with Jest and Vue Test Utils. As you advance, you'll understand how to write non-web apps with Vue 3, create cross-platform desktop apps with the Electron plugin, and build a multi-purpose mobile app with Vue and Ionic. You'll also be able to develop web apps with Vue 3 that interact well with GraphQL APIs. Finally, you'll build a chat app that performs real-time communication using Vue 3 and Laravel.

By the end of this Vue.js book, you'll have developed the skills you need to build real-world apps using Vue 3 by working through a range of projects.

What you will learn

  • Get to grips with Vue architecture, components, props, directives, mixins, and other advanced features
  • Understand the Vue 3 template system and use directives
  • Use third-party libraries such as Vue Router for routing and Vuex for state management
  • Create GraphQL APIs to power your Vue 3 web apps
  • Build cross-platform Vue 3 apps with Electron and Ionic
  • Make your Vue 3 apps more captivating with PrimeVue
  • Build real-time communication apps with Vue 3 as the frontend and Laravel

Who this book is for

This book is for web developers who want to learn frontend web development with Vue 3 and use it to create professional applications. You'll also find this book useful if you're looking to create full-stack web apps with Vue.js 3.0 as the frontend. Knowledge of JavaScript programming is required to get the most out of this book.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Vue.js 3 By Example als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Vue.js 3 By Example von John Au-Yeung im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Web Programming. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2021
ISBN
9781838828066

Chapter 1: Creating Your First Application in Vue 3

Vue 3 is the latest version of the popular Vue.js framework. It is focused on improving developer experience and speed. It is a component-based framework that lets us create modular, testable apps with ease. It includes concepts that are common to other frameworks such as props, transitions, event handling, templates, directives, data binding, and more. The main goal of this chapter is to get you started with developing your first Vue app. This chapter is focused on how to create components.
In this chapter, we will look at how to use Vue 3 to create simple apps from scratch. We will start by building the most basic apps and then move on to building more complex solutions in the next few chapters.
The major topics we will cover are as follows:
  • Understanding Vue as a framework
  • Setting up the Vue project
  • Vue 3 core features – components and built-in directives
  • Debugging with Vue.js Devtools

Technical requirements

The code for this chapter is located at https://github.com/PacktPublishing/-Vue.js-3-By-Example/tree/master/Chapter01.

Understanding Vue as a framework

As we mentioned in the introduction, there are concepts in Vue that are available from other frameworks. Directives manipulate the Document Object Model (DOM) just like in Angular.js and Angular. Templates render data like we do with Angular. It also has its own special syntax for data binding and adding directives.
Angular and React both have props that pass data between components. We can also loop through array and object entries to display items from lists. Also, like Angular, we can add plugins to a Vue project to extend its functionality.
Concepts that are exclusive to Vue.js include computed properties, which are component properties that are derived from other properties. Also, Vue components have watchers that let us watch for reactive data changes. Reactive data is data that is watched by Vue.js and actions are done automatically when reactive data changes.
As reactive data changes, other parts of a component and other components that reference those values are all updated automatically. This is the magic of Vue. It is one of the reasons that we can do so much with so little code. It takes care of the task of watching for data changes for us, so that we don't have to do that.
Another unique feature of Vue 3 is that we can add the framework and its libraries with script tags. This means that if we have a legacy frontend, we can still use Vue 3 and its libraries to enhance legacy frontends. Also, we don't need to add build tools to build our app. This is a great feature that isn't available with most other popular frameworks.
There's also the popular Vue Router library for routing, and the Vuex library for state management. They have all been updated to be compatible with Vue 3, so we can use them safely. This way, we don't have to worry about which router and state management library to use as we do with other frameworks such as React. Angular comes with its own routes, but no standard state management library has been designated.

Setting up the Vue project with the Vue CLI and script tag

There are several ways to create Vue projects or to add script tags to our existing frontends. For prototyping or learning purposes, we can add the latest version of Vue 3 by adding the following code:
<script src="https://unpkg.com/vue@next"></script>
This will always include the latest version of Vue in our app. If we use it in production, we should include the versio...

Inhaltsverzeichnis