Home Projects Jobs Clientele Contact


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UU UI organization

Below are few thoughts on how we'll organize user interface part
of Universe University.

We'll follow classical MVC pattern.
- Role of Model will be played by database encapsulating classes
    (i.e. User, Topic, Course, etc.)
- Controller classes will be servlets, one servlet for each page
    (LoginServlet, RegisterServlet, SolveProblemServlet, etc)
- View classes will be created from CSP (C++ Server Pages)

Request processing:

- Controller receives request
- Controller accesses Model objects as needed, potentially
  altering model state
- Controller stores results in request context
- Controller determines which view to forward request to
  based on user preferences (think themes)
- Controller determines which language to render page in
  based on user preferences
- Controller forwards the request to the view object

Template organization:

Templates (CSP pages) will have identical names, and stored
in subdirectories named based on theme.

One thing I am currently very unclear about is i18n support
for templates: There are two possible approaches to this problem.
One is to have all interface strings to be explicitly retrieved using
something like _() gettext macro, like this:
Alternative is to modify CSP parser to do the substitution for us.

In both cases though there is still a problem: we cannot allow
UI strings in templates. Or rather, we cannot allow modifying them.
All templates should retain them exactly the same. It's somewhat easier
for the first case - HTML formatting will not have to be absolutely
At the same time, second case is lot easier to read.

Any comments/ideas will be appreciated.

Ilya A. Volynets-Evenbakh
Total Knowledge. CTO

Authoright © Total Knowledge: 2001-2008