The Observer Design Pattern - Classes Creation - Design Pattern Tutorial смотреть онлайн
The Observer Design Pattern - Classes Creation is a free tutorial by Paulo Dichone | Android, Java, Flutter Developer and Teacher from Design Pattern course
Link to this course(Special Discount):
https://www.udemy.com/course/java-design-patterns-the-complete-masterclass/?ranMID=39197&ranEAID=Gw%2FETjJoU9M&ranSiteID=Gw_ETjJoU9M-8dRhnGezNXPwP_a6ECTdJw&LSNPUBID=Gw%2FETjJoU9M&utm_source=aff-campaign&utm_medium=udemyads
This is the best Design Pattern Course
Course summary:
Master Java Design Patterns
Apply Design Patterns to Real-World Projects
Build Software that's Robust and Flexible Using Java Design Patterns
Solve common Software architecture problems with Java Design Patterns
English [Auto]
All right let's go ahead and take a look at this diagram UML diagram here that I put together that shows this overall view of the observer pattern and design pattern. So as we discussed earlier the observer design pattern has the subject or the provider and has the observer so all of the classes that are there will be notified when things change. The first thing we do obviously is we create the subject interface. Now the subject interface is the provider will have a way for registering objects observer objects and registering them notifying and updating them. And at the bottom here what do we did we created an email topic in this case here what I'm doing is I am emulating an email subscriber situation where there is an email provider you subscribe to this email list and each email list could have different topics. Right. So I created here a topic email topic that way we can actually Similac. That way we can actually point to two different topics if we wish to do so. So lets say we could even have topics on Star Wars or Star Trek or Harry Potter or programming or whatever just whatever whatever else we may need. They don't ask this email topic class. You have a class inherits directly. Our subject interface because he wants to be. It needs to be able to know which observer is being connected and what to do with all that information. But he also noticed at the bottom will have the post message because it will know how to post a message from this topic so that all or everybody else can actually receive everybody else. In this case who is subscribed to our email topic at and we have our observer interface at the top left which has all the update and the said subject. But he also noticed this very important common theme throughout our studies here. All of these patterns all these Design Patterns rely heavily on object oriented programming topics such as polymorphism and compositions and so forth. And of course inheritance being the main one. So with that said he noticed there is a lot of composition happening so were passing we are referencing objects inside of other objects. In this case here in our observer notice we are setting the subject we're passing the actual subject subject class or interface in our set subject that way we have that POINAR waited for us to use. And at the bottom we have the email topic subscribers so this is one of the subscribers which will then make sure that we we update it because it's also directly inheriting from our observer it will inherit from our interface observer which means we will take the update method subject said subject. And of course we will also add our own e-mail subscriber constructor to construct an email topic subscriber. This is why we are going to be putting together so we can actually see how it all works. OK let's get to it. I've already created a empty and empty project so go ahead and do that if you wish to do so. And I'm going to go ahead inside Resorcin when I created another package here. I'm just going to call this interface is probably better and call than say model such is probably less refactored is just call this interface things like that. All right. So what are you going to do here. The first thing I'm going to create is this subject. So I'm going to go ahead and put together our subject interface here. This is our provider right. This is the satellite. If we go back to what I've shown you in the previous video example in the previous video game create that so this will be responsible for registering and registering notifying. And of course get updates could do that. So right click on interfaces and say new Java class and want to call this object. This is going to be of course interface and it's going to be to have a few methods. The first method is going to be IBM's a public voice to register and get a pass observer right. We haven't created it yet. It's going to have an error there that's fine the public for it. And register also passed the observer. Wow. A public voyde notify servers and pass anything. And then I'm going to create a get update method. This method is going to return an object. So I'm just going to say public object type such generic object could be any type of object. Get update and
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «The Observer Design Pattern - Classes Creation - Design Pattern Tutorial» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.