You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-20Lines changed: 8 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,9 @@ Back-MVC
6
6
Back-MVC acts as the glue to bind a Backbone.js application is a more traditional MVC framework. Back-MVC is an extension of a previous [JS-MVC experiment](https://github.com/krange/JS-MVC). Just like JS-MVC, Back-MVC is loosely based on [PureMVC](http://puremvc.org) and [Fabrication](http://code.google.com/p/fabrication/)
7
7
8
8
Unit-tested through Jasmine.
9
-
10
-
Release version in Downloads. 6kb minified!
9
+
Own namespace (BackMVC).
10
+
AMD support.
11
+
Release version in Downloads. 6kb minified.
11
12
12
13
# Usage
13
14
@@ -20,7 +21,7 @@ Commands, Models, Views and Routers are provided access to the facade directly b
20
21
#### ApplicationFacade.js
21
22
22
23
```js
23
-
ApplicationFacade =Facade.extend({
24
+
ApplicationFacade =BackMVC.Facade.extend({
24
25
startup:function () {
25
26
this.registerCommand('startup', StartupCommand);
26
27
this.sendMessage('startup', $('#container'));
@@ -35,7 +36,7 @@ Commands execute your user interactions and interact with the models/collections
35
36
#### StartupCommand.js
36
37
37
38
```js
38
-
StartupCommand =Command.extend({
39
+
StartupCommand =BackMVC.Command.extend({
39
40
execute:function (message) {
40
41
var element =message.getBody();
41
42
// Register main view
@@ -56,7 +57,7 @@ The data of a model/collection is provided through Backbone.js functionality
56
57
#### SomeModel.js
57
58
58
59
```js
59
-
SomeModel =Model.extend({
60
+
SomeModel =BackMVC.Model.extend({
60
61
getSomeValue:function () {
61
62
returnthis.get('someValue');
62
63
}
@@ -78,7 +79,7 @@ When a message is sent out in the framework, views can listen to them directly b
Notification is such a long word to write. Message is much easier and faster. Same basic principle, an actor sends out a mesasge that other actors are listening and can respond to. A *Message* takes 3 parameters (name, body, type) but only *name* is required.
0 commit comments