Observer Design Pattern in Java

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 183

  • @berjaoui92
    @berjaoui92 Рік тому +4

    I started following your tutorials in 2017. Now i am a full stack java developer...Thank you a lot

  • @prasadbonam4430
    @prasadbonam4430 5 років тому +63

    I can say one thing " ur examples are so Realistic easy 2 understand" keep it up Good work bro n Thank you :)

  • @muhammadsaleh816
    @muhammadsaleh816 5 років тому +13

    You are making life easier for java developers
    Love from Pakistan :)

  • @siddharthmohanty7106
    @siddharthmohanty7106 3 роки тому +1

    I discovered this channel a few months ago and I'm legit loving it!

  • @karthik-ex4dm
    @karthik-ex4dm 4 роки тому +2

    Actually... This is the best video explaining observer pattern I've seen...
    From yesterday, I've been searching for observer pattern in both python and javascript, didn't find any video that solidified my understanding. I might have watched 5-10 videos (best ones).... I was sceptical at first since this video is in java (I don't know java) but turns out java is not as difficult as its often publicized. I actually understood everything clearly since I know python and JS
    Naveen's example of UA-cam was on point!!! If he had not taken youtube example, I think it would have been just another observer pattern video
    Java is also good!!! I'm liking the way it's written
    Now I'm gonna create this in JS

  • @seshagirik4066
    @seshagirik4066 2 роки тому +2

    Thanks!

  • @vishalsingh-dj6od
    @vishalsingh-dj6od 4 роки тому

    I have watched multiple observer design pattern video, I must say this is the best one and more realistic. Keep it going boss..

  • @rayasamkiran
    @rayasamkiran 3 роки тому

    Thanks for explaining it in lucid way. Few things I noticed..
    Subscriber class ..
    Channel channel = new Channel ();
    This is not required... You can remove the RHS part as you are doing in setter method..
    Another improvement in UA-cam class is ...
    Unsubscribe is called only from subscriber side but not from channel side...

  • @BakhtyarQadri
    @BakhtyarQadri 5 років тому +2

    Your thinking way is very appreciatable.Thanks to show me this way of logic building.

  • @dr.venugopalrajupalem6526
    @dr.venugopalrajupalem6526 4 роки тому

    Wonderful explanation and the example of the Observer Pattern I have ever seen! You are my favourite Teacher. Thanks.

  • @yazilk30
    @yazilk30 5 років тому +5

    Its really amazing that....this lengthy process is very easy to understand by you Sir😍😍😍😍

  • @jilanishaik8791
    @jilanishaik8791 5 років тому

    Easily able to understanding by giving simple examples with clear explainations. Thanks Naveen.

  • @vikramkumar-mi1yk
    @vikramkumar-mi1yk 2 роки тому +1

    All the playlists were really very good and informative. Thanks, Navin for such wonderful content.

  • @abdullohmaraimov2022
    @abdullohmaraimov2022 3 місяці тому

    You are GOAT teacher, your explanations are also GOAT
    Thank you for such a great content, keep going!

  • @uma4525
    @uma4525 4 роки тому

    Quick and nice explanations that's very easy to understand - telusko learnings. From this channel ,I have learnt a lot. Thanks much Navin

  • @ShadowWalker683
    @ShadowWalker683 3 роки тому +3

    Sir, felt great, to be honest. I was struggling with this observer pattern and now it's all a matter of examples - you've made it that easy. And one more thing, with this online studying times, this study feels much more realistic with your appearance. Otherwise, only a study video makes it boring sometimes. Thanks a lot sir.

  • @khsbangash
    @khsbangash 5 років тому +1

    Hi Navin,
    Your videos and way of teaching are quite energetic. Even boring subjects you can explain with full of energy. Keep up the good work bro.
    Love and prayers from Pakistan !

  • @cristianflorentintarta885
    @cristianflorentintarta885 2 роки тому

    I am impressed. Kudos. Explanation, engagement and I do not believe that you are getting enough props for ur work. If you have been my high school or college teacher ... :( , but thank you and will keep supporting sir :) :D :}

  • @sohankundu448
    @sohankundu448 Рік тому

    Please continue the series. It would be very much helpful.

  • @gigimushi6705
    @gigimushi6705 2 роки тому

    finaly, with your exemple i understand how to implement the observer pattern. you are the best.

  • @vladanulardzic5859
    @vladanulardzic5859 5 років тому +1

    Par excellence ! Perfect explained. Perfect example. Especially direct programming in the java. Keep on !

  • @kalidindiprashanth7363
    @kalidindiprashanth7363 5 років тому +26

    Hi naveen, can you also make videos on Java memory management and how to improve performance of java applications.

  • @पापानटोले
    @पापानटोले 4 роки тому +2

    This is called teaching!
    Excellent

  • @aswarthanarayanareddyb176
    @aswarthanarayanareddyb176 5 років тому +12

    Every time...learn new from telusko, and waiting for micro services series

    • @qingsiji1638
      @qingsiji1638 4 роки тому

      can not agree more,there is nealry no very good lesson for micro services. Waiting for it too. I have watched so many lessons of telusko

    • @MultiGaurav25
      @MultiGaurav25 4 роки тому

      @@qingsiji1638 check java brains(Kaushik) for microservices

  • @anu608497
    @anu608497 4 роки тому

    Thanks Telusko. Your examples are very intuitive and helpful. I am able to learn Observable Design Pattern easily now

  • @dien2971
    @dien2971 4 роки тому

    Your explanation is not academic. It's easy to understand! Thank you
    I'm just seeing your register numbers are 999K. Wow, congratulations! Hope you reach 1M subcribers point!!

  • @subashkannan949
    @subashkannan949 Рік тому +1

    well explained🔥Also try to upload the other design patterns as well it will be very useful for us...!!

  • @pybrowrynn
    @pybrowrynn 5 років тому +2

    Hello Navin, I have been watching your videos for a while now and I find them very useful. I really wish you could do a live stream some time so that we could interact with you.

  • @ranjithv133
    @ranjithv133 5 років тому +2

    Hi Navin, I really have to say this. thank you. you surely are changing my life for good. keep up the good work.

  • @b_1729-j8j
    @b_1729-j8j Рік тому

    I purchased a GFG course about System Design but that is not at all good but this video cleared my doubts.

  • @libinthomas5349
    @libinthomas5349 2 роки тому

    Thanks a lot 🙏 Expecting more videos like this.

  • @priyagupta-ko2mk
    @priyagupta-ko2mk 3 роки тому

    Thanks Naveen . You have explained it very well.

  • @sarthakuiit
    @sarthakuiit 3 роки тому

    Well explained. Just one potential correction - upload() is storing video title to channel title.

  • @FadingDreams
    @FadingDreams Рік тому

    Still helpful after 4 years❤

  • @jayakumargutha
    @jayakumargutha 5 років тому

    It's very realistic example. This is more than enough to understand the pattern. Good Convey....

  • @theartist8835
    @theartist8835 5 років тому +21

    Actually the observer pattern is much more abstract and braod than that. It has to be general. I know that you are trying to make it simple so everyone understands it, but in doing so, you missed the principle of the observer pattern which is to make code flexible and easy to be added to by creating interfaces and classes that implement the interfaces and then under these implementing classes we can have as many subscribers and channels as we want. The way you did it is just normal java code with no design pattern.

    • @shivakumar-kh3yp
      @shivakumar-kh3yp 5 років тому +2

      Absolutely true

    • @backclover9651
      @backclover9651 7 місяців тому +1

      yes brother I thought the same thing

    • @asaduzmn
      @asaduzmn 4 місяці тому

      I was going to comment it. Thanks for noticing

  • @johnDanu
    @johnDanu 5 років тому

    U rocks always...
    Student of telusko...

  • @satyabatigoswami1735
    @satyabatigoswami1735 5 років тому

    Thank you sir. I was looking for visitor pattern video and found this new concept. Thanks a lot

  • @MsGayathri19
    @MsGayathri19 5 років тому

    Wow simply explained observer design pattern easily .. thank so

  • @kishorgowda6138
    @kishorgowda6138 4 роки тому

    Simply super😍🤟Thanks..

  • @shashidharkrovvidi4998
    @shashidharkrovvidi4998 10 місяців тому

    such an easy to understand example! thank you :)

  • @mananjain9177
    @mananjain9177 3 роки тому +3

    Amazing series....can we have more design patterns explained through some more videos under this playlist?

  • @dohruba
    @dohruba 3 роки тому

    Your example was awesome! Thanks, bro :D

  • @mustafahabeb3584
    @mustafahabeb3584 Рік тому

    thank you very much very simple and easy to understand

  • @anujgadge5313
    @anujgadge5313 3 роки тому

    Please continue this series...

  • @sreekavya5743
    @sreekavya5743 4 роки тому

    I got very good understanding with ur explanation sir.Thank you!!

  • @nandininema7123
    @nandininema7123 4 роки тому

    Thank you Naveen for your awesome videos.

  • @sharjeel_mazhar
    @sharjeel_mazhar 3 роки тому

    Just mind blowing sir!

  • @vishnuvardhanreddy8584
    @vishnuvardhanreddy8584 5 років тому

    Yeah I always waiting for your video content .... Everytime

  • @alinehme1412
    @alinehme1412 2 роки тому

    Crystal clear, thanks a lot!

  • @joejones5746
    @joejones5746 3 роки тому

    Brilliant analogy !!!

  • @tejeswarpala2841
    @tejeswarpala2841 2 роки тому

    good explanation. so clear now.
    small doubt: during unsubscribing, only subscriber is removed from the list of subs in the channel object but not the channel field from the subscriber object. forgot ?

  • @VersatileAnthem
    @VersatileAnthem 3 роки тому

    thank you so much sir. very clear explanation.

  • @yasna1979iravani
    @yasna1979iravani 4 роки тому +1

    how to notify the subject that an observer has unsubscribed???

  • @albiole
    @albiole 3 місяці тому

    I subscribed to be an Observer of this channel.

  • @NiyatiShah24
    @NiyatiShah24 4 роки тому +1

    One doubt - Why are we calling subscribe on Channel and subscribeChannel on Subscriber?
    Say when a user clicks on subscribe, cant we just call subscribeChannel method, which also takes care of subscribe to that Channel?
    Since both have to be called inevitably on event, should they not be coupled?
    Please let me know.

  • @khadijaaitbouiramouin7776
    @khadijaaitbouiramouin7776 4 роки тому

    Just amazing, a smart way to explain things, Thank u soo much

  • @alimodz6253
    @alimodz6253 3 роки тому

    you have great explanation skills :D

  • @smeeangle
    @smeeangle 5 років тому

    In 11:42 kindly elaborate why perform s1.subscribeToChannel(telusko);
    I tried without it then video title got null . Thank you .

  • @PraveenKumar-nq1wg
    @PraveenKumar-nq1wg 3 роки тому +1

    Hi Naveen, Kindly make video recordings for all 23 design patterns, hope we have few recordings already and kindly help us with the missed ones.

  • @crazeeealgorithms3236
    @crazeeealgorithms3236 5 років тому +1

    Superb explanation Thank you Sir...

  • @pandiyarajramu749
    @pandiyarajramu749 3 роки тому

    Good Explanation..Thank you

  • @alexissanchezbro
    @alexissanchezbro 4 роки тому

    Great video code along, this really helped me put the theory into practice. Thank you

  • @sangeetagupta7957
    @sangeetagupta7957 2 роки тому

    Superb explanation

  • @raws4209
    @raws4209 4 роки тому +1

    thank you for this awesome explanation!!!!

  • @guitaristsehokim
    @guitaristsehokim 5 років тому

    It was awesome to follow all of design pattern videos. Could you cover all the other design patterns as you said we have to know all?

  • @vijayr6540
    @vijayr6540 5 років тому

    Very understandable way , thankyou telusko

  • @sanjaypattnaik3288
    @sanjaypattnaik3288 5 років тому

    Great Explanation. Good Example.

  • @hakobhn
    @hakobhn Рік тому

    Thanks for the interesting video. Just wondering, about the subscription method implementation part. Is it correct to keep two diff methods and call them separately? For example, when a subscriber subscribes to some channel, aggregation into the channel's list could be called in that method. Now, you can miss the subsequent subscribeChannel method call for the subscriber, and it will break the logic. I guess, it can be treated as a bug. Isn't it? Thanks

  • @utkarshsharma1867
    @utkarshsharma1867 7 місяців тому

    Sir, u r genius !

  • @mujtabakamal9538
    @mujtabakamal9538 4 роки тому

    Hi, I have been working with TCP Socket, I want to know how can we observe data from socket and pass it to view (web page/jsp) in (Java Spring boot). Like a Real time data, to show Stock Market stats, with using any timer. Can you please help me with this issue. Thanks

  • @ridwanulhasantanvir6456
    @ridwanulhasantanvir6456 3 роки тому

    1:57 pulling
    2:32 observer = subscriber
    3:50 1 subs : 1 channel

  • @catlord69
    @catlord69 4 роки тому +1

    Amazing explanation !

  • @Nelipson
    @Nelipson Рік тому

    It should print who is uploading as well and we can use getter for title. The example would be better if there was case without and with observer.

  • @bl7327
    @bl7327 2 роки тому

    U just earned a subscriber.

  • @kaarthikchinni
    @kaarthikchinni 2 роки тому

    Awesome sir... 🙂

  • @udhayasankar113
    @udhayasankar113 5 років тому

    Great work sir...pls make a design pattern series

  • @rahulrsavant
    @rahulrsavant 2 роки тому

    Thanks, example is matching to observer pattern

  • @ThaiCaliforniacom
    @ThaiCaliforniacom 5 років тому

    Awesome I can use this concept with JavaScript too. Thanks a lot

  • @premk191
    @premk191 4 роки тому +1

    Hey Naveen, I often get confused on how come Subscriber (Observer) get the update() method. And that method contains the "video uploaded" message. I think managing that message should be responsibility of channel (Subject)

  • @ninadsentinel
    @ninadsentinel 3 роки тому

    Is this solution not susceptible to concurrent modification exception if there are additions and removal all at once in subscriber list assuming the subscribe and unsubscribe events would happen independently in separate threads in real world

  • @drakezen
    @drakezen 5 років тому +2

    Since you are making videos of Design Patterns, can you provide explanations of the various patterns using functional style?

  • @vedrathi2346
    @vedrathi2346 5 років тому +4

    Can you please make more python videos, some suggestions can be algorithms and ai, games using pygame, ethical hacking, data analysis and data visualization.

  • @satishmohapatra95_009
    @satishmohapatra95_009 4 роки тому

    Hi Navin, Can you please upload more design pattern video, If possible can you please give any existing example which Java is used internally.

  • @amyd7041
    @amyd7041 5 років тому

    Great content! Thank you so much 👍🏻

  • @yogpooja-vq1pp
    @yogpooja-vq1pp 4 роки тому

    Hi Naveen, you are doing superb job. I just have a doubt in this Observer DP. We are calling telusko.subscribe(s1)... methods inside UA-cam class. but if we are already calling s1.subscribeChannel(telusko) then it shouldn't be necessary right?

  • @Talbuk
    @Talbuk 4 роки тому +1

    Hey Telusko, thank you very much for your great videos!
    I got a simple question, are these patterns static in it's architecture or is it allowed, to change it for special use-cases? I rewrote this pattern by myself just to internalize the idea behind it, but called the method unregisterSubscriber and registerSubscriber from the class channel in the method unSubscribe and subscribe from Subscriber every time a subscription or unsubsctiption from a Subscriber takes place, so that the channel doesn't have to call the method explicitly and only gets informed about the new subscription or unsubscriptions. Also, evey time a new video is being uploaded, I don't call the update-method from subscribers, but send an update method from the channel class to all subscribers. Would that still count as observerpattern or is it strictly required that both sides have to register each other and the update method is in the class of those, who get informed?
    Keep up the good work, love it!

  • @vitorpereira316
    @vitorpereira316 4 роки тому

    Thank you so much Telusko

  • @shikharchaudhary6984
    @shikharchaudhary6984 4 роки тому

    Amazing explanation

  • @msk9414
    @msk9414 2 роки тому +1

    Subscriber class should not create "new" Channel Object every time (Subscriber.java : line 6), but rather a single channel should be created in UA-cam.java, and passed as dependency every time new subscriber object is created(either in constructor or as setter ), so that there is only one Channel object and multiple subscribers. Subscribers can then subscribe to the injected "Channel" object and get notified of any new videos uploaded by the channel.

  • @bhushanbhange7065
    @bhushanbhange7065 5 років тому

    @Telusko @Navin which software do you use to create video. Presentation and you video in it

  • @Dum0Dore
    @Dum0Dore Рік тому

    For me calling the upload method in main shows null at the output

  • @rakeshroshan9690
    @rakeshroshan9690 4 роки тому +1

    Hi Naveen, Can you make a video on difference between Observer dp, state dp and pub-subs dp

  • @MDASIF-wo7ck
    @MDASIF-wo7ck 5 років тому

    Actually very nice example.....

  • @nagank90
    @nagank90 5 років тому

    Great explanation thank you so much.

  • @saninspace
    @saninspace 5 років тому +1

    telesco.subscribe(sn) seems incorrect as channels do not subscribe. Instead s1.subscribeChannel(teleaco) should have called it internally.

  • @rjoconnor3443
    @rjoconnor3443 4 роки тому

    V good clear video

  • @ibo3099
    @ibo3099 4 роки тому

    you could've put the subscribeChannel method inside the subscribe method. Still a great vid

  • @seanhlulani6137
    @seanhlulani6137 3 роки тому

    hello sir, aint u suppose to use interfaces instead? because we got so many methods which end up confusing..

  • @yogeshdhavan1550
    @yogeshdhavan1550 4 роки тому

    W'll inform everyone..hahaha...best explanation ever