3m5-coco
a simple JavaScript MVC Framework developed by 3m5. Media GmbH
What is 3m5-coco?
-
based on dejavu class model
-
use handlebars template engine
-
use jQuery for DOM-manipulation
-
use ES6 standard - transpiled by babel --> ES5 standard published to npm
-
compatible to browserify and webpack
installation
this framework is a npm module, use
npm install 3m5-coco
application.js
Sample This file will give you a taste of how to use Coco.JS
/** * @author (c) Andreas Wiedenfeld <andreas.wiedenfeld@3m5.de> * updated at 16.09.2015 *//** @namespace **/ var Coco = ; var TestCollection = ;var TestView2 = ; var CocoApplication = dejavuClassdeclare { console; CocoTranslator; CocoTranslator; CocoTranslator; CocoTranslator; console; console; //change locale CocoTranslator; console; var innerModel = id:123 label:"innerModel" properts: "myInnerProperty"; var innerCollection = id:1 label:11 id:2 label:22; var testModel = id:12 label:"myLabel" property: innerModel properties: innerCollection; innerCollection; console; //initialize a simple router '.routerView' dashboard: path: '/' view: model: testModel imprint: path: '/testView2' view: TestView2 '/'; } ; ; Cococonfig = baseUrl: "baseURL" //server context path router: loaderDelay: 300 // When views are swapped by Router, this time adjusts when the loading class restService: //restService configuration path: null //restService path cacheGet: 600 //cache time for GET Requests of same url in seconds cachePost: null //cache time for GET Requests of same url in seconds ;
Documentation
I hate the way you did
If something doesn't suit you, please submit a pull request that lets this framework be more flexible than it currently is.
License
Coco is under ISC-License