Web Oriented Object Framework

User Guide (Version 0.5b4)

User Guide (Version 0.5b4)

The Model-View-Controller architecture

Woof! is based on the View-Controller components of the well known Model-View-Controller (MVC) architecture. A Google search on MVC web frameworks will turn up more than enough information for those who are not familiar with it so here we only present a (very) short summary.

In the MVC architecture, the application is divided into three components:

Naturally, there can be multiple instances of each of these components within an application.

Woof! currently provides the view and controller components of the MVC architecture. It is not clear that model component belongs to a Web framework although most other frameworks do include that component as well.

When a client request is received, its URL is mapped to an appropriate controller class. An instance of the controller is created to handle the request. The URL mapping also specifies an action (method in the class) to be executed by the controller. This action corresponds to a user request such as a transform to be applied to the model or generation of a different view. The controller class invokes the specified action method passing in any extracted parameters from the query. The action method then in turn invokes one or more methods on the model component.

The view component is a template corresponding to the controller and action that is processed to generate a Web page sent back as a response to the client. The template is a combination of static HTML layout and text with placeholders for dynamic data. The web page is generated by filling in these placeholders with the data provided by the model through the controller class.

The basic idea is straighforward, the key point being the clear separation of the presentation from the application logic.