Beginning of XHP implementation.

Review Request #183 - Created Jan. 15, 2012 and updated - Latest diff uploaded

Information
Bogdan-Cristian Tătăroiu
infoarena
Reviewers
hackers
Implemented base structures that are used to render the website's
frame. Converted everything which was in views/header views/footer
and views/sitewide into xhp objects and added a method in
www/utilities which composes an <ia:page> object with the site's header
sidebar and footer in place. Views can then append a <ia:content> child
containing the page specific content and render the entire page. All
current views still use the legacy execute_view method, which renders
the main content in a buffer, adds it to a <ia:content> and uses
<ia:page> for the site's frame.

XHP objects are places in www/xhp/{namespace}/{object}.php. The
standard XHP library provided by Facebook is added in www/xhp/base.
Reusable widgets should use the ui namespace. This is where most
of the features provided by format_* can be added. Other widgets,
such as the website's sidebar, which is not reusable should use the
ia namespace.

As a coding style note: indent is still 4 spaces for normal code.
Elements inside a xhp object are indented using only 2 spaces, which
makes the code more readable.

There are some hacks in this patch, but fixing them would require
some big changes and this diff is already pretty huge. Adrian
has expressed a lot of interest in XHP and will likely take over
from this point.

This patch was written about three weeks ago so I might be missing
stuff in this review description. :D

Loading...