We may earn an affiliate commission when you visit our partners.
Trevor Sawler

Vue.js is, as they say on their website, an "approachable, performant and versatile framework for building web user interfaces." That sentence really does not give Vue its full due. It is arguably the best solution currently available for building highly interactive, easy to  maintain, and feature-rich web applications currently available. Many developers find it easier to learn than React or Angular, and once you learn the basics, it is easy to move on to building more complex applications.

Read more

Vue.js is, as they say on their website, an "approachable, performant and versatile framework for building web user interfaces." That sentence really does not give Vue its full due. It is arguably the best solution currently available for building highly interactive, easy to  maintain, and feature-rich web applications currently available. Many developers find it easier to learn than React or Angular, and once you learn the basics, it is easy to move on to building more complex applications.

Go, commonly referred to as Golang, is an easy to learn, type safe, compiled programming language that has quickly become a favourite among people writing API back ends, network software, and similar products. The ease with which Go works with JSON, for example, makes it an ideal solution to develop a back end for a Single Page Application written in something like Vue.

This course will cover all of the things you need to know to start writing feature-rich, highly interactive applications using Vue.js version 3 for the front end, and Go for the back end API.

We will cover:

  • Working with Vue 3 using a CDN

  • Working with Vue 3 using the vue-cli, node.js and npm

  • Learn both the Options API and the Composition API for Vue 3

  • How to work with props

  • How to build reusable Vue components

  • How to build and use a data store with Vue 3

  • Creating, validating, and posting forms using fetch and JSON

  • Emitting and processing events in Vue

  • Conditional rendering in Vue

  • Animations and transitions in Vue

  • Working with the Vue Router

  • Protecting routes in Vue (requiring user authentication)

  • Caching components using Vue's KeepAlive functionality

  • Implementing a REST API using Go

  • Routing with Go

  • Connecting to a Postgresql database with Go

  • Reading and writing JSON with Go

  • Complete user authentication with Go using stateful tokens

  • Testing our Go back end with unit and integration tests

  • And much more.

Vue is one of the most popular front end JavaScript frameworks out there, and Go is quickly becoming the must-know language for developers, so learning them is definitely a benefit for any developer.

Enroll now

What's inside

Learning objectives

  • Learn how to create interactive web applications using vue 3
  • Learn how to create a rest backend using go (often referred to as golang)
  • Learn how to create a secure user authentication system with vue and go
  • Learn best practices for creating a secure, scalable web application

Syllabus

With the introduction of Vue.js version 3, we now have to application programming interfaces (APIs): the Options API, and the Composition API. We'll be covering both in this course.

Read more

Naturally, we'll need Go installed.

If you don't have an IDE already, VS Code will do the job. Install it if you need to.

Installing the Vetur VS Code extension
An overview of the course goals, and installing our development environment

An overview of what we will be covering in this course.

Just a bit of information about me and my background.

We won't be using make for awhile, but it's incredibly useful, so let's install it now.

When you need to ask for help, make it easy for me to give that help to you. Here's how.

Let's get started with a very simple Vue application
What we'll cover in this section

Let's build the standard "Hello, world!" application. It's tradition, after all.

Let's have a quick look at how Vue works on a web page.

With vue, it's easy to bind a form element to another part of the web page. Let's give that a try.

Let's add some additional interactivity to our application by listening for click events on a couple of buttons, and doing something when they are clicked.

Components are one of the most valuable and powerful parts of Vue. Let's get started with components.

Let's create a re-usable Vue component that can be used to create any type of text input for an HTML form.

Let's try out our Vue component by building a simple user registration form.

Vue applications have a certain lifecycle. It's important to know about it, and how to use it. Let's take advantage of Vue's lifecycle hooks and add some client-side JavaScript validation to our form.

Having a single component is fine, but it's incredibly useful to nest one or more Vue components within another Vue component. Let's try that by creating a (ficticious) user registration form.

Let's build a select component, and add it to our registration form.

Let's add one more component - a checkbox.

It's common to change what is displayed on a given web page depending on some condition. Vue makes it easy to do that with conditional rendering. Let's try it out.

One of the things we do a lot in web applications is to fetch data from a remote service. Let's get started doing that in our Vue application.

Now that we've pulled down some JSON from a remote source, let's work with it and display a list of books in our Vue application.

Let's get started adding some interactivity to our list of books.

Let's add an event listener to our list of books which allows us to remove a book from the list when the trash icon is clicked.

Let's get started working with Vue using the cli application and npm, the Node Package Manager

In order to work with Vue 3 in this section of the course, we need Node and npm installed. Let's take care of that now.

We also need vue-cli installed, so let's take care of that.

Building and running a simple Vue application with vue-cli
The structure of a vue-cli application

Let's remove most of the things that were auto-generated in our Vue app when we ran vue create vue-app, and get started from scratch.

Let's set up three simple Vue components for our application, register them, and add them to the main Vue component.

Let's add some more useful code to our header component.

Let's add some basic content to our Body Vue component.

Let's add some content and styling to our Footer component.

Let's get started making links in our application actually go somewhere

In order to make navigation actually work in our application, it is necessary to use some sort of router. Let's use the official Vue Router, which works really well.

Let's set up some simple routes.

Let's update main.js to tell our application that we are using a router, and then update App.vue to display the appropriate component.

Let's add a dummy Login Vue component, and update our Header component to use the router-link tag from the Vue Router.

Let's use the form Vue components we built in an earlier section and put together a Login component with the appropriate form.

Let's make creating a <form> tag simpler by creating a new Vue component.

Let's improve our login form by binding the form fields to the data associated with our component.

Let's update our FormTag and Login Vue components, and get them to the point where are ready to call the back end REST api. We won't be able to make that call until we actually write the api, but we'll get started on that in the next section.

Let's get started building the API that Vue will connect to

Let's have a quick look at the way Go works with JSON files.

Let's get started writing the Go code for our REST api.

Let's simplify things by installing a third part routing package, and moving our handlers into their own file, with one function per handler.

Let's try connecting our front end Vue application to our back end API server.

Let's modify our routes.go file in the Go back end API to take care of CORS restrictions.

Let's try connecting from our Vue front end to our Go back end API one more time, just to make sure CORS is set up properly in our routes file.

Let's write two helper functions that make it easier to read & write JSON in our back end API.

Let's update our Login handler to use our helper functions for reading and writing JSON.

Let's write one more helper function that makes writing error responses back to the end user as JSON a simple one liner.

Let's set up our Go back end API to handle user authentication using tokens.
Setting up a database with Docker

If you don't already have a Postgres client, Beekeeper Studio will do the trick.

Let's connect to our database with a Postgres client, and set up a simple users table.

Let's create a driver package that we'll use to connect our back end API to a Postgres database.

Let's clean up our driver package a bit, and then try connecting our API to the Postgres database.

Let's get our hard coded database connection information out of our source code, and move them into an environment variable. We'll do this using a Makefile, which makes our lives much easier.

We need some means of representing what is stored in the users table in Postgres in Go; let's set up a model to take care of that.

Let's go back to Beekeeper Studio and set up a tokens table in our Postgresql database.

Let's set up a Token model in our data package, which will map what is in Postgres with our Go code.

Let's simplify the way that we share database information to the various parts of our application, and set up a single function that connects to the database and gets a slice of all users stored in the users table.

Let's add one row to the users table in the Postgres database so that we can try out our GetAll() function.

Let's make sure everything works by creating a test route that calls the GetAll function on our User type, and write some JSON to the browser window.

We'll need a few methods on the User type to get users, so let's write a couple: one to get a user by ID, and another to get a user by email address.

Let's write the methods necessary to update a user, and to delete an existing user.

We're going to need to be able to insert users into the database, so let's write the Go code to insert a user into the Postgres database.

We are also going to need to be able to reset user passwords, and to validate a user supplied password to make sure it matches the hash that we have in the database. Let's take care of that.

Let's get started writing the necessary functions for the Token type.

Let's write two functions on the Token type: one to generate a token, and another to authenticate a token and make sure that it's valid.

We're going to have to be able to insert and delete tokens, so let's take care of that.

One useful function we can attach to the Token type is a means of ensuring that a given token is valid. In order to be considered valid, a token must exist, must be associated with a user that exists in the database, and it must not have expired. Let's create that function now.

Let's get started trying out the functions that interact with Postgres.

Let's try out our GenerateToken function and make sure it works.

Let's see if we got the function that inserts a token into the database right.

Let's make sure that the ValidToken function works as expected by creating a test route and handler.

Let's add a constraint to the users table which will only allow unique email addresses.

Checking for database errors in errorJSON

Let's make the JSON that we send back a bit more readable by implementing and using an envelope type.

Let's complete the authentication process from Vue to Go

In order to connect from our Vue front end to our Go back end and actually authenticate a user, we need to finish up our Login handler. Let's do that now.

We already call the back end from our Vue application, but now we need to make some changes to our front end so that we actually pass the necessary data. Let's get started.

Let's try authenticating and see if we get an error when we should, and that we get a token when we authenticate successfully.

Sharing data between components using a simple store

Right now, our login process is not very intuitive, since we don't give any kind of feedback to the user when they log in. Let's improve that.

Let's get started making the logout process functional.

In order to log a user out completely, we need to delete the token saved in the database. Let's take care of that.

Let's finish up the logout process by updating our Vue Header component to make a fetch request to the back end API in order to delete the user's token from the database.

It's useful to save information  like our token in a secure cookie so that users don't have to log in every time they visit the site. Let's take care of that now.

Let's make some final changes to both the front and back end in order to compete our improved login process.

While we're in development, it's useful to have nicely formatted JSON, but in production, that's a waste of resources. Let's make things more efficient by updating our Makefile to set an environment variable, and then use that in the API back end.

We can log in now, and properly authenticate users, so let's set up some routes and components that are only available to logged in users.

Let's set up some middleware to protect routes so that only users with a valid token can access them.

Let's try out our protected route from the front end to make sure that it works as expected.

Let's set up some stub components for displaying and managing both users and books.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Covers Vue 3, which is a versatile framework for building web user interfaces, making it easier to maintain feature-rich web applications
Explores Go (Golang), a compiled programming language favored for writing API backends and network software due to its ease with JSON
Teaches both the Options API and the Composition API for Vue 3, providing a comprehensive understanding of Vue's capabilities
Requires installing VS Code and the Vetur extension, which may require learners to upgrade their existing IDE or development environment
Uses Postgresql database, which requires learners to set up and manage a database, potentially adding complexity to the development process
Relies on installing Node.js and npm, which may present a hurdle for learners unfamiliar with JavaScript package managers and environments

Save this course

Save Working with Vue 3 and Go (Golang) to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Working with Vue 3 and Go (Golang) with these activities:
Review Go Fundamentals
Review the fundamentals of Go programming to ensure a solid foundation for building the backend API.
Show steps
  • Review basic syntax and data types.
  • Practice writing simple Go programs.
  • Familiarize yourself with Go's standard library.
Review Vue.js Fundamentals
Review the fundamentals of Vue.js to ensure a solid foundation for building the frontend application.
Browse courses on Vue
Show steps
  • Review basic syntax and directives.
  • Practice building simple Vue components.
  • Familiarize yourself with Vue's reactivity system.
Practice building Vue components
Practice building various Vue components to reinforce understanding of component-based architecture.
Show steps
  • Build a simple to-do list component.
  • Create a reusable form input component.
  • Implement a component that fetches data from an API.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Practice building Go APIs
Practice building various Go APIs to reinforce understanding of backend development.
Show steps
  • Build a simple API endpoint that returns JSON data.
  • Implement an API endpoint that interacts with a database.
  • Create an API endpoint that handles user authentication.
Build a simple CRUD application
Start a project to build a simple CRUD (Create, Read, Update, Delete) application using Vue 3 and Go to solidify skills and knowledge.
Show steps
  • Design the database schema for the application.
  • Implement the backend API using Go.
  • Build the frontend interface using Vue 3.
  • Connect the frontend to the backend API.
Write a blog post
Write a blog post about a specific topic covered in the course to solidify learning and share knowledge with others.
Show steps
  • Choose a topic related to Vue 3 or Go.
  • Research the topic and gather information.
  • Write a clear and concise blog post.
  • Publish the blog post on a personal blog or platform.
Contribute to a Vue or Go project
Contribute to an open-source Vue or Go project to gain practical experience and learn from other developers.
Show steps
  • Find an open-source project on GitHub.
  • Identify an issue or feature to work on.
  • Submit a pull request with your changes.
  • Respond to feedback and revise your code.

Career center

Learners who complete Working with Vue 3 and Go (Golang) will develop knowledge and skills that may be useful to these careers:
Full-Stack Developer
A Full Stack Developer works on both the frontend and backend of applications. They need a broad skill set, which includes frameworks like Vue.js for the front end and a language like Go for the backend. This course directly aligns with these skills, teaching you how to use Vue.js 3 for the user interface and Go for the API development. This will allow you to build complete web applications from end to end. If you want to be a full stack developer, this course enables the development of complete applications integrating both interfaces that users interact with and supporting server-side operations.
Web Application Developer
A Web Application Developer creates interactive, feature-rich applications that run in a web browser. This role requires expertise in both frontend and backend technologies. This course directly addresses this need by teaching Vue.js 3 and Go for creating interactive frontends and robust backend APIs with database connections. The course also covers user authentication, which is indispensable for a web application developer. Learning both Vue and Go in one course is very beneficial to a prospective web application developer who needs to master and integrate the tech stack for their development projects.
UI Developer
A User Interface Developer focuses on building the visual components of a software application that users interact with. This course is directly applicable to the role since it covers Vue.js, a popular JavaScript framework for UI development. The course helps a UI developer learn how to build interactive and responsive interfaces with reusable components. Learning how to manage state, handle events, and use conditional rendering with Vue, as taught in this course, will be helpful for a prospective UI developer.
Frontend Developer
A Frontend Developer designs and implements the user interface of websites and applications. This role heavily involves working with frameworks like Vue.js to build interactive and responsive user interfaces. This course, with its focus on Vue.js 3 using both Options and Composition APIs, helps build a foundation in developing complex front-end applications. The course also covers important topics for a frontend developer such as working with reusable Vue components, data stores, form validation, and routing. As a frontend developer, one should take this course to gain practical experience with Vue.js for building modern web interfaces.
API Developer
An API Developer specializes in designing and building Application Program Interfaces that enable communication between different software systems. Go is well-suited for API development, due to its capacity to handle JSON and database connections. This course guides one through implementing a REST API using Go, including routing, JSON handling, database interactions with Postgresql, and user authentication which are key tasks for an api developer. This course helps a prospective API developer gain the necessary skills and knowledge for building and maintaining robust APIs.
Golang Developer
A Golang Developer is skilled in writing software using the Go programming language. As this course focuses on using Go to build RESTful APIs and handle backend logic, it is highly relevant for a Golang developer. The course will help a golang developer learn database interactions with Postgresql, JSON handling, and secure user authentication using Go. If you wish to become more proficient as a Golang developer, this course can help. The course will enable the development of practical skills in server-side programming with Go.
Backend Developer
A Backend Developer is responsible for the server-side logic and databases of applications. This role often involves building APIs that handle data requests from the frontend. A course that teaches Go, commonly called Golang, proves beneficial to a backend developer as it covers how to create REST APIs, handle routing, work with databases like Postgresql, and manage user authentication. These are critical skills for a backend developer. If you wish to become a backend developer, this course provides a comprehensive approach, covering essential backend technologies and practices.
Web Services Developer
A Web Services Developer creates and maintains web services that enable communication between systems, often using APIs. This course helps a web services developer as it includes building REST APIs using Go, a language often used to build web services. The course also explains JSON handling, routing, and database integration, all of which are critical for a web services developer. If you wish to become proficient in building web services, this course helps one to understand, develop, and deploy those services.
JavaScript Developer
A JavaScript Developer is an expert in writing JavaScript code. This role often involves using JavaScript frameworks like Vue.js to develop interactive and dynamic user interfaces. This course will allow a javascript developer to work with both Options and Composition APIs, understand how to work with form validation, and handle events within a user interface. This course provides a great introduction to one of the most popular frontend frameworks for a javascript developer who wants to expand their skillset.
User Authentication Specialist
A User Authentication Specialist focuses on implementing secure user authentication systems. This course offers a comprehensive module on implementing user authentication using Go, which involves creating, validating, and using stateful tokens. This course will allow a user authentication specialist to learn how to create a secure authentication system using Go while also understanding how the frontend will interact with the backend in a secure way. A user authentication specialist who would like to learn secure user authentication best practices will benefit from this course.
Software Engineer
A Software Engineer is a broad role encompassing the design, development, and maintenance of software systems. This course may be useful for a software engineer as it covers key areas such as building user interfaces with Vue.js and creating REST APIs using Go. The course teaches the creation of interactive web applications, database integration, and user authentication, all of which are in the domain of software engineering. A software engineer who understands both frontend and backend technologies will benefit from this course.
Application Security Analyst
An Application Security Analyst focuses on ensuring software applications are secure and protected against vulnerabilities. This course may be useful for a security analyst. The course includes a module on secure user authentication which involves working with tokens, a key security methodology. The course also introduces best practices for creating secure and scalable web applications. An application security analyst can use the course to better understand the technologies involved in building applications, including security considerations.
Database Developer
A Database Developer works with databases, writing queries, creating schemas, and optimizing database performance. This course may be useful for a database developer, as it includes working with Postgresql databases in the back end of the web application. A database developer will learn how to connect Go to Postgresql, create and manipulate tables, and perform data operations, all of which are activities done by database developers. This course may help a database developer gain practical experience in database interaction.
Technical Lead
A Technical Lead is responsible for guiding and overseeing development teams and projects. This course may benefit a technical lead by providing a deep understanding of the tech stack used by many web application development teams. The course covers technologies such as Vue.js for the front end and Go for the backend. The technical lead will learn best practices for web application development and will gain an understanding of the technical details of such a development process. This course will help a technical lead to better guide their team by understanding the technology being used. A technical lead can also utilize the user authorization information to help keep their team's web app secure.
Solutions Architect
A Solutions Architect designs and oversees the implementation of technical solutions for business problems. This course may be useful to a solutions architect who needs to become familiar with web application technologies. The course provides an overview of building complete web applications, from the user interface to backend API. A solutions architect can leverage this knowledge to understand how systems communicate with each other and how data flows through an application. The course may help a solutions architect to make informed decisions and understand the technologies involved in modern web applications.

Reading list

We haven't picked any books for this reading list yet.
The authoritative reference on the Go programming language, written by the language's creators. It provides a comprehensive overview of the language, its features, and its best practices.
A hands-on guide to Go programming that covers the language's core concepts, its standard library, and its concurrency features. It is written by experienced Go developers and includes many practical examples.
A guide to building web applications with Go. It covers topics such as HTTP, routing, and middleware. It is written by an experienced Go developer and includes many practical examples.
A deep dive into the concurrency features of Go. It covers topics such as goroutines, channels, and synchronization. It is written by an experienced Go developer and includes many practical examples.
A collection of blog posts by the Go team and other Go developers. It covers a wide range of topics, from language announcements to best practices.
A collection of code examples that demonstrate how to use the Go programming language. It is maintained by the Go team and provides a quick way to get started with Go.
A book that teaches Go programming through the use of tests. It provides a practical approach to learning the language and its best practices.
A book that covers advanced topics in Go programming, such as concurrency, performance optimization, and testing. It is suitable for experienced Go developers who want to learn more about the language.
A book that covers real-world use cases and best practices for Go programming. It is written by an experienced Go developer and provides insights into the language's design and use.
Provides a comprehensive overview of RESTful web services, covering everything from the basics to advanced topics such as security and performance tuning. It valuable resource for developers who want to learn how to build and consume RESTful web services.
Provides a theoretical and practical overview of RESTful web services. It covers topics such as the REST architectural style, the HTTP protocol, and RESTful resource design.
Provides a practical guide to building RESTful web services with Python and Flask. It covers topics such as creating RESTful resources, handling HTTP requests, and securing RESTful web services.
Provides a practical guide to designing and implementing RESTful web services. It covers topics such as choosing the right HTTP methods, designing RESTful URIs, and handling errors.
Provides a set of best practices for designing RESTful APIs. It covers topics such as choosing the right HTTP methods, designing RESTful URIs, and handling errors.
Provides a practical guide to building REST APIs with Node.js. It covers topics such as creating RESTful resources, handling HTTP requests, and securing RESTful web services.
Provides a practical guide to building RESTful web services with C#. It covers topics such as creating RESTful resources, handling HTTP requests, and securing RESTful web services.
Provides a comprehensive overview of JSON, covering its syntax, data structures, and usage in web development.
Focuses on the practical applications of JSON, providing examples and case studies of its use in various industries.
Delves into the advanced features of JSON, including its use in complex data structures and web services.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser