Confirmed users
353
edits
| Line 231: | Line 231: | ||
==== Class Definitions ==== | ==== Class Definitions ==== | ||
'''Page:''' Manages the DOM ready event, implements any top level initialization that's required for the page. An instance of the page class is the only global variable that other components can access. The page class instance is responsible for instantiating components and storing them in attributes. The page class also holds any data structures that need to be globally accessible to component classes. | '''Page:''' Manages the DOM ready event, implements any top level initialization that's required for the page. An instance of the page class is the only global variable that other components can access, if they're playing nice. The page class instance is responsible for instantiating components and storing them in attributes. The page class also holds any data structures that need to be globally accessible to component classes. | ||
'''Component:''' Contains the public interface of the component. A component can encapsulate any functional subset/unit provided in a page. The component will typically have an instance of a View and Model class. The component class is also responsible for any required event binding. | '''Component:''' Contains the public interface of the component. A component can encapsulate any functional subset/unit provided in a page. The component will typically have an instance of a View and Model class. The component class is also responsible for any required event binding. | ||