Owen,
That's really nifty actually -- can you talk a little about how y'all manage the i18n issues? Do you prerender all the messages outside of the template? Or do you use Mustache lambda's to do some formatting inside the template itself?
Additionally, where and how do you draw the line between using a template, and having additional logic outside of the template?
I'm also curious how you manage the coupling between layers -- do you pass in all variables to all templates; or is there some sort of management / documentation layer that specifies what data (and what format the data needs to be in) should be provided to a template.
~Matt Walker Wikimedia Foundation Fundraising Technology Team
On Fri, Dec 27, 2013 at 6:44 PM, Owen Davis owen@wikia-inc.com wrote:
Ha. Well, we’ve been using mustache at Wikia for a while, but not heavily. The backstory is that we’ve written approximately 270 extensions over the years and we have written a few simple frameworks to keep that code manageable. One of those things is a pseudo-mvc framework. The template itself is not an object, and it can be either a PHP or mustache template. A mustache template has more limitations, but in many cases it is sufficient and in general I feel like it’s a better idea to just pass data to a simple template rather than having a lot of logic in the template. Additionally, being able to share the same template between front end and back end has advantages.
In my opinion, backwards compatibility with the existing quick template stuff is impossible to avoid, so retaining a PHP option is essential but the mustache option gives a lot of power to the front end developers which is where a lot of the work is being done now…
For example, the modal dialog that pops up at the end of the new wiki creation process is a mustache template:
https://github.com/Wikia/app/blob/dev/extensions/wikia/CreateNewWiki/templat...
On Dec 27, 2013, at 8:41 AM, Niklas Laxström niklas.laxstrom@gmail.com wrote:
2013/12/27 Tyler Romeo tylerromeo@gmail.com
If we want a comprehensive templating system in PHP core,
I want a templating system that can be used both in PHP and JavaScript
and
fits in our way of doing i18n. And a bunny.
-Niklas _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l