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.
- [Narrator] Hi, and welcome.…In her last video, we added the ability to…sort our book collection display and…save the user's preferred sort to the browser's session.…Sorting was a big step towards a fully functional…library app, but sometimes book collectors…only want to see part of a collection.…In this video, we will add the ability to…filter a book collection by fiction or nonfiction.…We'll start by adding a drop down to the view books page…to filter by fiction or nonfiction.…Then, we will update our calls to the database…to filter by certain classification values.…
Finally, we will save the users preferred filter setting…to the session, to prefilter the…current collection on page load.…Let's get started.…We need to build an interface to allow the user…to filter books based on whether…the title is fiction or nonfiction.…The simple solution is to add a drop-down menu…with three items, all books, fiction, and nonfiction.…We'll start by opening the index dot ace template,…and find the view results table.…Above the table, let's create a new form…
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