A user may want to remove old books from a collection. We'll add a feature to our application and delete unwanted selections.
- [Instructor] Hi, and welcome back.…In the previous video, we fetched all the books…from the database and displayed them to the user.…Now we want to add more options to maintain our library.…In this video, we'll add a Removal function…to our book display.…To get started, we add a column to the display table…for deleting unwanted books.…Next we'll create a route to look up…and delete the selected book from the database.…Finally, we'll update the user interface…if the book was successfully removed.…The four-based database operations are…create, read, update, and delete,…known collectively as CRUD.…
So far, we've created rows of books…and read them to display to the user.…Now we need to implement delete.…In our index.h template file, let's add a new column…to the View Results table.…Although we'll define a th node,…we don't need to give it a name.…We'll add a new td tag with a button inside of it…when we iterate over the results.…The button should have a value of Delete.…We'll set the on-click property to a new function…
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