Hints and tips

The different layers of the various MV* patterns need not all be on the browser nor do they all need to be written in JavaScript. Many popular frameworks allow the maintenance of a model on the server and communicating with it, using JSON.

The Object.observe method may not be available on all browsers yet, but there are polyfills that can be used to create a similar interface. The performance is not as good as the native implementation, but it is still usable.

Get Mastering JavaScript Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.