Separation of an applications user interface from its functionality has two main advantages:
- Flexibility in allowing the functionality to be presented in several ways; eg. using forums as a news and announcements list.
- Encapsulating local installation ui customisations in a separate package from the functionality providing clear separation and lower maintenance overhead.
I propose that applications should in general be split into two which would provide the advantages above:
- The first package containing the datamodel, tcl api and reusable includes in package-key/lib.
- The second containing mainly user viewable pages which form the ui but allowing small extension datamodel and tcl functionality.
The main issues with doing this that I have thought of so far are:
- Converting the ui of existing packages to re-usable includes according to some conventions that amount to a design pattern.
Proposed solution: This would have to be a gradual process with packages being updated as people found time.
- Making package installation work and the mount points make sense. Application functionality packages would not be able to rely on the fact that they are
mounted and would need some way to find out where their ui is mounted.
Proposed solution: A mapping service would relate package instances to their ui instances (maybe allowing more than one?)
- Conversely a ui package would not be able to rely on ad_conn in its current form and would need some way for getting it's functionality package.
Proposed solution: The mapping service above.
Proposed solution: Any package converted to this approach would provide a default ui in its own www directory.
I'm working on a project which ideally would like to use the forums package with two different customised ui's so I'm looking for ways to keep the long term maintenance overhead as low as possible.