Observer Design Pattern In C++



JOIN ME BEHIND THE SCENE :
https://www.patreon.com/cppnuts

DESCRIPTION :
— ++++++++++++++++++++++++++++++++++
RECOMMENDED BOOKS TO STUDY C++
++++++++++++++++++++++++++++++++++

BEGINNERS BOOKS FOR C++ (No previous programming experience required):
======================================================================
(1)
Book : Object-Oriented Programming with C++ 6th OR 7th Edition
Author: E Balagurusamy (Famous Indian Auther)
Buy : 6th Edition : http://amzn.to/2fTvaHF
: 7th Edition : http://amzn.to/2fU2T3M
NOTE: if you are Indian and looking for first book, then this is the one (most college prefer this book).

(2)
Book : The Complete Reference, 4th Edition
Author: Herbert Schildt
Buy : http://amzn.to/2kyq3lg

BEGINNERS BOOKS FOR C++ (REQUIRES a little previous programming knowledge):
===========================================================================
(3)
Book : C++ Primer
Author: Stanley Lippman, Josée Lajoie, and Barbara E. Moo
Buy : http://amzn.to/2wFuSea
Full Description: http://accu.org/index.php?module=bookreviews&func=search&rid=1848

(4)
Book : Accelerated C++
Author: Andrew Koenig and Barbara Moo
Buy : http://amzn.to/2g2TKtw
Full Description: http://accu.org/index.php?module=bookreviews&func=search&rid=1185

ADVANCE BOOKS ON C++:
======================
(5)
Book : Modern C++ Design
Author: Andrei Alexandrescu
Buy : http://amzn.to/2g0MgHl
Full Description: http://accu.org/index.php?module=bookreviews&func=search&rid=979

(6)
Book : C++ Concurrency In Action
Author: Anthony Williams
Buy : http://amzn.to/2yyjWDP
Full Description: https://accu.org/index.php?module=bookreviews&func=search&rid=1850

(7)
Book : C++ Templates: The Complete Guide
Author: David Vandevoorde and Nicolai M. Josuttis
Buy : http://amzn.to/2g1LUjY
Full Description: http://accu.org/index.php?module=bookreviews&func=search&rid=506

MOST RECOMMENDED BOOKS FOR EXPERIENCED C++ DEVELOPERS (more about C++ quirk):
=============================================================================
(8)
Book : Effective C++
Auther: Scott Meyers
Buy : http://amzn.to/2g1VTpj
Full Description : http://accu.org/index.php?module=bookreviews&func=search&rid=700

(9)
Book : Effective Modern C++
Auther: Scott Meyers
Buy : http://amzn.to/2g2ls9Q

(10)
Book : Effective STL
Auther: Scott Meyers
Buy : http://amzn.to/2wFdrKX
Full Description: http://accu.org/index.php?module=bookreviews&func=search&rid=67

(11)
Book : More Effective C++
Auther: Scott Meyers
Buy : http://amzn.to/2g0R9QH

Observer design pattern is a Behavioural pattern and one of the main design pattern to study. I have seen this design pattern widely used in game developments because they are depending on one objects state there could be lots of things happening simultaneously.

The idea is there will be an object(subject) and it will keep changing its state and you want to perform operations depending on its state so you will create observers and they will keep on observing the state of the object(subject) and depending on the state of object they will take respective actions.

In Observer design pattern in c++ video tutorial i have tried to explain with the help of definition, UML diagram, and two simple but good examples.

If you find anything inappropriate please do comment i will try to fix.

Code available here: https://github.com/7yadavrupesh/designpattern/tree/master/Observer%20Design%20Pattern

Thanks for watching my video on Observer design pattern in c++.

source

Leave a Reply

Your email address will not be published. Required fields are marked *