Git Product home page Git Product logo

architect's People

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  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

architect's Issues

Versioning, migration and installation

Hello. I really like architect. But I have a question.
In real life plugin can have many versions and can have some installation and migration logic (e.g Db schema can change). How to implement this in application based on architect.
Thanks for help.

Documentation omission

Is it worth mentioning that when a provided plugin is not a function, the register method sets a 'name' property. This could clobber any existing data if name was already in use.

Any support for Desktop, Windows/Mac native app?

I'm using c9.io since last 3 years, its one of the superb standalone application for Node.js for me. As Sometimes the browsers crashes and I lost the data and things, is it possible to have a open source Windows/Mac native app? I will be glad to contribute in any of the either platform.

Ref: Running c9 on Desktop

Cheers!

Is this possible to add namespaces for services?

Ok quick scenario

Lets say i want to provide a service as "db.mongo" and "db.mysql"

ok

lets say another plugin "app.users" consumes "db"

is it possible to render a object like

{db:{
mongo:$mongo_obj,
mysql:$mysql_obj
}}

but! lets say i only want to consume "db.mysql"

{db:{
mysql:$mysql_obj
}}

How to test an architect project ?

Hello,

What is the best practice to test an plugin with architect ?
Have you an example of test on a plugin ?

In fact, I have trouble in test of my plugins because it depends on other plugins...

Thank you in advance.

Logger instance option

Route all logging calls to a logger/console instance that can be set via an option to createApp(). If not set default to console and if set to null or false disable all logging except for errors.

Master branch does not build

I was trying to install cloud9 and when I do I get an error with your application. When I tried to DL your master branch and build it, I see the same error...

npm ERR! node -v v0.7.7-pre
npm ERR! npm -v 1.1.22
npm ERR! message No compatible version found: architect-socket-transport@'>=0.2.0- <0.3.0-'
npm ERR! message Valid install targets:
npm ERR! message ["0.3.0"]
npm ERR!

Any Idea what I am doing wrong?

enable disable plugin like cms plugin

hi,i would like to ask if it's possible to create a plugin manager to enable and disable the plugins like wordpresa,drupal?and do you mind to give an example?thanks a lot

Request for a couple more demo apps

I was hoping you could put together a couple demo apps that are not web focused, maybe something like a server that collects logs, parses them, and dumps them into a db. Or a TCP server listening for connections and responding. Just trying to get a feel for how that would look modularized with Architect.

New release?

Looks like this was synced with cloud9 version recently. Could a new release to npm happen? Thanks!

TypeError: Object #<Object> has no method 'modified'

Throws up this error ... . When i type http://localhost:8080/ I dont think the method Utils.modified exists in the connect 2.7.6 specified in the package.json.

/code/github.com/connect-architect/connect/middleware/static.js:184
if (!utils.modified(req, res)) {
^
TypeError: Object # has no method 'modified'
at /code/github.com/connect-architect/connect/middleware/static.js:184:18
at Object.oncomplete (fs.js:107:15)

Update NPM

PR was taken in last week but the NPM package hasn't been updated. Yipes!

Service find function

It would be nice to have a search function for services. Cloud9 has a lot of plugins, and to better understand the abilities of each service I need to know which plugin defines the service.

Please provide better docs and more examples

I have read the README.markdown and the examples and also the plugins/architect.log plugin source and i think i have a basic understanding of how to use architect.
But as far as I've seen there are some undocumented functions and namings.
What is a plugin? What is a service? What is a module?
How does register and unregister at runtime work? Maybe others?

If a better/complete documentation exists, others (like me) could write more and better examples or contribute in other ways.

How about a quick module to init a new package.json and .js file?

It's be nice to say something like architect create -name 'moduleOne' -dependencies 'dep1' 'dep2' 'dep3' -main 'module-one.js'

My project is growing to something like 50 modules so far and I find this creating of files to be a small distraction.

Any thoughts?

Entire application fails when one plugin fails to load

I found this problem (for me at least), in this module while using it in my application. When the application loads, and if loading of one plugin fails, the entire application fails. This is a considerable problem when you are developing a pluggable application where a set of developers implement the core of the applications and some others develop plugins for it. When one plugin fails, it affects the entire application.

I prefer if there's a way to only load the modules which were successfully loaded. And also +1 if I can get a list of failed modules so that I can display custom error log messages to identify them. I hope to create a fix for this and create a pull request if this issue seems sensible.

Unit tests

We need unit tests showing all usage options runnable via npm test.

This will help when updating cloud9.

Using `options`

Hey there, how do I use the plugin options? This is rarely documented. In particular I'd hope for a way to do IoC (I'd like to insert my current express instance via options to a plugin from my main.js).
Is this somehow possible? Heads up for the library, though you should really update the stuff from core 👍

Status

Hi,
I've gone through lots of different approaches when it comes down to organising large NodeJS apps and this one is by far the best one I've ever seen (probably just because I think exactly the same way about DI). The only thing I am worried about is the date of the last commit & the number of awaiting PR's to be reviewed / merged. Is the repo still production-ready & up to date or it's been deprecated? Thanks!

Another question (I will try to sort that out tomorrow) is - whether it's possible to include custom plugin-only dependencies in my package.json? Let's say I have 10 modules (each module declares passport strategy & rest links) and I don't want to pollute my root package.json with social media specific libraries like graph-fb or instagram-node.

And - the very last question - is 'register' callback capable of being invoked as async callback? Let's say I have database module and I want to register it only after successful connection with the database. So it means that other modules that consume it will have to wait till the connection is being established.

Unclear how to inject a node_modules module

If I want to inject, for example, the promise npm module. How is this achieved? Forgive me if this is an obvious question, I've watched the YouTube video and read the documentation to no avail. Just getting my feet wet with different DI in Node

Does this support events/filters?

Im looking for a plugin system I can use that will allow users to add functionality, and take advantage of events/filters that already exist in the application. I can see that Architect allows you to install plugins that add functionality that can be used by the system and other plugins, but does it allow you to add/apply filters? (WPs add_filter() and apply_filters() for example), or add/apply actions/events?

How to share the "consumed" services

Lets say i have plugin called "data-distribution" which consumes three services service1, service2,service3. In the "data-distribution" folder / plugin, there are other js files/modules are created. In one of the module of "data-distribution" needs to access "service1", how would it access it ?

so in other words, every single file has to be "plugin" (its own folder with package.json) or can it be some higher level plugin and all other can share the imported services ?

Project status

Hey,

Whats the status of this project? Are you guys still using it in production?

loadConfig should accept array of config, not just file path

Currently, loadConfig only accepts a file path. However, an equally reasonable approach is to pass the array of plugin definitions directly to loadConfig.

loadConfig supports a JS file, but it requires synchronous loading and return of the plugin list directly via module.exports, which may not be feasible in all applications.

Proposed change adds the following capability:

loadConfig(configArray, base, [callback])

  • configArray array of plugins to load with their configuration
  • base location to use as the base for plugins
  • callback an (optional) callback

PR inbound.

Add a way to mark some of the dependencies as optional.

usecase:

Cloud9 ace plugin reloads document when file on disk changes.
If diffing library is present, it can apply diff, to keep editor state like selection and folds.
But in case there is no diffing library, simply setting value is good enough.

Now adding dependency on diffing plugin, will break all configs using ace, and will require all of them to either include the diffing lib, or to include mock plugin as a fallback.

I think this is bad because it makes local change in ace plugin, into breaking change for all its consumers. But If optional dependencies were supported, only apps that needed diffing, would include it and it would only require one if statement in the ace plugin.

How can i pass extra options to a plugin from another plugin?

For example, i have a plugin that creates a database connection when given the hostname for the db server.

Now i want to have two connections to two different servers.

so from plugin1 i will consume database with hostname1
and from plugin2 i will consume database with hostname2

is it possible?

package.json provide before

it would be ideal to have a "before" under plugins.package.json

so one can tell a plugin to load before a provided plugin (if provided plugin is defined)

{
    "name": "auth",
    "version": "0.0.1",
    "main": "auth.js",
    "private": true,
    "plugin": {
        "consumes": ["database"],
        "provides": ["auth"]
    }
}
{
    "name": "auth-env",
    "version": "0.0.1",
    "main": "auth-env.js",
    "private": true,
    "plugin": {
        "before": ["auth"]
    }
}

this would allow plugin "auth-env" to register before "auth" without knowing "auth-env" is there,
and allow for testing and dev plugins without the main plugin knowing about it

Use of assertions

Hi there,

I am using the module but I am a bit confused how the assertions are used. As I see in the core project, you are using the assertions against the options object. For example, in the c9.core/client.js it is used like that:

assert(options.baseUrl, "Option 'baseUrl' is required") 

It is not used against imports though. For example, in the c9.vfs.standalone/standalone.js the preview handler it is imported like that:

var previewHandler = imports["preview.handler"];

What if a developer forget to add this dependency in the consume array? The previewHandler it will be undefined and it will break at runtime in this specific example. Why there is not an assertion like that:

assert(imports["preview.handler"], "preview.handler is required");

Is there something that I am missing?

How to access ready signal in plugins ?

Hello,

I have a question about ready signal. Is a way to access ready signal from plugin. When the whole app is ready I want a plugin do some stuff. Is it possible ?

Thanks !
Jérémie.

Create missing tags

We use architect version 0.1.11. However, there is no 0.1.11 tag in your git repository :( Please, can you create tag corresponding to the 0.1.11 ?

Unloading the plugins

I know this is unusual. Is it possible to add API for unloading a plugin?

Thanks!

Architect not working with webpack?

I am using webpack for a bigger project, and am evaluating architect as plugin system.
You are using __dirname in the demos. I found the problem because of that - webpack replaces __dirname with "/" - so it's unusable. But worse: even if using relative paths for the config file, architect does not find the file when usign webpack easily:
Using Architect.loadConfig("../config.js") does not work when config.js is in the ".." firectory of the calling file.

Have you got any suggestions how to deal with that? I'm sure you are using webpack or another bundler for C9 as well - how did you manage not breaking Architect here?

Unit testing architect-controlled modules

I just started moving some of my apps' modules into Architect, and I'm wondering if you have any tips about unit testing architect-controlled modules. Some logic can be exposed by setting module.exports.method = ... outside of the setup function, but what about modules that require registration before use?

I'm using Mocha for tests currently.

Shutdown event ?

Hi,

A simple question from a Node/Javascript noob : Dose Architect supports a "shutdown" event ?

Thank you in advance :)

How do you manage plugins ?

Hello,

I have a question about the management of your plugins in C9.
At C9, I think that you have multiples projects, with lots of plugins inside. And sometimes, you need to reuse plugin in another project. So :

  • Do you use npm private to save your architect plugins and reuse it ?
  • Have you a git repository per plugin you want to reuse ?
  • How do you resolve architect dependencies when using a plugin ? For example a plugin A with deps on B and C : How do you automatically get B and C when you import A in your project; With NPM ?

If a developper, not working at C9, have an idea on the question, i'm also interested in !

Thanks !

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.