/FractalJS

What if your MVC's V had its own MVC? FractalJS Framework. Run the same code in the server or the client. The ultimate reuse of code. This is a work in progress.

Primary LanguageJavaScript

Copyright (c) 2011-2012, Scott van Looy, ThreeSquared. 
All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of FractalJS nor the names of its contributors may 
      be used to endorse or promote products derived from this software 
      without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL SCOTT VAN LOOY BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

UPDATED GOAL:
MVC Javascript on both server running Node and client. The same code is run in 
both, the framework works out what to do with it.
NOTE: Only the client is finished.

The framework is tiny. core is 5k minified, 2k gzipped. 
I need to document it somewhat.

Scott, 22 Mar 2012.

ORIGINAL GOAL:
This is a project that has grown out of my day to day work to create a 
lightweight, jquery compatible MVC framework for creating a Javascript front
end application. 
It will be simple to use and encourage jQuery and Javascript best practice as 
well as CSS namespacing.
It will never be complete, there's always more and better ways of doing things 
than will be encapsulated here, so my aim is for a stable WIP.
I'm currently building the library, so don't try and use it until there are 
samples in the examples directory :)

Scott, 19 Sept 2011.

CHANGELOG:
18-Apr-12
=========
Added:
Native JSONP and a stub for native XHR
.bind for binding events (follows jQuery syntax, with the exception that it just takes two arguments: event and function)
tests for JSONP
code coverage plugin for tests.
10-Apr-12
=========
Added Events object for custom events. Added Events tests. Added linting
comments for JSLint and JSHint so it plays nicely with SublimeText.
Rewrote the internals of partial, renamed to curry, it now actually works
and passes tests.
05-Apr-12
=========
Added Function.prototype.partial, used John Resig's as a base and extended it to deal with multiple arguments.
http://ejohn.org/blog/partial-functions-in-javascript/
Added tests for BaseView and partial
Moved API methods createView/createController/createUI onto their base objects
Updated HelloWorld to work correctly

04-Apr-12
=========
Moved some API calls around for the final time.
Wrote tests for BaseController.
Tidied up loading of external files.
Modified build tools.
Created different testrunners, to test the minified output as well.

23-Mar-12
=========
Added build tools. build-all/core/jquery requires node.js and builds the output into 
the compiled directory.
Build core currently builds jquery core as the lib for now requires it. I shall 
write code shortly that removes this dependency.
Fixed tests.
Wrote more tests.

22-Mar-12
=========
I worked out a while back that there was already a JSMVC, so renamed the thing in 
my mind. Refactored for rename.

21-Mar-12:
=========
Finally got JsTestDriver running properly, added tests for a lot of things and 
refactored some other stuff.
Worked on the helloworld example.

8-Oct-11:
=========
Added jsmvc.js and moved core methods into it. Wrote includes method. Added 
jsmvc-test.html. No tests yet, coming soon.
Reformatted objects to better show API methods.
Added FF namespace.
Rewrote FF.Console.log