Skip to content

Commit 418d909

Browse files
committed
updated readme with correct documentation for non-amd projects
1 parent 16c3001 commit 418d909

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

README.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ Back-MVC
66
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/)
77

88
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.
1112

1213
# Usage
1314

@@ -20,7 +21,7 @@ Commands, Models, Views and Routers are provided access to the facade directly b
2021
#### ApplicationFacade.js
2122

2223
```js
23-
ApplicationFacade = Facade.extend({
24+
ApplicationFacade = BackMVC.Facade.extend({
2425
startup: function () {
2526
this.registerCommand('startup', StartupCommand);
2627
this.sendMessage('startup', $('#container'));
@@ -35,7 +36,7 @@ Commands execute your user interactions and interact with the models/collections
3536
#### StartupCommand.js
3637

3738
```js
38-
StartupCommand = Command.extend({
39+
StartupCommand = BackMVC.Command.extend({
3940
execute: function (message) {
4041
var element = message.getBody();
4142
// Register main view
@@ -56,7 +57,7 @@ The data of a model/collection is provided through Backbone.js functionality
5657
#### SomeModel.js
5758

5859
```js
59-
SomeModel = Model.extend({
60+
SomeModel = BackMVC.Model.extend({
6061
getSomeValue: function () {
6162
return this.get('someValue');
6263
}
@@ -78,7 +79,7 @@ When a message is sent out in the framework, views can listen to them directly b
7879
#### ApplicationView.js
7980

8081
```js
81-
ApplicationView = View.extend({
82+
ApplicationView = BackMVC.View.extend({
8283
onRegister: function () {
8384
// Do something
8485
},
@@ -96,7 +97,7 @@ ApplicationView.NAME = 'ApplicationView';
9697
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.
9798

9899
```js
99-
StartupCommand = Command.extend({
100+
StartupCommand = BackMVC.Command.extend({
100101
execute: function (message) {
101102
this.sendMessage('applicationLoadComplete', message.getBody(), message.getType());
102103
}
@@ -112,17 +113,4 @@ Create a 'main' style class and instantiate your facade with your provided appli
112113
```js
113114
var facade = new ApplicationFacade();
114115
facade.startup();
115-
```
116-
117-
### AMD support
118-
119-
If you are using a AMD supported plugin like Require.js, BackMVC supports this. Just prefix any of the classes with BackMVC. Example:
120-
121-
```js
122-
define(['backmvc'], function (BackMVC) {
123-
var SomeView = BackMVC.View.extend({
124-
});
125-
SomeView.NAME = 'SomeView';
126-
return SomeView;
127-
});
128116
```

0 commit comments

Comments
 (0)