Git Product home page Git Product logo

blueprint's People

Contributors

hilljh82 avatar nrhubbar avatar zachwilcher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blueprint's Issues

Make messaging framework asynchronous

The Blueprint messaging framework is built atop the node messaging framework. This frameworks executes its listeners synchronously. Unfortunately, this is not the intended behavior of the messaging framework because it can delay the emitter for extended periods of time if the listeners are not implemented correctly, or there are a large number of handlers for an event.

We need to update the framework so that all listeners execute in parallel, and the emitter has the option to either wait for all listeners, or continue without waiting. The latter approach will be the default, and extended behavior of the messaging framework.

Fix Travis CI build

The build works on the local development machine, but is failing on Travis CI.

Integrate Alexa home into Blueprint

This issue is to track the progress of integrating Alexa home into Blueprint. It will be a module that allows you to configure routes to handle commands from Alexa for the skill defined by your application.

Message listeners on datastore change

Resource controllers could be made to emit an event whenever the underlying datastore has been modified, so that listeners can easily react to this change (via PUT, POST, DELETE, etc. but not GET HTTP methods).

Event data for create/update operations should include the updated or created document, while delete operations should include the deleted document.

The namespace of the event could be constructed like:

namespace = opts.prefix || 'resource' + '.' + collection_name + '.' + datastore_operation

...then, using blumate.messaging API, emit the event for consumption by listeners.

I'll go ahead and work up a PR if you're on board. Any suggestions or feedback would be great.

waitFor helper method

It would be great if we had a helper method in Blueprint.js to facilitate testing features that operate atop to messaging platform. Something like the following would be great:

blueprint.testing.waitFor (condition, interval, onComplete);

Node cluster

Add support for node cluster. This will allow a blueprint application to take advantages of the available cpus on a multi-core architecture.

Swagger

It would be great if blueprint supported Swagger. Maybe a Blueprint.js module for Swagger (i.e., blueprint-swagger). The Swagger specification could be integrated directly into the router definition, and the Blueprint.js Swagger module would auto-generate the definition.

Support custom view engines

Blueprint uses consolidate.js to integrate many view engines. There are scenarios where a view engine may not be supported by consolidate.js, and there is a need for a custom view engine. See isssue #29 for an example.

To address this problem, we need to support custom view engines in Blueprint. This custom view engines should be defined in app.config.js.

async: Callback was already called

When loading a Blueprint.js server, I get an (extremely vague) error:

$ node ./app/index.js

info: configuration path: /home/bdfoster/Projects/fall2016-group1-apiserver/app/configs
info: configuration environment: development
/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:985
        if (fn === null) throw new Error("Callback was already called.");
                         ^

Error: Callback was already called.
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:985:32
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/@onehilltech/blueprint/lib/ApplicationModule.js:96:16
    at PolicyManager.ResourceManager.load (/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/@onehilltech/blueprint/lib/ResourceManager.js:48:12)
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/@onehilltech/blueprint/lib/ApplicationModule.js:94:15
    at nextTask (/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:5208:14)
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:5202:13
    at apply (/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:41:25)
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:76:12
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:988:16
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/@onehilltech/blueprint/lib/ApplicationModule.js:96:16
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:484:16
    at nextTask (/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:5195:29)
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:5202:13
    at apply (/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:41:25)
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:76:12
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:988:16
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/@onehilltech/blueprint/lib/ListenerManager.js:73:16
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:484:16
    at iteratorCallback (/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:1084:13)
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:988:16
    at /home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:484:16
    at nextTask (/home/bdfoster/Projects/fall2016-group1-apiserver/node_modules/async/dist/async.js:5195:29)

It leads me to believe that there's an issue with Blueprint.js itself, however I can't really confirm given the vague stack trace.

The code for this issue is living in https://github.com/CS450-ECE461/fall2016-group1-apiserver/tree/issue8. The issue occurred when updating from v0.48.1 to v1.1.1, and it was not occurring beforehand. In lib/ResourceController.js, you will see a custom ResourceController that is used in app/controllers/UserController.js. Switching to using blueprint-mongodb's ResourceController has the same results.

NPM and Node.js versions:

$ npm -v
3.10.3
$ node -v
v6.7.0

For reference, here is my package tree:

$ npm list
[email protected] /home/bdfoster/Projects/fall2016-group1-apiserver
├─┬ @onehilltech/[email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │   └── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ @onehilltech/[email protected]
│ └── @onehilltech/[email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     └─┬ [email protected]
│       └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     ├── [email protected]
│     └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   └─┬ [email protected]
│ │     ├── [email protected]
│ │     └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   └─┬ [email protected]
│ │     ├── [email protected]
│ │     ├─┬ [email protected]
│ │     │ ├─┬ [email protected]
│ │     │ │ └─┬ [email protected]
│ │     │ │   └── [email protected]
│ │     │ └── [email protected]
│ │     ├── [email protected]
│ │     └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│   └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │   ├─┬ [email protected]
│ │   │ ├── [email protected]
│ │   │ └── [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   ├─┬ [email protected]
│ │   │ └── [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │   ├─┬ [email protected]
│ │ │ │   │ └── [email protected]
│ │ │ │   ├── [email protected]
│ │ │ │   └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│   ├─┬ [email protected]
│   │ ├── [email protected]
│   │ └─┬ [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   └── [email protected]
│   ├── [email protected]
│   └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │   └── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   ├─┬ [email protected]
│ │   │ └── [email protected]
│ │   ├── [email protected]
│ │   ├─┬ [email protected]
│ │   │ └── [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└─┬ [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  └── [email protected]

Enable https:// support

The server configuration file only supports the http:// protocol. We need to enable support for the https:// protocol for secure communication with the server. The ideal method for enabling/configuring https:// support would be through server configuration file. Here is what the server configuration file may look like with https:// support enabled.

module.exports = exports = {
  view_engine: 'jade',  // this is optional (default=jade)

  protocols : {
    http : {
      port : 8080  // Default port if not provided
    },

    https: {
      port : 443,   // Default port if not provided
      options : {
        // HTTPS module options
      }
    }
  },

  middleware : {
    // Integrated middleware (e.g., express-session, passport, morgan, etc.)

    custom : [
      // Custom middleware implemented by application
    ]
  }
};

Seeding the database

There needs to be a way to seed the database when the application starts. This would be very useful when testing Blueprint applications.

Direct support for validation schemas

The validation property on the object returned from a controller method is assumed to be a function. There are times when the validation is to only use a schema from express-validator. Unfortunately, to do some requires writing the same one-liner function. It would be nice to either provide a validation function or schema to the validate property. Something like this:

MyController.prototype.someMethod = function () {
  return {
    validate: {
      // add validation schema here
    }
}

Typo in "Define the Controller Action" section of Wiki

In the last code snippet on the "Define the Controller Action" there's a typo.

HelloWorldController.prototype.deleteNames = function () {
  return function (req, res) {
    // reset the array of names
    names = [];
    
    // redirect to /helloworld so we can enter more names
    res.redirect ('/helloword');
  };
};

The res.redirect ('/helloword'); line should be res.redirect ('/helloworld');.

Support for Babel

Babel allows developers to use features in JavaScript that many not be available in Node.js. We should integrate Babel into Blueprint.js so we can leverage new JavaScript features when implementing our applications.

How are partial views implemented?

Partial views (such as with handlebars) do not seem to be supported, but is a key element in the DRY (don't repeat yourself) principle. Is there a directory (or a way to configure a directory) where partial views can be imported into a parent view?

On that same line of thinking, is there a directory (...) where layouts can be created/specified in a view?

Socket.io

It would be awesome to integrate Socket.io for sending events to and from clients. I currently have it working in the following way:

var io = null;
blueprint.messaging.on('app.init', function (app) {
io = require ('socket.io')(app.server._protocols[0]._protocol);
});

Messaging service module

The goal of this is to integrate into Blueprint.js a messaging module. The messaging module allows Blueprint.js framework and controllers to send messages that correspond to different events. The web application can then register for these events. The objects that register for the events will be called listeners.

The listeners will reside in:

/app/listeners

The way we will register the listeners is based on directory naming. The name of the directory in the listeners directory will be the event of interest. For example, the directory

/app/listeners/app.init 

corresponds to the app.init event.

Each JavaScript file in the event directory will contain a single listener that is to be registered with the messaging service.

Improve policy integration

One can use the Policy.Definition in the validate property of a controller action. The current design, however, requires you to write a separate function to integrate Policy.Definition. For example:

return {
  validate: function (req, callback) {
    Policy.Definition (['policy1', 'policy2']).evaluate (req, callback);
  }
}

Instead of have writing a separate function to integrate the policies, the definition should adapt the list of policies to assignable directly to the validate property:

return {
  validate: Policy.Definition (['policy1', 'policy2'])
}

Initial creation requires a models folder

The initial creation of an app with blueprint seems to be expecting a "models" folder to exist, which is not necessarily created from blueprint-init. The error is coming from fs.js:856 when it is trying to read the directory (which is being called from the blueprint Application.js:59:9). This is bring thrown when I try to do a "node ./app" to start the application.

Auto-detect blueprint modules

The current approach for integrating blueprint modules adds an additional complexity to the application. This is because you must ensure app/modules.js coyntains modules that actually appear in package.json. There can easily be a case where these two files become unsynchronized, such as manually editing the files.

Instead of using app/modules.js, would should be able to auto-detect a module from package.json. We can do this with the following design decisions:

  • A module must define blueprint-module as a tag in package.json.
  • The application searches for modules by iterating over all node modules defined under the dependencies section in package.json.
  • Any node module that is identified as a blueprint module will be search to contain blueprint modules in the same manner used by the application.

This approach will remove the unwanted overhead of needing to managing module definitions in multiple locations.

first/last on ResourceController

Add first and last methods to the resource controller. This will improve a client's ability to determine if their local cache is outdated.

Single action controllers

There are times when a controller will only export a single action. We should be able to use shorthand its integration with a router by only specifying the controller name. If there is no method in the action property, then it is assumed that the router is binding to a well-defined method.

This method should be named __invoke.

Validate.js

It would be nice to integrate Validate.js (possibly by module), as a way to validate requests. This could be the basis of a "request model", making the use of Mongoose in blueprint-mongodb optional.

Search capabilities on ResourceController

The ResourceController supports queries on GET /resource path. This is good for simple queries, such as:

  • Give me all the resources in the database
  • Give me all the resources where the fields match (or equal) a certain set of values.

Requests on GET /resource path are not good for complex queries, such as:

  • Give me the resources that are less than a specific value
  • Give me the resources that fall within a certain date range

This is because it is not easy to express complex queries via a URL query string. We therefore need to provide a improved mechanism that allows the client to execute complex queries. We will call this capability search.

The search capability should have the following key features:

  • It should allow the client to formulate complex queries.
  • It should allow the client to save complex queries for later usage.

v4

v4 will be a major update to the code base. It is expected to break existing code bases, and we will not provide support for backwards compatibility. The list below is a list of features we plan on putting in v4. As we work on the update, expect this list to change.

Proposed Features

  • Upgrade code base to use ES6 via core-object
    • Create Listener object and LegacyListener object for porting existing listeners
    • Create Controller object and LegacyController object for porting existing controllers
    • Create Router object and LegacyRouter object for porting existing routers
    • Create Policy object and LegacyPolicy object for porting existing policies
    • Move listener objects to their own module
  • Create Service abstraction for objects that live the entire life of the application outside of existing object types.
  • Improve inheritance support in library classes
  • Add support for synchronous messaging
  • Improve testing infrastructure for Blueprint modules
  • Switch from callback architecture to Promise architecture
  • Prepend blueprint. to built-in message types
  • Replace underscore with lodash

General Tasks

  • Update test cases

Run install as part of blueprint-init

It would be nice to install all the dependencies of an new application when it is created. Otherwise, users have to run the same commands after creating the application before it can be used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.