02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School

OOP Design Patterns

Learn what design patterns are? Singleton,MVC, Factory methods, Observer, Command and more... Lets explore why you want to know about it and why its even more impotent to understand the issue they are trying to solve. don't use a solution without understanding the problem that is the best tip I can give you this is the last part of our session and its short so if you like it please support it and we will make more videos on Design Patterns.

Video Transcript

00:00Oh, my throat hurts. All right, design patterns. The idea behind design patterns, which is very,
00:06very simple. The idea is a lot of issues in programming, especially in object oriented
00:11programming happen more than once. And throughout the ages, people came up with ideas, they gave
00:17them a coined name, I'm not going to go through the real history because it really doesn't matter.
00:23The idea is basically solutions to problems that have been standardized,
00:27ideas that work. It doesn't necessarily mean you have to work with every single design pattern.
00:31If you're completely new to object oriented programming, I would recommend not even looking
00:35at them. When you get really comfortable with the ins and outs of object oriented programming,
00:40then start playing with them with the MVC, with the Singleton, with the factory observer command,
00:46and so on and so forth. There's quite a lot of them. The whole idea behind them and don't try to
00:52repeat what they're doing without a reason. Always when you look at a specific
00:55design pattern, first ask what was the problem that they were trying to solve,
00:59because if you really understand the problem that they were trying to solve,
01:03even if you never use that specific singleton per se, when you're working on your own code,
01:08and you have a problem that is similar, you can have all these different ideas from
01:12all these geniuses throughout the ages that brought up all these ideas of how you can
01:16deal with specific things. Now, we're out of time. So I can't really I wanted to go into
01:22showing a sample of one single design pattern, but I guess I'll keep that for a future video.
01:28Because my throat is done and we're about 10 minutes after our hour. By the way,
01:34anyone has questions, please feel free. And thank you so much for joining me for this
01:41hour. Oh, by the way, David, I wanted to add something to that, because I really agree with
01:45you. One of the stuff that I noticed from my own work is I know that some people really,
01:49really get like anal about, oh, you have to do a design pattern in the exact same way that it's
01:54written in whatever book that they read. But what I found is just from reading about design patterns
02:00and understanding them, even if I never actually do them, I find out that later on when I'm actually
02:05building my code, I'm building it smarter. Because now I have these ideas in my head that
02:08I didn't think about. And now suddenly, I'm working on more singletons. And now suddenly,
02:12I'm doing these design factories without calling them factories. Because now I have these
02:16ideas of solutions I just never thought of, because I never really had issues that really
02:21involve them. And then suddenly, I have this these new ideas. And then even if I don't stand to,
02:27yeah, exactly. Some people like some people just before they even start coding,
02:30they have a list of design patterns that they feel like they have to do. And then and then
02:34their code looks really bad, because they don't really focus on use it when you need it kind of
02:39approach. Yes, I kind of I believe that just knowing about them takes you really far away,
02:46because a lot of times you're just gonna just for just by knowing about these issues
02:51that other developers had, and suddenly you find reasons to use these stuff
02:55intertwining your code, and not even thinking about the design pattern when you're doing it.
02:59And really your goal as you and by the way, and a book that I really strongly recommend is
03:03Headfirst Design Patterns, a really, really great book that takes all these like, kind of
03:08complicated topics of design patterns, and just just spells out in such a simple and easy and
03:14fun way to understand, then even if you never actually do some of the design patterns there,
03:20you now know what they are. And then when someone brings up that topic, it just is logical. And
03:26that's all I really have to say on that one. So I guess thank you, everyone. It doesn't look
03:31like there's more questions. Thanks, John, for inviting me. Oh, thank you for coming.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!