RubyConf 2008: Waves: a Resource-Oriented Framework
Most Web application frameworks today focus on a single basic architectural style, a variation of the MVC architecture popularized by Sun. In many respect, MVC is fundamentally at odds with the intrinsic architecture of the Web itself, which is a resource-oriented model based on HTTP. This architecture forms the basis of REST and has been widely adopted, forcing Web frameworks to retrofit MVC to support REST. Meanwhile, rich client architectures are emerging that essentially migrate MVC to the client. Numerous other architectural styles are emerging, including view or template-oriented architectures, and distributed, highly-scalable models. All of these challenge the basic MVC premise for Web frameworks.
Waves addresses these variations with two principal innovations. First, requests are handled in terms of Resources, not a Controller. This better reflects the nature of HTTP and makes it easier to finely control how requests are handled. Second, Waves extends Ruby's Module concept by providing Layers, which allow elements of a given architectural style to be "mixed in" to an application like an ordinary module. For example, MVC is supported by including the MVC Layer along with an ORM Layer into your application module. Ultimately, Waves decouples the framework from the architectural style, providing developers with a rich development environment that does not include libraries they aren't using or dictating how to build their application.
This session will provide an overview of Waves and walk through building a simple application. The focus is on the resource-oriented nature of Waves and how we can support multiple architectural styles easily within the same framework. In particular, we will show how Waves can effortlessly support REST, rich client, and template-based architectures. We will also highlight key innovations in Waves, such as inheritable configurations and true code reloading, and discuss briefly how it compares to other emerging frameworks, such as Merb or Sinatra. Finally, we will discuss some of the key technical challenges we faced, how we overcame them, and the opportunities arising out of the continuing innovation within the Ruby community.
About Dan Yoder