Skip to Content
Test-Driven JavaScript Development
book

Test-Driven JavaScript Development

by Ravi Kumar Gupta
December 2015
Intermediate to advanced
240 pages
4h 57m
English
Packt Publishing
Content preview from Test-Driven JavaScript Development

Advantages

The observer pattern helps to find out relationships between different modules in detail. As the user knows relationship of modules in detail, they can easily design subjects and observers objects. This way of designing code can help us break down modules into smaller task, which at the end turns into quality code and improve reusability of code in the system.

Next point, which encourages us to use the observer pattern, is to provide consistency between subjects and observers objects without making objects tightly coupled. For example, the Observable object doesn't need to worry about details of observers while notifying these objects.

We can add or remove observers at runtime, which can lead us to achieve a concept called Hot Swapping ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Test-Driven JavaScript Development

Test-Driven JavaScript Development

Christian Johansen
Front-End Development Projects with Vue.js

Front-End Development Projects with Vue.js

Raymond Camden, Hugo Di Francesco, Clifford Gurney, Philip Kirkbride, Maya Shavin, Dániel Szabó

Publisher Resources

ISBN: 9781782174929Supplemental Content