<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Voidnothings &#187; facebook</title>
	<atom:link href="http://www.voidnothings.com/tag/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.voidnothings.com</link>
	<description>From pixel to markup.</description>
	<lastBuildDate>Thu, 02 Sep 2010 02:30:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Facebook introduces XHP</title>
		<link>http://www.voidnothings.com/2010/02/facebook-introduces-xhp/</link>
		<comments>http://www.voidnothings.com/2010/02/facebook-introduces-xhp/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 04:19:20 +0000</pubDate>
		<dc:creator>Lance</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[frontend development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[templating engine]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[xhp]]></category>

		<guid isPermaLink="false">http://www.voidnothings.com/?p=232</guid>
		<description><![CDATA[Facebook again pushes the boundaries of PHP by introducing yet another tool,  just one week after announcing HipHop. This time, they introduce a new way of writing php code- XHP, the one they used on the Facebook Lite front-end. XHP does this by making PHP understand XML document fragments, similar to what E4X does for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.voidnothings.com/wp-content/uploads/2010/02/fbengineering1.jpg"><img class="alignnone size-full wp-image-239" title="fbengineering" src="http://www.voidnothings.com/wp-content/uploads/2010/02/fbengineering1.jpg" alt="" width="500" height="345" /></a></p>
<p>Facebook again pushes the boundaries of PHP by introducing yet another tool,  just one week after announcing HipHop. This time, they introduce a new way of writing php code- XHP, the one they used on the <a href="http://lite.facebook.com/" target="_blank">Facebook Lite</a> front-end.</p>
<blockquote><p>XHP does this by making PHP understand XML document fragments, similar to what <a title="http://en.wikipedia.org/wiki/ECMAScript_for_XML" href="http://www.facebook.com/note_redirect.php?note_id=294003943919&amp;h=eeab84845e9a1a0f8b96c2192ff008c0&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FECMAScript_for_XML" target="_blank">E4X</a> does for ECMAScript (JavaScript). While PHP is typically used to write front-end code, by itself it isn&#8217;t a very good language for generating HTML (as evidenced by the popularity of templating engines like <a title="http://www.smarty.net/" href="http://www.facebook.com/note_redirect.php?note_id=294003943919&amp;h=35161cce4c1736d4181c9d56455ecca4&amp;url=http%3A%2F%2Fwww.smarty.net%2F" target="_blank">Smarty</a>). XHP is something between a programmatic UI library and a full templating system&#8230;</p>
<p>&#8230;One last feature of XHP, which has been invaluable to us at Facebook, is that you can define your own elements which can condense a complex component into a simple XHP tag. XHP has a rich collection of declarations which let you define new elements, configure their expected attributes, as well as describe their <a title="http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3.3.1" href="http://www.facebook.com/note_redirect.php?note_id=294003943919&amp;h=18317e7536525dd8a7581d7e475d39a8&amp;url=http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Fintro%2Fsgmltut.html%23h-3.3.3.1" target="_blank">content model</a>. These features turn XHP into a powerful templating engine which is capable of simplifying complicated pages into easy to read high-level markup, but it&#8217;s up to you to create your own elements from the primitives that XHP defines&#8230;</p></blockquote>
<p>A thumbs up for Facebook, constraint really drives innovation.</p>
<p>You can read more about the <a href="http://www.facebook.com/notes/facebook-engineering/xhp-a-new-way-to-write-php/294003943919">official announcement here</a>, the <a href="http://wiki.github.com/facebook/xhp/" target="_blank">documentation</a>. Also, here&#8217;s a quick link to their open source repos on <a href="http://github.com/facebook" target="_blank">GitHub</a></p>
<p><strong>Update</strong>: Rasmus Lerdurf, the creator of PHP posted a quick note on <a href="http://toys.lerdorf.com/archives/54-A-quick-look-at-XHP.html" target="_blank">using XHP</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidnothings.com/2010/02/facebook-introduces-xhp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook is into Hiphop, PHP just got pimped!</title>
		<link>http://www.voidnothings.com/2010/02/facebook-is-into-hiphop-php-just-got-pimped/</link>
		<comments>http://www.voidnothings.com/2010/02/facebook-is-into-hiphop-php-just-got-pimped/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 19:22:41 +0000</pubDate>
		<dc:creator>Lance</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[hiphop]]></category>
		<category><![CDATA[hyperphp]]></category>
		<category><![CDATA[opensouce]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend server]]></category>

		<guid isPermaLink="false">http://www.voidnothings.com/?p=177</guid>
		<description><![CDATA[Now calling all PHP fanboys to rejoice finally. Facebook&#8217;s new toy is not a new compiler nor an engine, according to its creator it is a &#8220;source code transformer&#8220;, really funky right? After all its a crank from their previous hackaton around 2 years ago. So how does it work? The main challenge of the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.facebook.com/note.php?note_id=280583813919&amp;id=9445547199&amp;ref=nf" target="_blank"><img class="size-full wp-image-179 aligncenter" title="Picture 4" src="http://www.voidnothings.com/wp-content/uploads/2010/02/Picture-4.png" alt="" width="409" height="102" /></a></p>
<p>Now calling all <a href="http://www.rubyinside.com/holiday-fun-how-programming-language-fanboys-see-each-others-languages-2911.html">PHP  fanboys</a> to rejoice finally.</p>
<p>Facebook&#8217;s new toy is not a new compiler nor an engine, according to its creator it is a &#8220;<em>source code transformer</em>&#8220;, really funky right? After all its a crank from their previous hackaton around 2 years ago.</p>
<p>So how does it work?</p>
<blockquote><p>The main challenge of the project was bridging the gap between PHP and  C++. PHP is a scripting language with dynamic, weak typing. C++ is a  compiled language with static typing.  While PHP allows you to write  magical dynamic features, most PHP is relatively straightforward.  It&#8217;s  more likely that you see <code>if (...) {...} else {..}</code> than it  is to see <code>function foo($x) { include $x; }</code>. This is where  we gain in performance. Whenever possible our generated code uses static  binding for functions and variables. We also use type inference to pick  the most specific type possible for our variables and thus save memory&#8230;</p></blockquote>
<p>And what does it mean to web developers?</p>
<p>I think it&#8217;s pretty exciting! 50% performance increase is too good to be true! (90% of Facebook is running on Hiphop now) and for such a large scale deployment in just 6 months its really amazing.  Now you can forget purchasing that <a href="http://en.wikipedia.org/wiki/Zend_Server">Zend Server</a> and instead create a github account and consider following <a href="http://github.com/facebook/" target="_blank">Facebook&#8217;s Official GitHub Account</a> where they commit their open source projects.</p>
<p>You can read more about the <a href="http://www.facebook.com/note.php?note_id=280583813919&amp;id=9445547199&amp;ref=nf" target="_blank">Official Announcement</a> from the geek who made it.</p>
<p><strong>Update:</strong> While it is indeed exciting, there are a few caveats that every web developer should know before diving into HipHop. Here&#8217;s <a href="http://terrychay.com/article/hiphop-for-faster-php.shtml">an in depth explanation by Terry Chay</a>, He was invited by Facebook along with the biggest names on the PHP world to attend a super-secret conference a week before HPHP was announced.</p>
<p>If you&#8217;re interested, you might want to check the official <a href="http://groups.google.com/group/hiphop-php-dev">developer mailing list</a> of the project on Google Groups.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidnothings.com/2010/02/facebook-is-into-hiphop-php-just-got-pimped/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
