Right now we are about to implement some kind of basic template Engine
to share HTML on the server side as well as on the client side in
JavaScript. Basically this will be a bunch of HTML snippets which we
will put into a resource loader module and send to the client. The
snippets will need some kind of placeholder which can then be replaced
with different content. The replacement would be done by some basic
parser which had to be implemented in PHP as well as JS.

One thought was to simply use the MW message system for this. The
templates would of course get their own store, but the message parser
could perhaps be reused. $1 etc. could be used as placeholders and
even nice-to-haves such as PLURAL or {{int:}} would work out of the
box.
>From a first look, it could be as easy as overwriting
Message::fetchMessage in as subclass.
Off course it had to be taken care of the JavaScript side as well.
Doesn't seem like mw.Message would be a problem.

Any thoughts on this or does anyone know about some similar
implementation in any extensions?

Cheers,
Daniel

-- 
Daniel Werner
Software Engineer

Wikimedia Deutschland e.V. | Obentrautstr. 72 | 10963 Berlin
Tel. (030) 219 158 26-0

http://wikimedia.de

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das
Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985.

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to