Total Knowledge Projects Jobs Clientele Contact

UU Templates

Personal tools
From Total Knowledge
Revision as of 14:06, 1 July 2008 by Iluxa (Talk | contribs)
Jump to: navigation, search

Contents

Intro

Image:HiLevelArch.svg
High-level architecture diagram

UU 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)

Alexey thinks that assignment of roles is slightly different: Model is database schema itself, and controller is a set of stored procedures in database that work with data. View, in that case, is all of the C++ code (both servlets and themes).

I guess at this point his view of roles is closer to reality then my original proposal.

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

Template mappings

Templates (CSP pages) will have identical names, and will be mapped to subdirectories named based on theme.

I18N support for templates

All interface strings will be explicitly retrieved using something like _() gettext macro, like this: <HEAD><TITLE><%=_("Moooo")%></TITLE></HEAD> We will provide tools to automate message catalogue creation and translation for templates.

Theme management

Theme management tool provides following functionality

  • Compile and install a theme
  • Create a skeleton for a new theme
  • Set default theme for UU instance