<?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>php&#124;architect - The site for PHP professionals &#187; Fabien Potencier</title>
	<atom:link href="http://www.phparch.com/tag/fabien-potencier/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phparch.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Fri, 10 Feb 2012 15:11:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>phpDay 2010 international talks</title>
		<link>http://www.phparch.com/2010/05/phpday-2010-international-talks/</link>
		<comments>http://www.phparch.com/2010/05/phpday-2010-international-talks/#comments</comments>
		<pubDate>Thu, 20 May 2010 16:58:53 +0000</pubDate>
		<dc:creator>Marco Tabini</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Fabien Potencier]]></category>
		<category><![CDATA[gearman]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpDay]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5442</guid>
		<description><![CDATA[Fabien Potencier and other international speakers made their talks at phpDay 2010, which are now available online.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/05/thumb.php_.png"><img class="alignleft size-full wp-image-5444" title="thumb.php" src="http://beta.phparch.com/wp-content/uploads/2010/05/thumb.php_.png" alt="" width="150" height="150" /></a>Friday 15th has been the central part of the <a title="phpDay official site" href="http://phpday.it">phpDay</a> Italian conference, and the most intensive one, in which the international speakers made their long awaited talks (and whose videos are available online).</p>
<p>In the morning, <a href="http://twitter.com/dustinwhittle">Dustin Whittle</a> from Yahoo! presented YQL, a SQL-derived language that can be used to access hundreds of web services. The Yahoo! platform translates SQL-like queries (such as SELECT, UPDATE and DELETE) into requests, eliminating the need to learn a new API for every different service to integrate in the PHP application. Whittle also talked about the open source platform the teams at Yahoo built, which includes PHP in the front end.</p>
<p>Meanwhile, <a href="http://twitter.com/danieleteti">Daniele Teti</a> explained the process of Continuos Integration for PHP applications in one of the most crowded sessions here at Corropoli. This year&#8217;s topic, quality, has influenced the choice of talks which have been widely considered interesting.<br />
<a href="http://twitter.com/fabpot"></a></p>
<p><a href="http://twitter.com/fabpot">Fabien Potencier</a> also gave his talk on Dependency Injection in the last morning session. The symfony project leader built from scratch a Dependency Injection container using PHP 5.3, while at the same time demonstrating anonymous functions and closures. He said he wants to bring PHP to the next level, and he now preaches Dependency Injection as he was pitching the use of frameworks and the adoption of testing in the last years.</p>
<p>The three tracks of the conference are loosely connected, so that talks from different tracks usually do not overlap the same development field (for example Windows-related talks are grouped in the same track every day.) Though, lots of people would have split in two to follow both Fabien Potencier and Dustin Whittle and their absorbing sessions.</p>
<p>About the PHP on Windows track, the Microsoft guys have done a good job in showing how the attitude of their company towards PHP has radically changed. PHP is now seen as an empowering tool instead of a menace to .NET, and Microsoft demonstrates his support for PHP on Windows Server with WinCache (the equivalent of Apc) and the SQL Server driver for PDO. The evangelist of Microsoft Italia <a href="http://twitter.com/pietrobr">Pietro Brambati</a> has also announced the <a title="Windows, IIS, PHP user group" href="http://wippy.grusp.org/">creation of an Italian user group</a> dedicated to support PHP applications on IIS.</p>
<p>One of the most eye-opening talks was held by <a href="http://twitter.com/felixdv">Felix De Vliegher</a> (from iBuildings), who showed a set of use cases and PHP client code for Gearman. Gearman is an open source daemon to dispatch processing requests to a list of nodes (workers), and it is supported in PHP both as an PECL extension and as a PEAR client library. The use of Gearman can aid PHP scripts in dealing with intensive tasks which should be offsourced to other machines to offer a prompt response to the user.</p>
<p>Remember that all the slides from the conference <a href="http://www.slideshare.net/event/phpday-2010">will be available</a> on SlideShare in the next days, as the speakers get the time to upload them. Furthermore, the majority the videos of the talks have been <a href="http://www.ustream.tv/discovery/live/all?q=phpday">recorded on ustream</a> and can be viewed at any time even if you did not participate to phpDay.</p>
<p><em>05-20-2010 &#8211; Fixed spelling of Felix&#8217;s name.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/05/phpday-2010-international-talks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpDay 2010</title>
		<link>http://www.phparch.com/2010/05/phpday-2010/</link>
		<comments>http://www.phparch.com/2010/05/phpday-2010/#comments</comments>
		<pubDate>Tue, 04 May 2010 17:00:51 +0000</pubDate>
		<dc:creator>Marco Tabini</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Fabien Potencier]]></category>
		<category><![CDATA[Italy]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=5235</guid>
		<description><![CDATA[Let's take a look at the international speakers of 2010's edition of the phpDay conference in Italy, and at the variety of covered topics.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/05/phpday2010.png"><img class="alignleft size-full wp-image-5237" title="phpday2010" src="http://beta.phparch.com/wp-content/uploads/2010/05/phpday2010.png" alt="" width="150" height="150" /></a>The fourth edition of <a title="phpDay 2010" href="http://www.phpday.it/news/2010">phpDay</a>, the Italian PHP conference, will be held in Corropoli (TE) between the 13th and 15th of May. In spite of its name, the conference has grown from the original one-day format to the current three-day one.</p>
<p>This year&#8217;s main topic at phpDay will be Quality Assurance in PHP. However, the scheduled talks and workshops range from Agile and Extreme Programming practices to emerging technologies in the PHP landscape, for the joy of hands-on developers.</p>
<p>Although it is a conference based in Italy, phpDay 2010 is fundamentally an international event. While the first day is focused on workshops, the central day (May 14th) features a variety of English talks both on methodology topics and technical ones such as Flex integration in PHP and development for the cloud computing platform Windows Azure.</p>
<p>Furthermore, some well-known personalities from the PHP community will be in Italy to give their talks. <strong>Fabien Potencier</strong>, Sensio&#8217;s CEO and project leader of the symfony framework, is probably the most famous guest and will give a presentation on Dependency Injection in PHP. Other notable speakers are <strong>Dustin Whittle</strong>, evangelist for Yahoo! Open Strategy that will report about the PHP platform built at Yahoo!; <strong>Mihai Corlan</strong> from Adobe who will talk about the combination of Flex on client and PHP on the server for web applications; and PEAR&#8217;s president <strong>David Coallier</strong> with his talks on RESTful APIs and data storage on the cloud.</p>
<p>The choice of a small city for the location lessened the overall costs and made possible to bring these speakers to Italy: the organizer, <a title="Gruppo Utenti e Sviluppatori PHP Italiani" href="http://www.grusp.it/">GrUSP</a>, is a non-profit organization managed by Italian PHP programmers. Of course, the tickets are less expensive in respect to larger conferences, but the quality of the event is testified by the list of sponsors, which comprehends Zend, Microsoft and Yahoo! Developer Network.</p>
<p>Conferences are an opportunity for time-effective, intensive learning but also networking events where you can meet some of the people that really make the PHP world go around. The location also opens the possibility to try real espresso and pizza in their Italian <em>reference implementation</em>: you&#8217;re still in time to register for phpDay 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/05/phpday-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing four new PHP 5.3 components and Goutte, a simple web scraper</title>
		<link>http://www.phparch.com/2010/04/four-new-php-5-3-components-and-goutte-a-simple-web-scraper/</link>
		<comments>http://www.phparch.com/2010/04/four-new-php-5-3-components-and-goutte-a-simple-web-scraper/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 17:15:38 +0000</pubDate>
		<dc:creator>Ryan Weaver</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Fabien Potencier]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[web scaping]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.phparch.com/?p=4931</guid>
		<description><![CDATA[To support Symfony 2's development, Fabien Potencier, lead of Symfony, has release four PHP 5.3 components: BrowserKit, CssSelector, DomCrawler and Process. A new web scraper/crawler has also been released, which uses these components along with Zend Framework's Date, Uri, Http, and Validate components.]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.phparch.com/wp-content/uploads/2010/04/symfony-2.jpg"><img class="size-medium wp-image-4968" title="symfony-2" src="http://www.phparch.com/files/2010/04/symfony-2-300x121.jpg" alt="" width="300" height="121" /></a><br />
To support symfony 2&#8242;s development, Fabien Potencier &#8211; the lead developer of the symfony framework &#8211; has released four new PHP 5.3 based components:</p>
<ul>
<li><a href="http://github.com/fabpot/symfony/tree/master/src/Symfony/Components/BrowserKit">BrowserKit</a></li>
<li><a href="http://github.com/fabpot/symfony/tree/797327110b27a9a5fbae3f2fdc00affbaa7c3ac2/src/Symfony/Components/CssSelector">CssSelector</a></li>
<li><a href="http://github.com/fabpot/symfony/tree/797327110b27a9a5fbae3f2fdc00affbaa7c3ac2/src/Symfony/Components/DomCrawler"></a><a href="http://github.com/fabpot/symfony/tree/797327110b27a9a5fbae3f2fdc00affbaa7c3ac2/src/Symfony/Components/DomCrawler">DomCrawler</a></li>
<li><a href="http://github.com/fabpot/symfony/tree/master/src/Symfony/Components/Process/">Process</a></li>
<p>.</ul>
<p>Though these components will be used by Symfony 2, they&#8217;re built to be standalone components that can be easily used in any PHP 5.3 project. To prove that point, Fabien also released a new web scraper/crawler called <em><a href="http://github.com/fabpot/Goutte">Goutte</a></em> which uses these four components, along with four additional components from <a href="http://framework.zend.com">Zend Framework</a>. It&#8217;s a prime example of the flexibility and power that standalone components, along with a willingness to share, can provide.</p>
<h3>CssSelector</h3>
<p>The first new component, CssSelector, converts CSS selectors to XPath so that the power of XPath can be used with the familiarity of CSS selectors. The component is actually a port of a Python library called lxml and represents a translation from Python to PHP along with the addition of some unit tests.</p>
<p>The use is simple, and is covered in greater detail by Fabien on his <a href="http://fabien.potencier.org/article/42/parsing-xml-documents-with-css-selectors">blog</a>. The following code, from Fabien&#8217;s blog, iterates through a specific anchor tag and prints out the href attribute.</p>
<pre>  use Symfony\Components\CssSelector\Parser;

  $document = new \DOMDocument();
  $document-&gt;loadHTMLFile('http://fabien.potencier.org/articles');

  $xpath = new \DOMXPath($document);
  foreach ($xpath-&gt;query(Parser::cssToXpath('div.item &gt; h4 &gt; a')) as $node)
  {
    printf("%s (%s)\n", $node-&gt;nodeValue, $node-&gt;getAttribute('href'));
  }</pre>
<h3>DomCrawler</h3>
<p>After the CssSelector, the obvious next step is to create a component that allows you to take control of any HTML or XML content. The DomCrawler allows you to do just that. Though there&#8217;s not yet any real documentation, the unit tests reveal a powerful system for crawling the DOM.</p>
<pre>  use Symfony\Components\DomCrawler\Crawler;

  $crawler = new Crawler();
  $crawler-&gt;addHtmlContent('&lt;html&gt;&lt;div class="foo"&gt;&lt;/div&gt;&lt;/html&gt;');

  $crawler-&gt;filter('div')-&gt;attr('class') // returns foo</pre>
<p>The component has a rich list of methods that can be called to perform tasks on your DOM such as filtering, returning attributes, returning text, calling methods iteratively on nodes, and manipulating link and form elements.</p>
<h3>Process</h3>
<p>The Process components tackles another issue entirely. Namely, the Process component allows PHP scripts to be run in entirely different processes. In other words, &#8220;PhpProcess runs a PHP script in a forked process.&#8221; This is done via a simple class wrapper around the proc_* functions.</p>
<pre>  use Symfony\Components\Process\PhpProcess;

  $process = new PhpProcess('/path/to/script.php');
  $process-&gt;run();

  echo $process-&gt;getOutput();</pre>
<h3>BrowserKit</h3>
<p>Finally, the BrowserKit component brings all of the components together. The BrowserKit makes a request (via a method you define), and then allows you to interact with the page (e.g. click, submit) or retrieve information from the page (via the DomCrawler).</p>
<p>The best way to understand the BrowserKit is to see it in action with Goutte.</p>
<h3>Goutte &#8211; a screen scraping and web crawling library</h3>
<p>Goutte combines the above four components along with Zend Framework&#8217;s Date, Uri, Http, and Validate components to form an easy and powerful way to programmatically crawl and interact with web pages.</p>
<pre>  $client = new Client();
  $crawler = $client-&gt;request('GET', 'http://www.symfony-project.org/');

  // Click on a link
  $link = $crawler-&gt;selectLink('Plugins')-&gt;link();
  $crawler = $client-&gt;click($link);

  // Read through a list of error messages
  $nodes = $crawler-&gt;filter('ul.error_list');
  foreach ($nodes as $node)
  {
    echo 'Error: ' . $node-&gt;text();
  }</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.phparch.com/2010/04/four-new-php-5-3-components-and-goutte-a-simple-web-scraper/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

