|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/building-web-applications-with-go-intermediate-level/
课程评论:没有评论
课程名称:使用Go构建Web应用程序 - 中级水平 课程概述: 本课程是《使用Go构建现代Web应用程序》的续篇,深入探讨Web应用程序的构建。学员将会创建一个示例电子商务应用程序,该应用程序包含多个独立的部分:前端(为最终用户提供网页内容)、后端API(根据需要被前端调用)以及一个专门执行单一高效任务的微服务,该服务负责动态生成PDF发票并将其作为电子邮件附件发送给客户。 该应用程序将售卖单个商品,并允许用户购买月度订阅。所有信用卡交易将通过Stripe处理,这是一种广受欢迎的支付处理系统,开发者们非常青睐于它的丰富API。Stripe服务超过35个国家,支持135种货币,广泛应用于数百万企业在线管理支付和业务。 在课程初期,我们将构建一个简单的虚拟终端,处理“卡片不在场”交易,此应用将从零开始构建,使用Go(Golang)编写。前端将使用Go的html/template包进行渲染,经过身份验证的用户可以通过安全表单处理信用卡支付,并集成Stripe API。在这一部分的课程中,将涵盖以下内容: - 如何在Go中构建安全、生产就绪的Web应用程序 - 如何捕捉安全在线信用卡交易所需的信息 - 如何从Go后端调用Stripe API创建paymentIntent(Stripe的授权和交易对象) 接下来的部分我们将建立第二个Web应用程序,用户可以购买产品或月度订阅。这也将是一个从头开始使用Go构建的Web应用程序。在这一部分,课程将涵盖: - 如何允许用户购买单个产品 - 如何允许用户购买定期月度订阅(Stripe Plan) - 如何处理取消和退款 - 如何将所有交易信息保存到数据库(用于退款、报告等) - 如何退款交易 - 如何取消订阅 - 如何通过会话认证限制前端的访问 - 如何使用有状态令牌保护后端API - 如何管理用户(添加/编辑/删除) - 如何安全地允许用户重置密码 - 如何即时注销用户并通过WebSocket取消账户 完成这些后,我们将开始构建微服务。微服务是一种软件开发方法,基本思路是构建非常小的应用程序,只执行一项功能却做到极致。微服务不关心哪个应用程序调用它,因此是完全独立的。 我们将构建一个微服务,功能包括: - 接收描述单个购买的JSON负载 - 根据JSON负载产生PDF发票 - 创建发送给客户的电子邮件,并将PDF作为附件 - 发送电子邮件 所有这些组件(前端、后端和微服务)将使用单一代码库构建,并生成多个二进制文件,使用Gnu Make进行管理。
This course is the followup to Building Modern Web Applications in Go. In this course, we go further than we did the first time around. We will build a sample E-Commerce application that consists of multiple, separate applications: a front end (which services content to the end user as web pages); a back end API (which is called by the front end as necessary), and a microservice that performs only one task, but performs it extremely well (dynamically building PDF invoices and sending them to customers as an email attachment).The application will sell individual items, as well as allow users to purchase a monthly subscription. All credit card transactions will be processed through Stripe, which is arguably one of the most popular payment processing systems available today, and for good reason: developers love it. Stripe offers a rich API (application programming interface), and it is available in more than 35 countries around the world, and works with more than 135 currencies. Literally millions of organizations and businesses use Stripe's software and APIs to accept payments, send payouts, and manage their businesses online with the Stripe dashboard. However, in many cases, developers want to be able to build a more customized solution, and not require end users to log in to both a web application and the Stripe dashboard. That is precisely the kind of thing that we will be covering in this course.We will start with a simple Virtual Terminal, which can be used to process so-called "card not present" transactions. This will be a fully functional web application, built from the ground up on Go (sometimes referred to as Golang). The front end will be rendered using Go's rich html/template package, and authenticated users will be able to process credit card payments from a secure form, integrated with the Stripe API. In this section of the course, we will cover the following:How to build a secure, production ready web application in GoHow to capture the necessary information for a secure online credit card transactionHow to call the Stripe API from a Go back end to create a paymentIntent (Stripe's object for authorizing and making a transaction)Once we have that out of the way, we'll build a second web application in the next section of the course, consisting of a simple web site that allows users to purchase a product, or purchase a monthly subscription. Again, this will be a web application built from the ground up in Go. In this section of the course, we'll cover the following:How to allow users to purchase a single productHow to allow users to purchase a recurring monthly subscription (a Stripe Plan)How to handle cancellations and refundsHow to save all transaction information to a database (for refunds, reporting, etc).How to refund a transactionHow to cancel a subscriptionHow to secure access to the front end (via session authentication)How to secure access to the back end API (using stateful tokens)How to manage users (add/edit/delete)How to allow users to reset their passwords safely and securelyHow to log a user out and cancel their account instantly, over websocketsOnce this is complete, we'll start work on the microservice. A microservice is a particular approach to software development that has the basic premise of building very small applications that do one thing, but do it very well. A microservice does not care in the slightest about what application calls it; it is completely separate, and completely agnostic. We'll build a microserivce that does the following:Accepts a JSON payload describing an individual purchaseProduces a PDF invoice with information from the JSON payloadCreates an email to the customer, and attaches the PDF to itSends the emailAll of these components (front end, back end, and microservice) will be built using a single code base that produces multiple binaries, using Gnu Make.