I like that! In addition to what Jörn said I would suggest using the
$.model namespace for all your other properties and methods.

So $.modelOptions would then become $.model.options. This will cut
down on the jQuery global namespace clutter.

Again, nice work!

--
Brandon Aaron

On 5/18/07, Mark Gibson <[EMAIL PROTECTED]> wrote:

Hello,
I've got a new plugin for jQuery.
It's a simple data model, useful for implementing a client-side MVC
pattern.

The data model is a simple javascript object/array hiearchy.
The plugin provides methods for binding parts of the model to DOM
elements
and/or functions - so that when the value of an element changes the
model
is changed and if the model changes the elements are updated too, or a
function be called on a change too.
It's similar to the XForms concept, but relies on jQuery and
Javascript rather XPath,
and the model would normally also be serialized as JSON.

I'd like to add it to the plugins SVN repository if possible.
It will be licensed with MIT/GPL as jQuery is.

For now it here are some links for it (blurb and demo pages):
http://jollytoad.googlepages.com/mvcusingjquery
http://jollytoad.googlepages.com/model-demo.html
http://jollytoad.googlepages.com/model.js

- Mark Gibson


Reply via email to