SUI

From ESEwiki

Jump to: navigation, search

SUI stands for "Smart User Interfaces". This library tries to be a very high-level user interface builder, which replaces widget positioning by pure data modeling.

Of course, widget positioning may be important, but it's a separate concern and will be implemented later with some sort of "rules" (Strategy Design Pattern).

SUI has its roots in SmartFactor, an old project that was meant to work as well on low-end VT100 as on recent windowing systems without changing much of the code. To achieve such a feat, the system is split into two layers:

  • the abstract layer, used by clients, manages the user interface data;
  • the implementation layer, used by the abstract layer, manages the real interface display.

In fact, those two layers form a classic Bridge design pattern.

Contents

The abstract layer

This layer has only abstract data management types:

There is also a special class, SUI, which manages the interface life cycle. It allows to select an implementation (via the creation of a factory) and start displaying data. This class is expanded for ease of use.

The implementation layer

This layer takes in charge the real widget positioning and data displaying. It is made of two parts:

  • the interface which is used by the abstract layer
  • the implementations, one for each kind of interface. Those implementations are:
    • console: pure 80x25 text
    • dialog: newt-based (does not support text areas)
    • hexes: ncurses-based (hexes are Smart Curses)
    • graphic: Vision-based (still to do)
    • web: Web-based

The Console layer

The Dialog layer

The Hexes layer

The Graphic layer

The Web layer

The web layer uses special technology to allow many users to access the same forms. In fact the program is multiplexed in as many processes as there are connected users. Unlike other languages, there is no notion of "session", or rather, the session is reified by the process.

Personal tools