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

Compartir libro
  1. 320 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Vue.js 3 By Example

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

John Au-Yeung

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Vue.js 3 By Example un PDF/ePUB en línea?
Sí, puedes acceder a Vue.js 3 By Example de John Au-Yeung en formato PDF o ePUB, así como a otros libros populares de Computer Science y Web Programming. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2021
ISBN
9781838828066
Edición
1
Categoría
Computer Science
Categoría
Web Programming

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...

Índice