Last modified: 2014-09-25 16:37:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46130, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44130 - Use real (logic-less) templates to generate HTML
Use real (logic-less) templates to generate HTML
Status: ASSIGNED
Product: MobileFrontend
Classification: Unclassified
Hygiene (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Jon
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-19 00:08 UTC by Juliusz Gonera
Modified: 2014-09-25 16:37 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Juliusz Gonera 2013-01-19 00:08:35 UTC
We could really use templates to untangle SkinMobile.php. Since we'll be using Mustache[1] templates in JavaScript (or specifically the Hogan[2] implementation), we could also consider using them on the server side.

Logic-less templates enforce separation between logic and presentation because you simply can not write any code inside them. Separate files for HTML and PHP code for the win!

[1] http://mustache.github.com/
[2] http://twitter.github.com/hogan.js/
Comment 1 Jon 2013-04-09 21:01:01 UTC
I've experimented with this and it's beautiful:
https://github.com/jdlrobson/Minerva/blob/evenmorevanilla/Minerva.php#L72

We should probably drive work on the skin and then create a RFC to see how people feel about bringing in an external library..
Comment 2 Michelle Grover 2013-04-28 17:13:37 UTC
Assigned Mingle Ticket https://mingle.corp.wikimedia.org/projects/mobile/cards/719
Comment 3 Gerrit Notification Bot 2013-06-20 19:22:52 UTC
Related URL: https://gerrit.wikimedia.org/r/69756 (Gerrit Change I742eb3587f3736a9c1932bc86ee59c4fe26ca434)
Comment 4 Jon 2014-09-25 16:37:22 UTC
We will be exploring this as part of the UI standardisation project (templating in core)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links