No video

Go Design Patterns - Factory and Abstract Factory Pattern - Part Three

  Рет қаралды 14,171

Tensor Programming

Tensor Programming

Күн бұрын

#tensorprogramming #golang #designpatterns
In this tutorial, we take a look at the Factory and Abstract Factory creational design patterns. We look at how we can make Factory constructors to dynamically create objects and encapsulate the creation logic from a client. We also use the Abstract Factory to create a Factory for Factories.
Source Code: github.com/ten...
Good Programming Laptops:
Lenovo ThinkPad E570: amzn.to/2TFEiVG
Dell XPS15: amzn.to/2RxyavP
Feel free to support the channel:
Patreon: / tensor_programming
Check out our Twitter: / tensorprogram
Check out our Facebook: / tensor-programming-119...

Пікірлер: 29
@yotubecreators47
@yotubecreators47 10 ай бұрын
this example of perfect youtube video for devs , real make sense example, simple to the point , no rubber duck flying around thank you very much!
@TensorProgramming
@TensorProgramming 10 ай бұрын
thanks mate. glad you liked the series.
@richard8572
@richard8572 5 жыл бұрын
Your series on go design patterns is top notch. Thank you.
@TensorProgramming
@TensorProgramming 5 жыл бұрын
Thank you, glad you like the content.
@draakisback
@draakisback 5 жыл бұрын
Great tutorial as always.
@beratsulimani9823
@beratsulimani9823 5 жыл бұрын
Thank you Tensor for your effort, 😊
@TensorProgramming
@TensorProgramming 5 жыл бұрын
Glad you like the content.
@ukraineSpaceman
@ukraineSpaceman 4 жыл бұрын
We are waiting for new videos on the patterns. Tensor, you're cool.
@cerhewer67
@cerhewer67 5 жыл бұрын
Tensor Programming LOVE YOUR CHANNEL. You are one of the best programmers i've come across on youtube. Can I make a request? Add ABI support for the golang blockchain tutorial for implementation of smart contracts?
@TensorProgramming
@TensorProgramming 5 жыл бұрын
That would be a fairly complex project. Not sure if I will ever get around to doing something like that.
@cerhewer67
@cerhewer67 5 жыл бұрын
@@TensorProgramming Damn! That's alright good work!
@startengine8838
@startengine8838 Жыл бұрын
Nice content. direct and understandble. keep up the good work maybe a update after 3 years?? . just review and renew the date because everything still applies
@TensorProgramming
@TensorProgramming Жыл бұрын
The content here is all still relevant, so I won't be covering the factory/abstract factory again, though I do have a video in the works for this series.
@MSKM.Mehrdad
@MSKM.Mehrdad 5 жыл бұрын
Hi Tensor, I watched your Kotlin and Rust Tutorials and really both of them were great and I learn so many things. and I have some plan to start your dart and flutter tutorials. but how it possible how you know all of this ?! is it good too know about all of this programming language or must focus one of them ?! I love rust and go but work as an android developer with Kotlin and java. and want to learn web development with golang and rust . (i want rust for all purposes) but is it really good decision ?! learn java Kotlin, android, dart, flutter, rust and go ?! or what about python and js ?! I'm your student and need your help to improve my programming and be a better programmer. please help me to found the correct way. I really waste too time for this "be good in which programming language " . and I love in my hurt be rust programmer but I can't found a job for rust :( I'm really confused. now I'm an android developer and have good. I want to be a back-end developer too side of android or better say mobile development. I want to be a programmer at a high level of the world but I don't know which way help me.
@TensorProgramming
@TensorProgramming 5 жыл бұрын
I learned most of these languages through my Job. I work as a consultant as well as an engineer. My main job is to help companies find the technology stack that suites their use-case and then help them learn and implement it. There is no real harm in learning as many programming languages as you can. You will often find that languages share many features and abstractions in common and it becomes rather easy to transition from one to another if you understand the underlying concepts. All functional programming languages share similar features just as all imperative languages are very similar to one another etc. To me, a programming language is nothing more than a tool to use in a specific situation. That being said, yes there are concerns about finding jobs that suite the language that you want to work in. Many companies refuse to move away from the old standby languages like Java, JavaScript, Python, Ruby and C# etc. Learning a more mainstream language will make it easier for you to find a job as a result of this. On the other hand, there are companies that do need Rust, Go and Dart programmers. And because less people know these languages, its easier to get your foot in the door if you already do have experience with it. The decision is really yours. Do you like learning programming languages and do you feel that learning these different paradigms makes you a better programmer? Do you want to get a job as soon as possible or can you afford to wait a little while to find something a bit more suitable? Since tech companies tend to have a high turnover, its not a bad thing to learn a mainstream language to find a job and then transition into learning something else to try to find another more appealing job later. You should always evolve your skillset anyhow as its the stubborn programmers who tend to age out of the job because they refuse to learn something new when the time comes.
@MSKM.Mehrdad
@MSKM.Mehrdad 5 жыл бұрын
​@@TensorProgramming Thank you Dear Tensor for this complete answer. I love programming and help to another person to learn. I make some tutorial in the Persian language for people that love to learn to programming too and it's really fun for me and make me happy learn programming and help other people to learn it. before this when I want to start a new Programming languages and get really bad filling about why you want to learn it, just focus on your job ( android, java, and Kotlin for the financial expenses of my personal life) but know a side of focus on Android development I work on new programming language and learn new technology. I think now I know what is really good for me and I want to be like you because I know you are as my teacher and I learn so many things from you. thank you
@StrangerSaret
@StrangerSaret 4 жыл бұрын
Thank you for your videos - they are super useful. I have a question regarding your Abstract Factory implementation. I am not a design pattern guru, but afaik Abstract Factory should provide an interface for creating a set of related products and those products should share the same interface but with different implementation. In your example your concrete factories create products with different interfaces (actually different products). Is this a specificity of Golang implementation or my understanding of Abstract Factory is completely wrong?
@TensorProgramming
@TensorProgramming 4 жыл бұрын
You could do it that way but you don't necessarily have to. The important part to understand is that the abstract factory is just a factory of factories. If your concrete factories already have interfaces to allow you to create the products, then there is no real reason to add an extra interface to skip that step unless you simply want to abstract that step away. In which case, you would likely not have concrete implementations on the concrete factories and they would instead be on the abstract factories.
@mowazzemhosen366
@mowazzemhosen366 5 жыл бұрын
I love you. . .You are awesome. . .
@jamesespichanvilca7237
@jamesespichanvilca7237 Жыл бұрын
How I can understand return db(env).(factory.Database), fs(env).(factory.FileSystem) ? :)
@shmeleff_ural
@shmeleff_ural Жыл бұрын
db(env) returns a Factory interface and then this Factory interface casted to Database interface
@dianaandreacarballosarabia7523
@dianaandreacarballosarabia7523 3 жыл бұрын
Excuse me, where can I found part 1 and 2? thanks.
@TensorProgramming
@TensorProgramming 3 жыл бұрын
You can find them under the go playlist: kzbin.info/www/bejne/fGSZZp-Paqp2fbs
@PanosGeorgiadis
@PanosGeorgiadis 4 жыл бұрын
Request: Dependency Injection Design Pattern
@TensorProgramming
@TensorProgramming 4 жыл бұрын
sure, I can do that. I use a lot of DI in the hexagonal architecture videos.
@PanosGeorgiadis
@PanosGeorgiadis 4 жыл бұрын
@@TensorProgramming hexagonical? do you have a link? I am going through the Design Patterns book, but's it's written with example in Java, so your videos are **really** helpful.
@TensorProgramming
@TensorProgramming 4 жыл бұрын
@@PanosGeorgiadis Its a three video series: kzbin.info/www/bejne/qILRhaeHj6yjnZo Go does DI via its interfaces; when you create an interface you can use it in the place of a concrete type. So if 3-4 types implement an interface, those 3-4 types can be used as a dependency for the function or struct or whatever. In the case of Hexagonal architecture, we do this for the transport layer, the database layer, the serialization layers etc. The whole idea is to be able to swap pieces of the microservices in and out quickly.
@colbyberger1881
@colbyberger1881 Жыл бұрын
Crazy how they never teach this at university
@TensorProgramming
@TensorProgramming Жыл бұрын
well this is more practical. College is usually about the theoretical.
Building Hexagonal Microservices with Go - Part One
12:58
Tensor Programming
Рет қаралды 63 М.
Building Hexagonal Microservices with Go - Part Three
15:44
Tensor Programming
Рет қаралды 17 М.
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Factory Method Pattern Visualized
23:54
Kantan Coding
Рет қаралды 9 М.
8 Design Patterns | Prime Reacts
22:10
ThePrimeTime
Рет қаралды 405 М.
[Golang] Adapter
18:25
Panpito
Рет қаралды 2,2 М.
Builder Design Pattern Explained in 10 Minutes
10:45
Kantan Coding
Рет қаралды 27 М.
Builder Pattern -- Design Patterns in Go
14:29
Sam x Smith
Рет қаралды 6 М.
Abstract Factory Pattern Explained For Beginners
24:26
Kantan Coding
Рет қаралды 3 М.
Rust Testing and TDD - An Intro to Testing and Test Driven Development
25:46
The Power Of Golang's Decorator Pattern
14:09
Anthony GG
Рет қаралды 45 М.