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.
- [Narrator] Hi, and welcome back.…In the previous video we used the Classify API…to allow the user to search for books in our library app.…Now that we can display search results to the user,…we need to let the user add books to his or her collection.…To get started, we'll update our database schema…manually to allow for storing books.…Next, we'll make the search results clickable…so we can send selections to our server for processing.…Finally, we'll save the selected result to the database.…Let's start by updating our database schema.…
We'll open up the SQLite 3 console…with our database from the terminal…using the SQLite 3 command.…If you run the .schema command,…you can see that the database has no schema defined.…Let's create a table called books…using the command create table books.…Within the parenthesis, we'll define our columns.…For this table, we'll want an integer column…called pk to use as the primary key,…and we'll set it to auto increment.…We'll also want text columns for the title,…author, id, and classification fields.…
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