[ALPHA] A web application framework for the modern age
Currently, the best way to get a working Neuro app installed is to simply clone this repository, type
npm install and begin running the generators. Start the Neuro server by typing
coffee lib/neuro.coffee. There will be an installer system set up in the future so Neuro can be managed over NPM.
Modern web applications are increasingly leveraging Ajax to build rich, clean user interfaces that respond "naturally" and allow for incredibly intuitive experiences. Sometimes, these applications will respond poorly or not at all under high pressure situations, such as when the server is being overworked or database configuration is preventing quick reads. In situations where a previously built Ajax-driven application is performing slowly, development teams are forced to reimplement hundreds of lines of code again, but this time in an entirely different (and sometimes less feature-rich) language. This can be taxing on your team, and quite expensive to say the least.
One solution that a number of teams have leveraged is to render in the browser, and process on the server. That may sound redundant, but it really does make sense. In Neuro, when a user makes a
GET request with the
GET request to the same resource, but this time using the header
Content-Type: application/json. With this request, the client retrieves the actual data for the page, and quickly inserts such data into the proper places on the template. On some servers optimized for HTTP/1.1 Streaming, it's even possible to simultaneously load these two
GET requests at once for a truly seamless web application experience.
Neuro is familiar to Node developers because it leverages some of the same technology you're already using.
config.middleware directive allows you to fully customize the middleware stack, giving you ultimate control over the HTTP request from the time it is given to the Node server to the time it responds back to the user. The Neuro application, in fact, is just another Connect middleware, and can be run alongisde other Neuro or Express apps on the same stack.
Neuro is heavily integrated with the Backbone MVC framework. In fact, Neuro models are just an extension of Backbone.Model, wrapped with direct database connectivity and some other high-level functions only available on the server side. The Backbone router is also pre-loaded with the directives from the Neuro router, giving the Backbone models immediate out-of-the-box RESTful routing and functionality. And finally, Backbone's Collection and View objects are also auto-generated based on the server-side implementation of the Controller. When you develop a Neuro application, you basically get a Backbone application for free.
Neuro will automatically compile your LESS stylesheets when the server starts and as it's running. It watches app/stylesheets for changes. You can place regular CSS files in here as well, and they will be available as static files on the server. Stylesheets can be loaded in the view layer by referencing their filename under the stylesheets/ directory (configurable in config/application.coffee with
Neuro supports the Eco templating language for the view layer. These template files are actually loaded on the client side in the combined
TDD helps you build better applications. When your framework gives you a really easy way to build these tests, its much easier to get started. Neuro's test case object wraps a number of existing test frameworks like Assert and Zombie, and allows for setup/teardown functionality to be run before a set of tests and afterward (respectively).
Neuro also supports the use of Jasmine for BDD in the
It's always more fun to hack away and experiment with new ideas when your framework gives you an easy way to rapidly prototype your ideas. Code generation lets you realize these new ideas in your app with ease, and Neuro's generators will give you all the code you need for the object you're trying to create. For models, this includes unit tests, and for controllers this includes view templates, stylesheets, helper function files and integration/functional tests.
templates/dir on the static server, process all data on the client side