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.
- [Voiceover] Hi and welcome back.…In the previous video,…we integrated the database wrapper package gorp…into our application for cleaner database access.…In this video, we'll add the functionality to sort…our collection of books to our web application.…To get started, we'll add a simple sorting UI…to our interface.…Then, we'll modify our database query to include…the specified sort criteria.…Finally, we'll store the user's preferred sort criteria…to the browser session.…We need to add elements to our UI…to make our columns sortable.…
There are many ways to go about this, but the most common…method is to click or tap the table headers…to initiate a sort.…Let's open our index template…and make the table headers clickable.…We can start by adding a new CSS rule…alongside the hover rules for table rows.…We'll apply this rule to any TH node…under the table with ID view-page on hover.…Now we'll see the pointing hand…and a darkened background color…when the user hovers over any of our headers.…When a user clicks our column header,…
Go is on the rise. This open-source programming language (created by Google!) comes with a strong and accessible standard library, and provides a growing ecosystem of tools, libraries, and frameworks that can help you build web applications fast. Go for Web Development gets you started with the language, opening with the classic "Hello world" exercise and culminating in a web application with a strongly designed database back end, useful middleware, UI with an intelligent search function, multi-user authentication, and more.
First, learn how to build a web server with Go's extensive standard library. Explore the concepts behind a single-page web application and learn how to create a dynamic user interface, manipulate a database, and use powerful encryption algorithms to implement an authentication system. Next, you'll incorporate more functionality by calling out to external libraries from the database. Finally, it all comes together into an optimized package you can deploy into the wild with Heroku.
- Creating a route in Go
- Using templates
- Building database connections
- Collecting data
- Using web middleware
- Using the Ace template engine
- Integrating HTTP routers like gorilla/mux
- Authenticating users
- Optimizing a Go codebase