Magic Wand

for

Large JS Apps

Large JS App ??


proportional to code size

x

Non - trivial Applications

applications requiring development efforts to maintain it

Components

of Large JS Apps

Library & Toolkit, Widgets, Models, Views, Controllers, Widgets, Modules

Advantages

Well Defined, Separate Concerns, Responsibility Driven etc

Problem ??

Reusability, Testability, Independent Modeules, Tight-Coupling, Self contained

Coupling 1

reusability

The secret to building large apps is never build large apps. Break your applications into small pieces. Then, assemble those testable, bite-sized pieces into your big application.

- Justin Meyer

The more tied components are to each other, the less reusable they will be, and the more difficult it becomes to make changes to one without accidentally affecting another.

- Rebecca Murphey

How to do it?

Thoughts ?

Solution/Approach

Module

Facade

Mediator

Module ?

Reusable, Independent, Self-contained, No Knowledge of System

Facilitates loose coupling and Removes code dependency

JS : Module Pattern

Helps with Privacy and Code organisation.

JS : Facade Pattern

Hides complexity, exposes simple interface

JS : Mediator Pattern

Air traffic control system

Mediator VS Pub/Sub

Thanks & Questions