The Waves Architecture

Waves follows a few simple design principles, which are probably worth noting up-front.

  1. Keep code compact and extensible.
  2. Leverage the expressive power of Ruby.
  3. Configuration and convention.
  4. Loosely couple major design components.
  5. Use best-of-breed solutions.
  6. Preserve architectural choice.

The Waves Stack

Waves is runs on a state-of-the-art application stack, although remarkably it is not really tied to any single solution, except possibly Rack. That makes sense: Waves is a framework for building Web apps, and Rack is a framework for frameworks like Waves. Other than that, it depends on what application you’re building. That said, Waves does tend to favor some libraries over others, especially at this young stage of its development.

Web Server

Rack provides the HTTP processing engine. This provides Waves with a easy-to-configure processing pipeline, via Rack’s middleware, plus support for most major Ruby Web servers, via Rack’s handlers.

Data Storage

Sequel is the preferred ORM at the moment because it supports migrations and because it supports the use of plain old Ruby for defining queries, but it would only take minor changes to support DataMapper or other ORMs. Again, the need to be able to support these different configurations has led me to initially constrain them.

Coming soon: DataMapper and Filebase.

Template Engines

At the moment, Waves supports only two templating engines: Markaby, which given that it is actually Ruby code was a no-brainer for inclusion, and Erubis, which is useful for all those times when the structure of Markaby is a bit too much, or your not generating HTML.

We’ve also recently added HAML support.

Runtime Support

Waves supports ruby-debug and provides true code reloading and just-in-time generation using AutoCode. Coming soon: support for LiveConsole.

Testing And Debugging

This is an area that has not been addressed with Waves. You can use whatever testing approach you prefer. Waves doesn’t favor any approach – it doesn’t even generate a tests directory for you at this point when you generate a new application.