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.
- [Teacher] Hi and welcome back.…In the previous video,…we took the first steps towards…building a miniature library application…by creating a basic web server.…If you want to build a library app,…we're going to need an easy way…to get data in and out of the system.…In this video, we'll learn how to use…a templating engine to build a data-driven user interface.…Initially, we'll modify our original route…to render a template.…We'll send the server query parameters…and learn how to access those parameters from Go.…Then, we'll use the data from the query parameter…to dynamically change our website's content.…
Let's quickly get reintroduced to our current web server.…Inside our main function, we created a route handler…for the route of our web server,…which responds to the requests with a short greeting.…We also started our web server…listening on Port 8080.…You can see the result when you visit the page…at localhost:8080 in your browser.…Static text generated in code is great for a start,…but let's change the way we think…
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