Rad - Ruby Web Framework

Update: I abandoned Rad, links not work anymore.

Simple and highly customizable Web Framework encouraging to build an app as a set of low-coupled components instead of monolith. With an architecture heavily inspired by Rails, Spring IoC, JBoss Seam and JEE (but without config burden).

You can start instantly using one of predefined profiles, or take a total control over all aspects of environment and completely modify it according to your goals (everything is a component, if you don't like the router, controller or views - throw it out and introduce your own).

Usually, the first thing you want to now about some unknown framework: "where's the demo?" and "where's the sample?".

Here's some sites built with Rad:







And classic sample blog app rad-sample.heroku.com (it's hosted using free Heroku instance and sometimes it takes about 10sec to start up, so please be patient) sources github.com/alexeypetrushin/rad_sample

Goals behind this framework:

  • Divide and rule (build app as a set of cooperated components)
  • True support for OOP (models, controllers, polymorphic routes, plymorphic views)
  • Simple things should be simple (simple API, instant start with minimal config)
  • Complete control if you need it, it's designed to be open and customizable
  • Agile/Extreme development should be easy (specs, iterative development, fast prototyping)

Some thecnical thoughts and ideas:

  • I tried to keep codebase as small and simple as possible and delegate job do another libraries, so actually it's an integration layer on top of other libraries that focuses on providing nice and consistent interface.
  • It uses "conveyors" for assembling all kind of responces, and it's very easy to set custom assembly chain or modify existing one. This way you have a strong controll over wide aspects of framework.
  • So, it looks like lots of config? - No - there are predefined profiles and if you don't need special environment - just use one and start instantly. But if you ever would need a complete control - it is there.
  • I also tried to comply to KISS principle - always fighting complex stuff, seeking for not needed API or code that can be eliminated or delegated to external library.
  • I tried to reuse existing good stuff as much as possible, for example - web tier looks kinda like Rails (so, you don't have to learn much of new stuff and API) but the behaviour of it is slightly (or sometimes significally) different.

Why did I make another Rails?

There are many things that I like in Rails:

  • high productivity
  • simplicity, agility and iterative development
  • excellent and very usefull ruby extensions
  • nice and very handy API and naming conventions
  • no config and fast start with leaning learning curve

But, there are some problems:

  • there's only one way - The Rails Way, it's all simple and cool when you are on this way. But if you wanna to step aside and do it in your way - you'll get big problems, so big that they are almost completely eliminates all the goodness.
  • very hard to extend and customize
  • you forced to build monolithic applications, it's hard to build application as set of modules (partially fixed in Rails 3).
  • weak support of object oriented paradigm, there's really no true inheritance in Controller and Routing scheme.
  • hard to build distributed applications.

With Rad I tried to save all the goodness and use API as closed to Rails as possible but also give the developer freedom to choose it's own way and also solve those important problems.

Finished functional

  • Controllers (80% of Rails + new stuff)
  • Views (80% of Rails + new stuff)
  • Router (Polymorphic, Restful, Simple)
  • Migrations (MongoDB, multiple databases, versions, up/down)
  • Deployment automation (90% of capistrano + new stuff)
  • Mailers (80% of Rails)
  • Code reloading in :development
  • Asset packaging
  • MooTools support
  • Specs support (Controllers, Models + new stuff)
  • Console (nothing special, just like rails console)
  • and more ...