Course Overview
Go is a powerful language for building efficient and scalable applications. But as your projects grow, you'll encounter common problems that can be elegantly solved with design patterns.
This course will equip you with the knowledge and skills to leverage these design patterns effectively in your Go code. We'll explore various categories of patterns, including:
Creational Patterns: Learn techniques for object creation that promote flexibility and decoupling.
Structural Patterns: Discover ways to compose classes and objects to achieve desired functionality.
Behavioral Patterns: Explore patterns that define communication and interaction between objects.
By understanding these patterns, you'll gain the ability to:
Write cleaner, more maintainable, and reusable code.
Improve the design and architecture of your Go applications.
Solve common programming challenges with proven solutions.
Communicate design concepts more effectively with other developers.
We'll approach design patterns with a practical lens, focusing on real-world Go scenarios. In fact, we'll build a simple web application that allows us to see how, why, and when you can use a particular design pattern to make your code more efficient, maintainable, and easy to understand. My goal is ensure that you'll gain hands-on experience implementing these patterns so that you can use them in your own projects.
So, whether you're a seasoned Go developer or just getting started with the language, this course will provide you with valuable tools to take your Go development skills to the next level.
Please note that this course requires you to download Docker Desktop from Docker. If you are a Udemy Business user, please check with your employer before downloading software.
FAQ
FAQ area empty
Course curriculum
Chương 1 Introduction 7 bài · 15 phút
- Introduction Học thử 5:56
- A bit about me Học thử 1:01
- Installing Go Học thử 1:27
- Installing an Integrated Development Environment Học thử 3:14
- Installing Docker Học thử 0:50
-
Asking for Help 1:14
-
Mistakes. We all make them. 1:06
Chương 2 Setting up a Simple Web Application 13 bài · 1 giờ 38 phút
- What we'll build in this section Học thử 0:58
- How web applications work Học thử 2:11
-
Setting up our main application 9:52
-
Installing a routing package 2:30
-
Setting up routes 11:17
-
Setting up a simple HTML template 8:48
-
Creating a render function 16:36
-
Rendering our first page 4:32
-
Adding navigation 4:50
-
Creating templates for all site pages 5:24
-
Setting up a route & handler for site pages 5:48
-
Trying out our template cache 2:13
-
Adding WebP and jpeg images to the home page 22:46
Chương 3 Factory Patterns 13 bài · 1 giờ 14 phút
-
What we'll build in this section 1:02
-
The Factory Pattern 6:23
-
Setting up some types 13:38
-
Creating a simple Factory 2:50
-
Creating handlers for the simple Factory 3:56
-
Setting up the front end 9:24
-
Adding routes for our Factory handlers 2:36
-
Trying our Factory pattern out 1:23
-
The Abstract Factory pattern 13:44
-
Creating an Abstract Factory 8:35
-
Creating a route and handler for the Abstract Factory 3:03
-
Updating the front end 5:07
-
Trying out our Abstract Factory 2:09
Chương 4 Connecting to a Database 4 bài · 22 phút
-
What we'll build in this section 0:35
-
Adding a module to support MySQL/MariaDB 1:25
-
Setting up a local MariaDB instance with Docker 8:22
-
Connecting our application to MariaDB 11:42
Chương 5 The Repository Pattern 12 bài · 1 giờ 6 phút
-
What we'll build in this section 1:27
-
Writing our first database function 12:14
-
Creating a handler to list dog breeds 7:32
-
Updating the front end to fetch the list of dog breeds 2:51
-
Updating the front end to display the list of dog breeds 14:18
-
Writing a test for our handler 10:21
-
Implementing the Repository pattern I 3:49
-
Implementing the Repository pattern II 3:35
-
Implementing the Repository pattern III 1:18
-
Trying things out 1:29
-
Implementing a test database repository 3:32
-
Updating our handler test 4:02
Chương 6 The Singleton Pattern 3 bài · 12 phút
-
What we'll build in this section 0:51
-
Creating a simple Singleton 6:55
-
Updating our project to use our configuration package (singleton) 4:14
Chương 7 Builder Pattern & Fluent Interface 10 bài · 40 phút
-
What we'll build in this section 1:13
-
The Builder Pattern (& Fluent Interface) 6:24
-
Getting started with the Builder pattern in our project 5:18
-
Setting up our Builder code 8:30
-
Fixing three problems with our Builder code 2:00
-
Setting up a handler to use our Builder pattern 5:32
-
Setting up a route to our handler 1:01
-
Modifying the front end to call our Builder route 6:11
-
Challenge 1:13
-
Solution to challenge 2:21
Chương 8 Adapter Pattern 10 bài · 59 phút
-
What we'll cover in this section 1:28
-
The Adapter Pattern - Overview 22:42
-
Installing an application to serve JSON and XML 3:33
-
Setting up the Adapter type & the Adaptee 7:27
-
Adding the Adapter to our application config 2:33
-
Setting up a handler 2:34
-
Adding a route 2:24
-
Updating the Cat Breeds template 2:02
-
Switching adapters from JSON to XML 9:23
-
Adding a test for the Cat Breeds handler, using our adapter pattern 4:59
Chương 9 Bringing it all together 14 bài · 1 giờ 7 phút
-
What we'll cover in this section 1:13
-
Creating a stub AnimalFromAbstractFactory handler 2:54
-
Creating a New factory function for pet with embedded breed 4:52
-
Creating stub newPetWithBreed method for Cats and Dogs 8:06
-
Adding a GetDogBreedByName method in the database Repository 8:17
-
Refactoring adapters.go to new package 2:11
-
Adding a GetCatBreedByName method on our JSON adapter 4:04
-
Adding a GetCatBreedByName method on our XML adapter 3:14
-
Finishing up the new Adapter and Abstract Factory code 8:47
-
Finishing up the changes in our Abstract Factory to use the new adapters 2:57
-
Setting up a route to our stub handler 4:41
-
Finishing off the handler code 4:10
-
Updating the front end to try things out 7:03
-
Writing the necessary javascript to call our back end 4:21
Chương 10 The Decorator Pattern 6 bài · 27 phút
-
What we'll cover in this section 1:29
-
Setting up a route and a stub handler 2:03
-
Setting up the database table 1:39
-
Adding database methods for Dog of Month 6:23
-
Completing our DogOfMonth handler 7:52
-
Creating the Dog of Month template and trying things out 7:07
Chương 11 The Worker Pool Pattern 21 bài · 2 giờ 19 phút
-
What we'll cover in this section 2:55
-
Worker Pool Overview 8:07
-
Setting up a Go Workspace to develop our new module 2:30
-
Getting started with the App and Streamer projects 6:11
-
Creating a Factory function for our Worker Pool 7:55
-
Getting started on the worker pool functionality 3:05
-
Setting up the Processor type 3:10
-
Setting up the Pool functionality 12:16
-
Creating Videos to send to the worker pool 8:33
-
Sending videos to the worker pool 4:42
-
Filling in the encode() function's logic 13:09
-
Trying things out and tracing through program execution 12:56
-
Installing ffmpeg 2:19
-
Adding logic to encode to MP4 6:05
-
Trying out the EncodeToMP4 method 2:48
-
Adding logic to encode to HLS: Part One 5:29
-
Adding logic to encode to HLS: Part Two 16:43
-
Trying out our HLS encoder 3:21
-
Adding random filename generation to our videos 2:45
-
Trying out our worker pool with four videos 7:00
-
Adding streamer to our Breeders project 6:55
Requirment
-
Some familiarity with the Go programming language is required
Outcomes
-
How to use common design patterns in Go
-
Streamline the software development process by using well known patterns
-
Learn how to create loosely coupled software components
-
Build a real-world application using design patterns
0 Student
12 Courses
0 review