Padrino is the godfather of Sinatra.
Padrino is a ruby framework built upon the excellent Sinatra Microframework. Sinatra is a DSL for creating simple web applications in Ruby with speed and minimal effort. This framework tries hard to make it as fun and easy as possible to code much more advanced web applications by building upon the Sinatra philosophies and foundation.
Many people love Sinatra’s simplicity and lightweight but often quickly come to miss a great deal of functionality provided by other web frameworks such as Rails when building non-trivial applications.
Our goal with this framework is to match the essence of Sinatra and at the same time create a standard library of tools, helpers and components that will make Sinatra suitable for more complex applications.
Here is a brief overview of functionality provided by the Padrino framework:
- Agnostic
-
Full support for many popular testing, templating, mocking, and data storage choices.
- Generators
-
Create Padrino applications, models, controllers i.e: padrino-gen project.
- Mountable
-
Unlike other ruby frameworks, principally designed for mounting multiple apps.
- Routing
-
Full url named routes, named params, respond_to support, before/after filter support.
- Tag Helpers
-
View helpers such as: tag, content_tag, input_tag.
- Asset Helpers
-
View helpers such as: link_to, image_tag, javascript_include_tag.
- Form Helpers
-
Builder support such as: form_tag, form_for, field_set_tag, text_field.
- Text Helpers
-
Useful formatting like: relative_time_ago, js_escape_html, sanitize_html.
- Mailer
-
Fast and simple delivery support for sending emails (akin to ActionMailer).
- Admin
-
Builtin Admin interface (like Django)
- Logging
-
Provide a unified logger that can interact with your ORM or any library.
Reloading:: Automatically reloads server code during development.
- Localization
-
Full support of I18n language localization and can auto-set user’s locale.
Keep in mind, the user will be able to pull in these components seperately into existing Sinatra applications or use them altogether for a comprehensive upgrade to Sinatra (a full-stack Padrino application).
To install the padrino framework, simply grab the latest version from gemcutter:
$ sudo gem install padrino
This will install the necessary padrino gems to get you started. Now you are ready to use this gem to enhance your sinatra projects or to create new Padrino applications.
For a more detailed look at Padrino installation, check out the Installation Guide.
Padrino is a framework which builds on the existing functionality and Sinatra and provides a variety of additional tools and helpers to build upon that foundation. This README and Padrino documentation in general will focus on the enhancements to the core Sinatra functionality. To use Padrino, one should be familiar with the basic usage of Sinatra itself.
You can also check out the Understanding Sinatra guide to learn more about these fundamentals.
For information on how to use a specific gem in isolation within an existing Sinatra project, checkout the guide for Using Padrino in Sinatra.
Once a developer understands Sinatra, Padrino is quite easy to get comfortable with since Padrino is simply a superset of existing Sinatra Functionality!
Best way to get started with building Padrino applications is to read following resources:
-
Padrino Guides - Guides outlining the major functionality within Padrino.
-
Blog Tutorial - Step-by-step guide to building a blog application with Padrino.
-
Padrino RDoc - Rdoc documentation for the Padrino framework.
-
Quick Overview - Outlines basic generation commands.
The individual Padrino sub-gems also contain README’s which outlines their functionality.
Copyright © 2010 Padrino. See LICENSE for details.