Skip to content

uneak/microMVC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microMVC

v.0.0.1

Minimalist Javascript MVC Framework

Features

  • loosely coupled system
  • each components (model, view, controller) is a mediator
  • a component can register, unregister, and call subscriber methods
  • no dependencies on any other libraries
  • ultra light library

Installation

using Bower:

$ bower install micro-mvc

Getting Started

load library:

<script type="text/javascript" src="microMVC/dist/js/micromvc.min.js"></script> 

Create application:

var app = new microMVC.Application();

Add a controller:

app.controllers.add("appctrl", {
    
});

Add a model:

app.models.add("appmodel", {

});

Add a view:

app.views.add("appview", {

});

API

Add a element to a component

app.{component}.add("{element id}", {element object}, {extended class});

Subscribe to a event

app.{component}.subscribe({context}, {scope}, {callback});

Publish a event

app.{component}.publish({context}, {event});

Call method from a element component

app.{component}.call({path}, {argument});

Copyright and license

Copyright © 2015 Marc Galoyer (http://marc.galoyer.com)

Licensed under the MIT (http://raphaeljs.com/license.html) license.

About

Minimalist Javascript MVC Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published