The characterization of 5Widgets as an MVC framework does not refer to ASP.NET MVC. It refers to the architectural and coding approach used. Below is an overview of the architecture of the framework.
Controller
The controller functionality is implemented in the UIController object in UIController.js file. The controller's public interface consist of Properties, Methods, & Events. It's role, in harmony with the MVS design pattern we use, is:
Host Page
An HTML5 host page is required to stage and run 5Widgets. A sample host page (in index.html) is included to illustrate how to construct such a page. This host page references external JS files for each part it uses, includes an HTML5 canvas element. In a script, it instantiates both an HTML5 canvas 2D Context object, and a UIController object from the 5Widgets library. With these in place, the host page acts as a controller of sorts, passing page events on the Context object to the UIController object.
Parts
Member | Category | Comments |
keyDown (key) | Method | for control character key events |
mouseUp (x coordinate, y coordinate) | ||
mouseOut () | no coordinates needed | |
mouseDown (x coordinate, y coordinate) | ||
click (x coordinate, y coordinate) | ||
mouseMove (x coordinate, y coordinate) | ||
mouseOver (x coordinate, y coordinate) | ||
keyPress (key) | for printable character key events | |
render () | called by controller |