Home Projects Jobs Clientele Contact


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

Re: UU UI organization

I can comment on the internationalization issue.
I delt with several online stores where all text strings in templates were
variables, appropriate language was displayed based on <%=language%>
parameter which was passed to each template using query string. They
didn't contain any html in it, all HTML tags were in templates. If I
needed to modify any text in any language, I changed properties files on
the server where UI strings were kept(or it could be done in DB, I guess)

> 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:
> <HEAD><TITLE><%=_("Moooo")%></TITLE></HEAD>
> 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
> identical.
> At the same time, second case is lot easier to read.
> Any comments/ideas will be appreciated.
> --
> Ilya A. Volynets-Evenbakh
> Total Knowledge. CTO
> http://www.total-knowledge.com

Authoright © Total Knowledge: 2001-2008