I'm not a fan of MVC frameworks. It's like a well intentioned mother
that hugs you too much :)
Ideas are not free to flow. Sooner or later, you strip them to fit the
mold.
But, you fired my curiosity +-) How to start this?
What would be the pieces in simple terms ?
Here's my take (heavily influenced from our current project, and my
relative ignorance of what an MVC really is):
Model:
- - - - -
A JSON tree in the browser representing the data of the app.
A storage I/O (HTML5 local storage when offline, JSON calls to a
backend for persistance)
Controller:
- - - - - - - -
Logic to read from and write to the JSON tree and the HTML view.
2 properties of JS help this:
- object are passed by reference, all functions in the app reference
the same tree
- and JS is mono-thread, no conflicts in writing or getting non
updated data
An eventing mechanism that fires either when the user/a timer makes
something or when the data come back from the server.
View:
- - - - -
Mix a subset of the JSON tree with HTML templates to generate HTML (I
understand we agree on what is here :)
Is that a good start for you?
Feel free to change everything :)
Your turn!
On Feb 11, 5:56 pm, AJ ONeal <Alvin.ON...@gmail.com> wrote:
> I've been looking around for the best js tools I can find and I've stumbled
> upon a few frameworks that may serve for valuable usage (and great food for
> thought in any case).
>
> http://blog.new-bamboo.co.uk/2009/11/10/thoughts-on-kiwi-js-in-relati...
>
> Sammy JS - Routes / Controllerhttp://code.quirkey.com/sammy/
I like pure a lot. It is the best templating library I used. I use it
on lots of my projects because it helps keep things simple and clean.
> --
> You received this message because you are subscribed to the Google
> Groups "JavaScript Templates Engine PURE" group.
> To post to this group, send email to Pure-Unobtrusive...@googlegroups.com
> .
> To unsubscribe from this group, send email to Pure-Unobtrusive-Rende...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/Pure-Unobtrusive-Rendering-Engine?hl=en
> .
>
I'm not a fan of MVC frameworks. It's like a well intentioned mother
that hugs you too much :)
Ideas are not free to flow. Sooner or later, you strip them to fit the
mold.
There is also JavaScript mvc if you really want it. http://javascriptmvc.com/#&who=getstarted
I like pure a lot. It is the best templating library I used. I use it on lots of my projects because it helps keep things simple and clean.
Message / Event Abstraction : ??? Something that informs the controller of events / messages
i'm actually using pureskin in combination with helmang [1] which is
nice since i get to write javascript all the way down :)