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. CHANGELOG: Scott, 11 April 2013 Builing a site that runs using this natively without additional libraries/frameworks continues. Added methods for showing and hiding elements. More tests needed, but will follow once I get things a bit more stable. Scott, 28 Feb 2013 Added some methods. Tests will come later ;) I'm building a website using this framework on the front end and expressjs on the backend. Expect many tweaks and bugfixes over the next few days. Changed so we can use "oj" function to select dom elements and modify them, if you don't wish to use jQuery/Zepto. Scott, 05 Dec 2012 More tests for UI component. v 0.95 Filling empty gaps left by jQuery/Zepto in Native implementaion Scott, 22nd Nov 2012 v 0.9 jQuery/Zepto builds work and pass all tests. Now to write some proper examples. So there's two flavours of ObjectJS now: Native: compressed and gzipped - 4kB jQuery/Zepto: compressed and gzipped - 3.2kB Javascript is in library hell at the moment, everyone has an idea of what they should write and how it should work. A framework should be agnostic, it should not be tied to a library. You shouldn't need to include underscore and jQuery to use one (hello Backbone!). Scott, 16th Nov 2012 v 0.8.2 Added more unit tests Moved mixins about Added some fail cases for some of the methods Scott, 15th Nov 2012 v 0.8.1 Moved things about a bit Modified the build script to build everything in a simpler way Included jQuery version, but no tests, DO NOT USE. Discovered a bug in coverage tool, see README in tests. Scott, 25th October 2012 v 0.8 Upgraded to jsTD 1.3.5 Code coverage now works. Added JSDuck documentation in docs/ Created http://scottbert.github.com/ObjectJS/ Fixed JSONP in Opera TODO: Write more tests/documentation. Scott, 4th September 2012 v 0.7 Tests fixed. Added addClass and removeClass methods. TODO: Need to write tests. Need to create better examples. Need to create documentation. Known issues: JSONP never returns in Opera. Scott, 30th August 2012 NEU: I've split the repos, so this is the front end only component - it's good to go, just needs a few more tests. I've been having a large amount of lack of time lately in which to develop stuff and creating FractalJS is a bit time consuming so it seemed to make sense as I'd only really done the front end bit anyway. So This will be ObjJS and FractalJS will depend on it and use the same syntax but for the back end. See https://github.com/scottbert/FractalJS if you have no idea what I'm talking about. Scott, 22 Mar 2012. 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. 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: 30-Aug-12 ========= Changed to ObjectJS. FractalJS will continue (albeit slowly) at the original repo location and will use ObjectJS as a dependency, so ObjectJS can happily live on just the client for now as it is almost complete. TODO: Don't try using without jQuery/Zepto yet. Also wouldn't recommend yet using it as I've not worked out where to put the docs. Need to write unit tests for JSON templating. 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