Skip to content

Commit

Permalink
More work on the readme file.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Smith committed Aug 7, 2017
1 parent 14cc0c3 commit e4e50fc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -2,9 +2,11 @@

An MVC framework with scheduling.

This framework came into being as a result of work on [Juxtapose](https://github.com/djalbat/Juxtapose), which provides the means to create an application's view. The corresponding model will always be bespoke, so to speak, so there are no means to create it either here or in Juxtapose. That leaves the controller, which is implemented [here](https://github.com/djalbat/Sufficient/blob/master/es6/controller.js). The reason that Sufficient is called an MVC framework is that the more or less prescriptive guidelines for putting an application together using these approaches are elucidated in what follows.
This framework came into being as a result of work on [Juxtapose](https://github.com/djalbat/Juxtapose), which provides the means to create an application's view. The corresponding model will always be bespoke, so to speak, so there are no means to create it either here or in Juxtapose. That leaves the controller, which is implemented here. The reason that Sufficient is called an MVC framework is that the more or less prescriptive guidelines for putting an application together using these approaches are elucidated in what follows.

To gain an idea of how to put an application together using Sufficient and Juxtapose, it is a very good idea to watch the last few videos in the [The Joy of JSX](https://vimeo.com/album/4562013) series of videos that went with Juxtapose. In particular the last video, [10 Traditional MVC](https://vimeo.com/album/4562013/video/227405572), is pretty much compulsory viewing. Also, there is an [MVC example application](https://github.com/djalbat/Juxtapose/blob/master/es6/examples/mvcApp.js) to be found in Juxtapose which you should probalby get up and running. It's [controller](https://github.com/djalbat/Juxtapose/blob/master/es6/examples/mvcApp/controller.js) is identical to the one here in fact, aside from the lack of a reference to a schedule. In what follows it is tacitly assumed that you have more than a passing familiarity with this material. All that is added here is a scheduler and the prescriptive guidelines spelled out in order to help you put it all together. The scheduler is essential if you want to write an application that encompasses asynchronous behaviour such as accessing the file system or has concurrent functionality.
To gain an idea of how to put an application together using Sufficient and Juxtapose, it is a very good idea to watch the last few videos in the [The Joy of JSX](https://vimeo.com/album/4562013) series of videos that went with Juxtapose. In particular the last video, [10 Traditional MVC](https://vimeo.com/album/4562013/video/227405572), is pretty much compulsory viewing. Also, there is an MVC example application to be found in Juxtapose which you should probably get up and running. It's [controller](https://github.com/djalbat/Juxtapose/blob/master/es6/examples/mvcApp/controller.js) is identical to the one here in fact, aside from the lack of a reference to a scheduler. In what follows it is tacitly assumed that you have more than a passing familiarity with this material.

All that is to be found here is a [scheduler](https://github.com/djalbat/Sufficient/blob/master/es6/scheduler.js) and a modified [controller](https://github.com/djalbat/Sufficient/blob/master/es6/controller.js), together with the guidelines spelled out to enable you to put it all together. The scheduler is essential if you want to write an application that encompasses asynchronous behaviour such as accessing the file system or has concurrent functionality.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions es6/controller.js
Expand Up @@ -2,8 +2,8 @@


class Controller {
assignMethods(createMethods, schedule, model, view, ...remainingArguments) {
const methods = createMethods(schedule, model, view, ...remainingArguments);
assignMethods(createMethods, scheduler, model, view, ...remainingArguments) {
const methods = createMethods(scheduler, model, view, ...remainingArguments);

Object.assign(this, methods);
}
Expand Down
4 changes: 2 additions & 2 deletions es6/schedule.js → es6/scheduler.js
Expand Up @@ -2,7 +2,7 @@

const Queue = require('./queue');

class Schedule {
class Scheduler {
constructor() {
this.queue = new Queue();
}
Expand All @@ -23,4 +23,4 @@ class Schedule {
}
}

module.exports = Schedule;
module.exports = Scheduler;
2 changes: 1 addition & 1 deletion index.js
@@ -1,8 +1,8 @@
'use strict';

module.exports = {
Scheduler: require('./lib/scheduler'),
controller: require('./lib/controller'),
Schedule: require('./lib/schedule'),
SynchronousTask: require('./lib/task/synchronous'),
AsynchronousTask: require('./lib/task/asynchronous')
};

0 comments on commit e4e50fc

Please sign in to comment.