Take this

Software Development / Web Development

Go for Web Development

Find out how Go makes web development fast and enjoyable by developing a full stack web project


Go is on the rise and showing itself as a powerful option in many software development domains. For web developers seriously considering adopting the language on the server side, Go comes with a very strong and accessible standard library. It makes setting up the architecture for web applications a comfortable experience, and provides a growing ecosystem of tools, libraries, and frameworks that can help you build web applications for delivery on the web.

Go for Web Development gets you started with web development in the language, opening with the classic "Hello world" through building an application with a strongly designed database backend, useful middleware, UI with an intelligent search function, multi-user authentication, and more.

We'll start off by building a web server with Go’s extensive standard library. You’ll learn the concepts of a single page web application and create a dynamic user interface using templates, manipulate a database, and use powerful encryption algorithms to implement an authentication system. We'll also start to incorporate more functionalities by calling out to external libraries from our database. When we've put everything together, we'll show you how package it all up and deploy it into the wild using Heroku.

Full details


  • Hello, Go Web Development
    The Course Overview
    This video will offer an overview of the course.
    Our First Route
    We'll get started by building a Go web application, which can be overwhelming. Let's focus on using a standard library to create our first route. We'll have a working web application by the end of this video. • Write a main method • Create your first route • Run the web server
    Using Templates
    We want to display a rich, data-driven interface to the users of a web application. We'll write some markup files and use the built-in templating engine to generate HTML to display dynamic data to the user. • Modify your first route to render a template • Access query parameters given to the route • Dynamically display the given query parameter from your template
    Database Connections
    We want to store data and access it from our server in the future. We'll connect to a sqlite database and show the connection status in our template. • Set up the development database • Create an sqlite connection on the server • Show the database status in your template
  • Collecting Books
    Talking to the Server
    The UI will be incomplete until the server delivers meaningful data. We'll put together a very basic search UI and fetch fake data from the server to present to the user. • Create a search UI • Return data from the server • Dynamically present results to the user
    Surfing the Net
    We need to collect data from an external source to have any value in this app. We'll query the classify2 API to fetch real reference information based on the user's search criteria. • Query the classify2 API • Decode the response data • Encode objects to JSON for app consumption
    Using the Database
    Users need to choose books to add to their collection. We'll save book selections from the server in our sqlite database for future use. • Add a books table to the database • Send book selection to the server • Save the selection
    Introduction to Web Middleware
    We don't want to duplicate the code to create the sqlite connection in every route. We'll use web middleware to inject the connection. • Install a web middleware library • Replace the default server with negroni • Create custom middleware for sqlite management
  • Become the Librarian
    Replacing the Default Template Engine
    Raw HTML is very verbose and, at times, repetitive. We will utilize a third-party template engine, called Ace, which will let us write cleaner, more succinct markup. • Choose a new template engine • Use the new renderer • Update the template file
    Showing Off Our Books
    We need to display the user's book collection from previous selections. We'll pull all the books from the database and display them in the UI. • Update page objects • Modify the template to display books • Retrieve books from the database
    Throwing Away Old Literature
    A user may want to remove old books from a collection. We'll add a feature to our application and delete unwanted selections. • Add the removal option • Delete the selected book in the database • Update the user interface
    Using gorilla/mux
    We need our web application to be fast and easy to modify. We'll integrate one of the most popular and most powerful HTTP routers in golang to make our server more robust. • Install a third-party HTTP router • Replace the default router with gorilla/mux • Update individual routes
  • A Place for Everything
    Using go-gorp
    Manually building Go objects from SQL results can be difficult to write and dangerous to modify. We'll use go-gorp to clean up our database calls. • Get go-gorp • Setup a database map • Update database queries to utilize mapping
    Sorting Our Books
    Users need to sort books based on standard classification numbers in order to build a library. We'll add functionality for the user to sort books and store sort preferences. • Add and sort UI • Update the database query to sort data • Remember the user's preferred sort
    Fiction and Nonfiction
    Users may only want to see fiction and nonfiction collections displayed separately. We'll add the filtering functionality so that the user can see a single category of books. • Add the filter UI • Update the database query to filter data • Remember the user's preferred filter
  • Different Folks, Different Libraries
    Authenticated Users Only
    A library should support multiple users using the system. We need a method to identify each user. We'll build a basic login UI to allow authentication with the library application. • Design a login template • Build a login route handler • Redirect authenticated users
    Creating Users Securely
    We do not want to store user passwords as plain text in our database. We'll use an encryption library to build secure password hashes for users. • Get bcrypt • Create a users table • Store users in the database
    I Know Who You Are
    As users perform actions within the application, we need to verify the user's identity. We'll store the user's identity in the browser session and use the session to validate requests. • Set a user in the session • Validate session data in middleware • Create an identification UI
    Update the Database
    Each user should have an independent collection of books. We'll associate books with a user and filter books being pulled from the database to match the corresponding user. • Add a foreign key to the books table • Update database mapping • Only fetch the correct books from the database
  • Wrapping Up
    The Road Not Taken
    Building a web application with standard library components can take a long time and result in redundant code. We could explore a number of potential frameworks to make writing web applications easier. • Goji • Martini • Revel
    Managing Code Quality
    As codebase grows, readability degrades and bugs are introduced. We'll learn how to use standard Go tools to improve our codebase. • Automatically format code • Find issues with lint • Write unit tests
    Hello, World Wide Web
    The ultimate goal of most web applications is to be accessible from any computer through the Internet. We'll push our application to a free cloud platform, Heroku, to expose it to the World Wide Web. • Update the library application • Create new Heroku app • Deploy the application


  • Cascading Style Sheets (CSS)
  • JavaScript

Similar Courses

More Courses by this Instructor