Auto-tools/Projects/BugHunter: Difference between revisions

Line 233: Line 233:
'''Page:''' Manages the DOM ready event.  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 all components.
'''Page:''' Manages the DOM ready event.  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 all components.


'''Component:''' Contains the public interface of the component.  The component will typically have an instance of a View and Model class.  The component is responsible for 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.


'''View:''' A component's view class manages interfacing with the DOM. Any CSS class names or HTML id's are defined as attributes of the view.  Any HTML element modification is controlled with this class.
'''View:''' A component's view class manages interfacing with the DOM. Any CSS class names or HTML id's are defined as attributes of the view.  Any HTML element modification is controlled with this class.
Line 240: Line 240:


'''Collection:''' A class for managing a collection of Components or classes of any type.  A collection can also have a model/view if appropriate.
'''Collection:''' A class for managing a collection of Components or classes of any type.  A collection can also have a model/view if appropriate.
 
==== Class Structure ====
==== Class Structure ====


Confirmed users
353

edits