Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Overview

Akber Choudhry edited this page Aug 14, 2013 · 3 revisions

Design Overview

** Some of the design is not implemented at this time **

Server

Servers are all unique combination of hosts and ports defined in Site configurations and are automatically started as site configurations are loaded.

By default, the admin server will bind to the loopback interface (localhost or 127.0.0.1 or ::1) and port 8080. This default can be changed in the Admin Site configuration. This server will always be started unless there is a port conflict.

Site

A site has a unique combination of host, port and context. If a site has been configured at a certain host, port and context, another site with the same combination will not be loaded and an error will reported to the Console.

For example, a site on http://www.example.com/site1 is completely independent of http://www.example.com/ and also independent of http://www.example.com/site1. In this example, www.example.com is the host and /, /site and /site2 are the contexts.

Two types of sites are supported: Web and REST.

  • A site can have independent content and data storage -- or -- it can share all or some of its data and content with another site.
  • A site can only have some of the plugins available to the system enabled for itself. The system will take care of dependencies and issue a warning if there are dependent plugins.
  • A site configuration can override individual configuration items in a plugin configuration.
  • A site can be stopped and re-started without re-starting the system.

Plugins

Most of the built-in functionality of the system is provided through plugins. The core module co-ordinates plugins and the api module provides the extension points to write your own plugin.

Plugins can provide any combination of the following:

  • Web routes: For example, the main HTML content generated by the URL http://www.example.com/site1/posts/post-i2 will be generated by a route in the plugin posts that knows how to dig up the content for post #12 and send it back.
  • Themes (a type of Resource): will take the generated main content, put it as a fragment into a region and then surround it with other regions (as configured) like header, footer, navigation bar, etc. After a page builds, themes also provides the images, stylesheets (CSS) and Javascript (JS) that makes the page look nicer.
  • Templates (a type of Resource): are used to render content into a HTML fragment. Usually, a theme will provide the full-page template and a template for each region that it defines. However, a plugin may also provide a template for a special type of content that only it knows how to render, for example, a picture gallery.
  • Services: do not have anything to do with a Web page. They are internal services that plugins call on each other to get their jobs done. Examples are translation, zipping up files, etc.
  • Contributions: this is the most powerful feature of the system and is based on the 'hook' concept in Drupal. It has two aspects:
  • A plugin specifies how other plugins can contribute to it. For example, the help plugin may allow other plugins to show their help links and screens through it. It will define a HelpContribution. It can choose when to call for contributions and then choose to ignore, change or re-format the contributions from other plugins.
  • Plugins that are interested in contributing to a defined Contribution of another plugin can implement the methods of contribution and they will be called as needed.

Plugins can have their own default configuration, which can be edited and customized for each site.

A plugin is a Ceylon module and can be loaded from local or remote repositories.

Clone this wiki locally