HTML and CSS Reference
In-Depth Information
The-M-Project
The-M-Project
(
their
demo
)
is built on top of jQuery and jQuery Mobile. It uses con‐
cepts and parts from SproutCore and bases its persistence handling on
persistence.js
.
Figure 3-23
gives a snapshot of its community following.
Figure 3-23. The-M-Project github stats; June 2012
Because The-M-Project UI looks exactly like jQuery Mobile, it's hard to tell at first glance
what the big difference is. The project, however, is much more than a shiny UI frame‐
work. It has four core development concepts: MVC, Content Binding, Dynamic Value
Computing, and Event Handling. So unlike the UI-focused Wink Toolkit, The-M-
Project puts most of its focus on the programming model, as you can see in
Table 3-6
.
Table 3-6. The-M-Project
Platform support
iOS, Android, WebOS, BlackBerry, Windows Phone
License
GPLv2 and MIT
Programming model
Relies heavily on MVC pattern; creates view components through JavaScript and addresses
data binding
Wrapped or polyfilled HTML5 APIs
Web Storage (DataProvider for local and remote storage persistence)
A bit of JavaScript handles page setup:
PageSwitchDemo
.
Page1
=
M
.
PageView
.
design
({
childViews
:
'header content'
,
header
:
M
.
ToolbarView
.
design
({
value
:
'Page 1'
}),
content
:
M
.
ScrollView
.
design
({
childViews
:
'button'
,
button
:
M
.
ButtonView
.
design
({
value
:
'Goto Page 2'
,
events
:
{
tap
:
{
target
:
PageSwitchDemo
.
ApplicationController
,
action
:
'gotoPage2'
}
}
})
})
});
To create the component shown in
Figure 3-24
, use: