A Nodejs framework for creating awesome things.
Status and current work on Trello
- Easy to install, use, modify, adapt and refactor
- Modular and lightweight components that are useful independently
- Strong cohesion where things change at the same rate, loose coupling where things change at a different rate
- Few concepts needed in any one area of the code to keep mental effort of development low
- Domain-driven design
- Event sourcing
- Command and Query Responsibility Segregation
- Event-driven architecture
- UI composition
- Single-page applications
- Schema-less database
- Dependency injection
Fork odo example
There are two types of code in Odo: infrastructure and plugins.
Tools, frameworks and techniques make up the odo infrastructure. Using existing 3rd party frameworks and libraries is prioritised over custom development. Where existing frameworks are not available small independent utilities have been written.
The goal of any infrastructure code is to accomplish one goal, do it well and have few touch points with any other code.
Plugins are independent features of the application loosely coupled to other plugins to make up the whole application. Usually plugins communicate through a combination of dependency injection and events.
Backend plugins can run in three contexts: web, domain and projection. This technique allows the web code, database logic, and validation rules for a particular piece of information to exist in the same codebase but run in three different contexts. Having all aspects in the same codebase increases speed of development and still provides good decoupling between concepts.
Frontend plugins are registered by backend code. They have the ability to register themselves against several hooks - most importantly single page application routes through durandal.
All of odo uses require.js to pull together plugins and components. In the backend node.js's require function is passed into require to include npm modules.
The root component to requirejs into your web application to setup an express website. Web plugins are given an opportunity to register against different parts of express to define routes and extend the express system.
A component to requirejs into your code to access the top level configuration json file. Use that file to store environment specific settings and other pieces of information you don't want in source control.
A component to requirejs into your application to setup and connect to an eventstore. Exposes an extend method to add methods and properties to an aggregate object to support event sourcing and the CQRS pattern. Uses the eventstore library.
A component to requirejs into your application to create a CQRS hub that is connected to redis. Bind event listers through the exported receive method and bind command handlers through the exported handle method. Use send and publish to send commands and publish events.
A component to help load other plugins. Provides web, domain and projection methods that call the same named method on an array of plugins passed to it's constructor.
Provides a sendcommand endpoint to make it easy to create commands from the web.
An express plugin to host the /bower_components directory so anything you've installed with bower is available to the web. Also provides the inject library to the front end for UI composition.
An express plugin to host the contents of /odo/durandal/public to the web so the custom durandal components can be used by your odo durandal application. This includes dialogs, wizards and many extensions to the durandal system.
An express plugin that provides urls and methods to authenticate a user with passport and passport plugins. Custom local, twitter, facebook and google passport plugins have been provided.
- Tapinto (tap into classes and methods)
- Injectinto (dependency injection)
- Peekinto (ui composition for express)
- Fetching (fetching strategies)
- Requirejs (dependency injection)
- Express (http server)
- Redis (storage)
- Passport (authentication)
- hub.js (messaging)
- Q (promises)
- node-uuid (guids)
- js-md5 (md5 hash)
- eventstore (event sourcing)
- Requirejs (dependency injection)
- Durandaljs (single page app)
- Knockoutjs (mvvm in browser)
- Knockoutjs Validation (validation)
- jQuery (dom manipulation)
- Q (promises)
- Bootstrap (scaffolding)
- Animate.css (css animations)
- Mousetrap (keyboard shortcuts)
- node-uuid (guids)