提高开发效率的12个最好的 Ruby 框架

jopen 9年前

1. Ruby on Rails

Ruby on Rails
Ruby on Rails is often referred to as ‘Rails’. It is an optimized and celebrated web application framework (open source) encoded in Ruby. It focuses on vital software engineering paradigms and engineering patterns. DRY (Don’t Repeat Yourself) and CoC (Convention over Configuration) are significantly accentuated in Ruby on Rails, which relies on MVC (Model View Controller) for systematizing application programming.

2. Padrino Framework

padrino
Padrino is a ruby framework built upon the excellent Sinatra Web Library. Sinatra is a DSL for creating simple web applications in Ruby quickly and with minimal effort. This framework tries to make it as fun and easy as possible to code more advanced web applications by building upon the Sinatra philosophies and foundations.

3. NYNY

NYNY
NYNY is unassuming, it has all the core stuff to get running, but nothing else. Your app is the framework. However, it’s trivial to extend NYNY via its extension interface. Each NYNY app is a Rack middleware, so it can be used inside of Sinatra, Rails, or any other Rack-based app.

4. Grape

Grape
Grape is a REST-like API micro-framework for Ruby. It’s designed to run on Rack or complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily develop RESTful APIs. It has built-in support for common conventions, including multiple formats, subdomain/prefix restriction, content negotiation, versioning and much more.

5. Nancy

nancy
Nancy is incredibly fast, being based Cuba and Sinatra. It has got the same route functionality that Sinatra has. You can ‘use’ to include Middleware. Enables mounting rack applications with ‘map’.

6. Remaze

remaze
Ramaze is a very simple and straight-forward web-framework. Ramaze works with any ORM and database toolkit. Sequel, Datamapper or M4DBI; the choice is all yours. If there is a database toolkit that somehow doesn’t work feel free to report an issue and it will be fixed. Ramaze can run on MRI, 1.9, Rubinus and JRuby. Odds are that if your Ruby installation works in a similar way such as MRI and 1.9 it will be able to run Ramaze.

7. Cuba

Cuba
Cuba is a microframework for web development originally inspired by Rum, a tiny but powerful mapper for Rack applications. It’s quite elegant, and has support for clean code that can be used to run tests. The philosophy of Cuba is to build web applications with as small amount of files as possible, while keeping everything global.

8. Camping

camping framework
Camping is a MVC web framework which is only 4kb in size, and its built so it stays around the same range. Its so small, it begs to question what it can do, right? The idea here is to store a complete fledgling web application in a single file like many small CGIs. But to organize it as a Model-View-Controller application like Rails does. You can then easily move it to Rails once you’ve got it going.

9. Scorched

scorched
Scorched is a generic, unopinionated, DRY, light-weight web framework for Ruby. It provides a generic yet powerful set of constructs for processing HTTP requests, with which websites and applications of almost any scale can be built. If you’ve used a light-weight DSL-based Ruby web framework before, such as Sinatra, Scorched should look quite familiar. Scorched is a true evolutionary enhancement of Sinatra, with more power, focus, and less clutter.

10. Celluloid

celluloid
Celluloid is a concurrent object oriented programming framework for Ruby which lets you build multithreaded programs out of concurrent objects just as easily as you build sequential programs out of regular objects. Celluloid provides a simple and natural way to build fault-tolerant concurrent programs in Ruby. With Celluloid, you can build systems out of concurrent objects just as easily as you build sequential programs out of regular objects. Recommended for any developer, including novices, Celluloid should help ease your worries about building multithreaded Ruby program.

11. Lotus

lotus
Lotus is Open Source Software, which strives for simplicity, fewer DSLs, minimal conventions, more objects, zero monkey-patching and the separation of concerns between MVC layers. It suggests best practices, but it leaves all the freedom to you, the developer, to build your own architecture, with your own objects. Lotus is made of standalone frameworks (controllers, views, etc.) and each one is shipped as an independent gem to emphasize the separation of concerns.

12. Sinatra

sinatra
Sinatra focuses away from the archetypal MVC (Model View Controller) systemization, which distinguishes it from other open source Ruby Frameworks. This DSL (Domain Specific Language) triggers development of small but unique web applications quickly and effortlessly, which establishes it as an optimum preference for quirky programmers.