top | item 4261589

The open-source node libraries powering Cloud9

14 points| mattpardee | 13 years ago |c9.io | reply

4 comments

order
[+] tlack|13 years ago|reply
Architect is an interesting concept. I had thought about doing something similar using EventEmitter as a kind of "plugin bus" between different parts of the app. Has anyone who has used something like this for complex sites comment on implementation strategies and how they grow with age?
[+] creationix|13 years ago|reply
The neat thing about architect is that some plugins provide "services" or named APIs and other plugins consume such named APIs. It's interface oriented programming. The service names are simple short strings and that's why architect has a feature to alias services should name conflicts arise.

Using pure events works too (as does dnode and smith), but for large projects they tend to get hairy. Architect separates concerns into defined interfaces provided by configurable plugin instances. It keeps things clean and configurable.