The SAIL VLE has a concept of a view system. Currently there are 2 implemented view systems.
Definition
A view system is a extensible way of displaying a view of a part of the Content Model.
Common Examples
Browser Plugins
Plugins in a browser are examples of the extensions of the browsers view system. A plugin is installed and then after that html pages (the browsers content model) can include elements that are viewed by the plugin. An example is the flash plugin or the svg plugin. A plugin must implement a specific api to work inside of the browser.
Eclipse Views and Editors
Eclipse has a concept of views and editors. These are implemented by Eclipse plugins. They must implement a specific api, and mapped to types of data objects. They can then be added and removed by the user, and display information about the current selected object.
MVC in web applications
Struts, Rails, Spring and many more use a MVC View System. These systems have a map from a url which is a reference to the content model. The map links together a controller, model, and view. The combination of the controller and view are used to display the content model.
Common Features
Extensible through an api
View Systems are extended by adding in new view implementations. The new view needs to implement a particular api. And typically that api also gives the view access to services provided by the View System.
Mapping or Lookup from Content Model reference to View implementation
The view system needs a way to find or lookup the view implementations that have been added to it.
- In browser plugins this is done using an id or url in the <embed> or <object> object tags in the html.
- In Eclipse this is done through registering the view with other plugins. This registration links the view to a particular data type.
- In MVC web applications this is done through a mapping object or routes file. This takes a url, the HTTP request type, and possibly additional HTTP headers and links it to a controller, and possible view and model.
Current SAIL View Systems
There are 2 systems in use by developers using SAIL. There is the Pas system, and the OTrunk View System.