Skip to content

ajhenriques/protos

 
 

Repository files navigation

Protos Build Status

Protos is an open source Web Application Development framework, focused on high performance, integration, ease of deployment, maintainability and security. Protos runs on UNIX-like systems such as Linux & Mac OSX. Windows support might be added in the future.

Note: The framework is under moderate development and the API and internal methods/functionality may change. The documentation may also contain topics that have been removed, and may not contain all the features the framework provides.

Features

  • Powerful Routing
  • Controller Authentication & Route Filters
  • RESTful Methods support
  • Environment based Configuration
  • Fast Configuration with bootstrap file
  • Multi Core Cluster support
  • Easy Deployment with JSON or Command line
  • MongoDB, MySQL & Redis Development Stack
  • Application Helpers
  • Application Models supporting ORM & Relationships
  • Database Drivers & Storages
  • Built-in Query Caching for Drivers & Models using NoSQL Storages
  • Built-in Support for multiple Template Engines
  • View Partials Support
  • JSON Responses Support
  • Custom & Dynamic Headers
  • Built-in & Adjustable Cache-Control settings
  • Built-in Proxy Server for Applications
  • Built-in Node Inspector for debugging
  • Executable used to create/manage/deploy applications & servers
  • Full Suite of Functional tests
  • Organized Application directory structure

Development Stack

Protos provides a set of APIs that allow the framework to be extended in all sorts of ways. Use it either to contribute new functionality & components to it, or to enhance it with the needs of your team/organization.

Drivers

You have at your disposal the Database Drivers, which provide a common set of methods to operate the backend database, implementing the Models API, which allows the Driver to connect with Models.

Storages

Storages are used for caching, session data and anything you can think of. These abstract databases with fast read/write operations, such as MongoDB and Redis. Storages are also used as the caching layer for Drivers on the Query Cache functionality.

Models

Models use Drivers under the hood to handle the low level manipulation of their data. They provide automatic validation of data. You can set your own validation rules with ease on a per-model basis.

The Models can relate with eaach other by using Relationships. These are used to connect models in specific ways, storing only the references to their related models. You can then retrieve the related models either individually, or in groups.

Each relationship add a set predefined methods using a common convention, that help you maniuplate the relationships between the model objects you're working with.

Model (and Relationships) database-agnostic, you can change the underlying database driver used by the model, and no changes are required. This means you can use a database backend for development, and another for production (just to give an example). No changes needed on deployment.

Overview

Here's the Development Stack the framework provides, in a nutshell:

  • Drivers   MongoDB, MySQL
  • Storages   MongoDB, Redis
  • Models   Use any Driver supported
  • Query Cache (Drivers)   Use any Storage supported
  • Query Cache (Models)   Handled by underlying Driver
  • Caching   Use any Storage supported
  • Sessions   Use any Storage supported
  • Response Caching   Use any Storage supported
  • Logging   MongoDB, Redis (additionally File, Console via Middleware)

To install the driver & storage component dependencies, use the protos install <component> command. For a full list of components and their dependencies, see the dependencies.json file.

Middleware

The Application's functionality can be extended with the following (ready to use) components:

  • asset_compiler   Compiles LESS, Stylus and CoffeeScript, Supports Watch/Compress/Minify.
  • aws   Amazon Web Services support. Provides clients to all services (ES3, EC2, etc)
  • bcrypt   Blowfish encryption support
  • body_parser   Parse request bodies and file uploads in POST/PUT requests
  • cookie_parser   Parse cookie headers, Integrates with Sessions & Auth
  • csrf   Cross-Site Request Forgery protection, integrates with Controller Validation
  • logger   Application/Request logger, supporting several transports such as MongoDB, Redis, File & console
  • mailer   Send email using SMTP, Amazon SES or Sendmail
  • markdown   Parse markdown syntax
  • production_url   Remove port number from application-generated URLs
  • redirect   Quick redirection support (useful for "maintenance mode")
  • response_cache   Response caching into supported Storages (Redis, MongoDB, etc)
  • session   Full session support with Storages, guest sessions and regeneration
  • shortcode   Allows custom content to be inserted into views using shortcodes
  • socket_io   Socket.io Integration with applications
  • static_server   Complete Static Server solution, supporting Ranges, Conditional GETs, etc.

To install the middleware dependencies, use the protos install <middleware> command. For a full list of components and their dependencies, see the dependencies.json file.

Template Engines

There is a lot of flexibility when it comes to template engines. To use a view engine, just add the extension to the template and you're set. You don't need to install any npm dependencies.

View Partials can be used across template engines. This means you can use Jade partials within Swig templates. Or CoffeeKup partials within EJS templates (and vice versa). There are a few exceptions with mustache engines (due to their logicless nature), such as Hogan and Handlebars.

You are not limited by the default view extensions the framework provides. You can specify your own view extensions in the application's configuration.

The following view engine components are provided by protos:

To install the engine dependencies, use the protos install <engine> command. For a full list of components and their dependencies, see the dependencies.json file.

License

Copyright (c) 2012, Ernesto Méndez (github.com/derdesign)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Resources

About

Web Application Framework for node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published