Modular design pattern helps to split each functionality into different chunks of code to separate the concerns.
Publisher Subscriber pattern is the loosely coupled extension of Observer pattern.
Observer design pattern helps to decouple the code dependency by registering different Observers on the Subject