Chapter 2CanJS

Bejeweled is a game of colored gems where the player swaps adjacent gems to form sequences of identical gems that are then removed from the board. The game becomes even more exciting when chain reactions happen as falling gems appear to replace the previous sequence and in turn form more sequences. The skilled player can plan ahead for these chain reactions but only has to swap a single pair of gems to set things off. The game engine manages the chain reactions.

Likewise, CanJS is a JavaScript framework that lets you write code that makes one change and then takes care of the chain reaction of updates that need to happen.[13] You no longer have to manually write code to refresh views, change the state of UI widgets, and send ...

Get Seven Web Frameworks in Seven Weeks 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.