npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

neuro

v0.0.1

Published

[ALPHA] A web application framework for the modern age

Downloads

16

Readme

Neuro

warning: this should be considered VERY ALPHA so don't expect it to work 100% of the time or at all

Neuro is a rapid web application development framework for Node.JS written in CoffeeScript (but accepting of both JavaScript and CoffeeScript apps). Its name comes from an analogy to Backbone.JS. Where Backbone provides the physical, tangible structure of a web application, Neuro provides its brains. Neuro bridges the gap between server-side and client-side programming by using a single language (JavaScript, or CoffeeScript if you prefer...) and sharing resources such as models and view templates between the two applications.

Usage

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.

Philosophy

Render in the browser, process on the server

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 Content-Type: text/html header, only the layout is rendered by the server. The rest is taken care of by the client-side JavaScript, which performs another simultaneous 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.

Leverage existing technology

Neuro is familiar to Node developers because it leverages some of the same technology you're already using.

Connect middleware

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

Backbone client-side MVC

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.

Dynamic themeing with LESS and [Bootstrap][bootstrap]

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 config.stylesheets_dir).

HTML templates with Eco

Neuro supports the Eco templating language for the view layer. These template files are actually loaded on the client side in the combined javascripts/application.js file.

Test-driven development with Assert and Zombie (or Jasmine)

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 spec/ directory.

Rapid prototyping

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.

Roadmap

  • Application generator should create empty Neuro application with similar directory structure to this repo.
  • Auto-generate Backbone.Models, Backbone.Router and Backbone.Collections from the Neuro.Models and Neuro.Router.routes defined in your application. Place in javascripts/application.js
  • Compile Eco templates when the server starts. Serve all views as templates from the templates/ dir on the static server, process all data on the client side