<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 21 May 2012 08:26:52 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Artur Ejsmont's Blog: Publishing queue messages from PHP using different backends]]></title>
      <guid>http://www.phpdeveloper.org/news/17729</guid>
      <link>http://www.phpdeveloper.org/news/17729</link>
      <description><![CDATA[<p>
<i>Artur Ejsmont</i> has <a href="http://artur.ejsmont.org/blog/content/publishing-messages-from-php-to-different-message-queue-backends">a new post</a> sharing some benchmarks he put together about the "messages per second" and "time to execute" when using PHP to pull from various messaging backends.
</p>
<blockquote>
I have looked at the state of different messaging backends recently and i ran a little benchmark to see what is the rough comparison of message publishing throughput. Results that i got are quite surprising. What i wanted to achieve is some sort of reassurance before choosing a messaging bus for my PHP project. 
</blockquote>
<p>
Running both the PHP and the messaging test scripts on the same server, he pulled from a few different backend systems - RabbitMQ, MySQL, MongoDb, Memcached and ActiveMQ. The results were interesting, showing an interesting result in the time it took to execute versus the number of messages per second pushed in. 
</p>]]></description>
      <pubDate>Mon, 26 Mar 2012 11:31:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: REST APIs as Data Backends]]></title>
      <guid>http://www.phpdeveloper.org/news/17689</guid>
      <link>http://www.phpdeveloper.org/news/17689</link>
      <description><![CDATA[<p>
In his most recent post <i>Brandon Savage</i> looks at a practice that's becoming more and more common - <a href="http://www.brandonsavage.net/rest-apis-as-data-backends/">using a REST API as a data source</a> for a web-based application.
</p>
<blockquote>
We were faced with an increasing number of data sources, including the coming addition of Elastic Search to the data storage system, and maintenance was becoming a problem. Thus, the decision was made to move our data layer to our REST API exclusively, removing all direct access to data storage from the web interface. This is the second such project I've been on where an external API has been used for the retrieval of all data in an application. It's a novel concept, but one that takes some getting used to to be sure.
</blockquote>
<p>
He talks about some of the advantages of this approach including the ability to be more flexible with the actual technology used to create the API, the ability to write other applications on top of it and a glimpse into some of the process that's been going on as a part of the project.
</p>]]></description>
      <pubDate>Mon, 19 Mar 2012 09:57:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: Form Validation with Javascript and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17486</guid>
      <link>http://www.phpdeveloper.org/news/17486</link>
      <description><![CDATA[<p>
On the Script-Tutorials.com site today there's a <a href="http://www.script-tutorials.com/form-validation-with-javascript-and-php/">new tutorial about form validation</a> using a combination of jQuery on the frontend and PHP on the backend.
</p>
<blockquote>
In this tutorial, I will show you how to create an attractive, pleasant to look form for your website and then I will explain you how to dynamically validate them using Javascript. We'll also cover server-side validation with PHP to make everything 100% safe. This tutorial will help you to add more functionality to your forms which leads to better user experience and better quality of your website.
</blockquote>
<p>
His sample form (name, password, email and gender) is made from some pretty simple HTML markup. The real trick comes with the jQuery validation on each field handled in an onKeyUp. Included are both a "password strength" method and an email validation method to check the format of the address. Errored fields have their background color changed to indicate that they've failed and some basic validation (length, password match, etc.) are also included. The PHP does much of the same validation once the form is posted and returns any error messages that might have come up.
</p>
<p>
You can <a href="http://www.script-tutorials.com/demos/228/source.zip">download the code</a> or try out a <a href="http://www.script-tutorials.com/demos/228/index.php">live demo</a> to see the scripts together in action.
</p>]]></description>
      <pubDate>Thu, 02 Feb 2012 09:07:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Nikic's Blog: How big are PHP arrays (and values) really? (Hint: BIG!)]]></title>
      <guid>http://www.phpdeveloper.org/news/17270</guid>
      <link>http://www.phpdeveloper.org/news/17270</link>
      <description><![CDATA[<p>
In <a href="http://nikic.github.com/2011/12/12/How-big-are-PHP-arrays-really-Hint-BIG.html">this recent blog post</a> <i>nikic</i> takes an in-depth look at <a href="http://nikic.github.com/2011/12/12/How-big-are-PHP-arrays-really-Hint-BIG.html">how large PHP arrays really are</a> - how memory is used in the creation and management of these handy PHP variable types.
</p>
<blockquote>
In this post I want to investigate the memory usage of PHP arrays (and values in general) using the following script as an example, which creates 100000 unique integer array elements and measures the resulting memory usage. [...] How much would you expect it to be? [...] Now try and run the above code. <a href="http://codepad.viper-7.com/pjB3Wm">You can do it online if you want</a>. This gives me 14649024 bytes. Yes, you heard right, that's 13.97 MB - eightteen times more than we estimated.
</blockquote>
<p>
He goes into the details of PHP's memory management and breaks it down into the different totals (for 64 bit and 32 bit OSes) and details on each - zvalue_value, zvalue, cycles collector, Zend MM allocator and the buckets used to isolate one array (hash table/dictionary) from another. 
</p>
<blockquote>
What does this tell us? PHP ain't C. That's all this should tell us. You can't expect that a super dynamic language like PHP has the same highly efficient memory usage that C has. You just can't.
</blockquote>]]></description>
      <pubDate>Fri, 16 Dec 2011 10:28:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Reddit.com: Should I be doing just about everything using REST?]]></title>
      <guid>http://www.phpdeveloper.org/news/17225</guid>
      <link>http://www.phpdeveloper.org/news/17225</link>
      <description><![CDATA[<p>
In <a href="http://www.reddit.com/r/PHP/comments/n1pyn/should_i_be_doing_just_about_everything_using_rest/">this new post</a> to Reddit.com, the question is asked "Should I be doing just about everything using REST?" - wondering if their new applications should all sit on top of a web service for their functionality.
</p>
<blockquote>
I'm pretty new to server-side programming, and actually started out with Python/mod-wsgi. From the ground up, mod-wsgi made a lot of sense. The server gets a request, you route the request. It feels like that's where I should start, so that's pretty much what I'm trying to create with PHP (a REST router - for learning purposes, I know frameworks exist). I'm trying to think of a situation where I wouldn't use a REST interface, but I can't seem to think of one (even for simple cases). Would it be safe to say that using REST is a pretty safe bet, most of the time?
</blockquote>
<p>
There's some good discussion and answers to his question touching on things like Service Oriented Architectures, some implications of having a web service power an entire application (or applications) and 
 a few comments with some personal experience.
</p>
<p>A comment about SOA sums it up well:</p>
<blockquote>
You learn to write for your platform in the way developers/partners will have to, so you produce a good quality usable API which encourages development and consumption of your platform.
</blockquote>]]></description>
      <pubDate>Wed, 07 Dec 2011 12:41:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schl&uuml;ter's Blog: High Performance PHP Session Storage on Scale]]></title>
      <guid>http://www.phpdeveloper.org/news/17147</guid>
      <link>http://www.phpdeveloper.org/news/17147</link>
      <description><![CDATA[<p>
In <a href="http://schlueters.de/blog/archives/164-High-Performance-PHP-Session-Storage-on-Scale.html">this new post</a> to his blog, <i>Johannes Schl&uuml;ter</i> looks at a high-performance solution to the usual storing PHP session information via a memcache frontend with a MySQL Cluster backend.
</p>
<blockquote>
Unfortunately even such a system [using MySQL and InnoDB tables] has limits and unfortunately replication is no good solution here to scale further as we will always need a master for writing the updated session data. By using replication we can take some load from it and we can configure a slave which can be promoted to master to keep session alive if the primary master machine fails but at some point in time we need another solution ... but, happy news, again: One doesn't have to look far as MySQL cluster will be happy to help. MySQL Cluster "is a high-availability, high-redundancy version of MySQL adapted for the distributed computing environment," as the <a href="http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster.html">MySQL documentation states</a>. 
</blockquote>
<p>
He describes the setup (after pointing to <a href="http://www.clusterdb.com/mysql-cluster/scalabale-persistent-ha-nosql-memcache-storage-using-mysql-cluster/">this post</a> about installing MySQL Cluster for memcache) and includes some sample code/SQL/ini settings you'll need to use to get PHP's <a href="http://us.php.net/manual/en/class.memcached.php">memcached</a> functionality to cooperate with it.
</p>
]]></description>
      <pubDate>Fri, 18 Nov 2011 10:13:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org: Using PHP-GTK to serve Web Applications to HTML 5 Browsers]]></title>
      <guid>http://www.phpdeveloper.org/news/17049</guid>
      <link>http://www.phpdeveloper.org/news/17049</link>
      <description><![CDATA[<p>
On the PHPClasses.org blog today there's a new post showing how you can <a href="http://www.phpclasses.org/blog/post/162-Using-PHPGTK-to-serve-Web-Applications-to-HTML-5-Browsers.html">use PHP-GTK to generate websites</a>, not just the more traditional desktop applications people associate it with.
</p>
<blockquote>
es, you read it right, GTK+, the Gnome Toolkit library, normally used to create desktop applications, can now be used to serve the same applications via the Web to a browser that supports HTML 5 canvas objects. PHP-GTK is a PHP extension that uses the GTK+ library to build PHP desktop applications. So it can eventually benefit for this GTK library enhancements to build PHP-GTK based applications that can be served over the Web to HTML 5 browsers.
</blockquote>
<p>
<i>Manuel</i> starts by explaining a bit about what PHP-GTK (and GTK+) is and a recent update to GTK+ that allows it to generate output to different backends - Wayland (direct graphics rendering) and Broadway (HTML5 canvas support). There's no example code to go along with the post, but there's a good description of how the output of an X Windows session could be pulled in and displayed in a browser (<a href="http://www.youtube.com/watch?v=AO-qca9ddqg">see this video</a> for a cool example using GIMP and Broadway).
</p>]]></description>
      <pubDate>Thu, 27 Oct 2011 09:57:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: Hook into Wikipedia information using PHP and the MediaWiki API]]></title>
      <guid>http://www.phpdeveloper.org/news/16732</guid>
      <link>http://www.phpdeveloper.org/news/16732</link>
      <description><![CDATA[<p>
On the IBM developerWorks site, there's a tutorial from <i>Vikram Vaswani</i> showing you how to <a href="http://www.ibm.com/developerworks/web/library/x-phpwikipedia/index.html?ca=drs-">connect to Wikipedia's API</a> in your PHP application. It shows how to fetch, search and update entries through their backend. The tutorial's a little bit older (from May 2011) but the content is still relevant.
</p>
<blockquote>
Wikipedia is the ultimate online encyclopedia, containing millions of entries on different aspects of human knowledge. Web application developers are able to access and search these entries through the Wikipedia API. This article introduces the Wikipedia API and demonstrates it in the context of a PHP application, explaining how to search and retrieve different elements of Wikipedia content with PHP.
</blockquote>
<p>
He starts with a general introduction to the API including example feed results and URL request formats. From there he moves into the code - a mostly Zend Framework-driven example that uses the REST client. He shows how to make requests for categories, full-text search, grabbing raw page content and adding/editing the content of pages.
</p>]]></description>
      <pubDate>Wed, 17 Aug 2011 12:16:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: Connecting PHP to ActionScript and Flex using Stomp]]></title>
      <guid>http://www.phpdeveloper.org/news/16427</guid>
      <link>http://www.phpdeveloper.org/news/16427</link>
      <description><![CDATA[<p>
<i>Kevin Schroeder</i> has a recent post to his blog today looking at how he used Stomp to <a href="http://www.eschrade.com/page/connecting-php-to-actionscript-using-stomp/">connect his backend PHP to frontend Flex</a>, a text-based protocol that can be used to connect to a MQ server instance.
</p>
<blockquote>
In <a href="http://www.eschrade.com/page/details-on-building-a-flex-based-dashboard-with-a-php-backend/">yesterday's post</a> I talked a little bit about some of the details on how I used messaging to connect a front end on demand request to a back end scheduled data processing mechanism.  In this post we're going to talk about how to send data from a web page to a running Flex application without using HTTP.  It is really quite easy.
</blockquote>
<p>
His demo application watches a Magento instance and notifies him whenever a new sales comes in. Because of Magento's event-based system, it made the setup relatively easy. He includes the code for the observer on the Magento side and the Zend Framework-based logger code that it calls. Using the <a href="http://code.google.com/p/as3-stomp/">AS3Stomp</a> library to make the connection, <i>Kevin</i> sets up the data provider for the Flex app to push the latest sale information into a list.
</p>]]></description>
      <pubDate>Mon, 06 Jun 2011 08:19:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Agile Toolkit News: Yin and Yang of modern PHP UI Frameworks]]></title>
      <guid>http://www.phpdeveloper.org/news/15367</guid>
      <link>http://www.phpdeveloper.org/news/15367</link>
      <description><![CDATA[<p>
On the Agile Toolkit News site today there's <a href="http://blog.atk4.com/php-ui-frameworks/">a recent post</a> looking at a specific part of several of the different PHP-based frameworks out there - the UI or view layer. He wonders why, with UI-specific PHP frameworks out there, why the two can't just play nice together.
</p>
<blockquote>
I came over this old question on <a href="http://stackoverflow.com/questions/20709/which-php-framework-will-get-me-to-a-usable-ui-the-fastest">StackOverflow</a>: "Which PHP Framework will get me to a usable UI the fastest?" I couldn't help but wonder, why people are not aware of all those other PHP UI frameworks? There are few, right? If you google for "php ui" you can find them. Those are more generally referred to as UI toolkits. But why those toolkits are not known in the mainstream?
</blockquote>
<p>
He notes that most of the major frameworks leave you out to dry when it comes to presentation. They don't include much in the way of interface helpers in the name of modularity and backend focus. He suggests a few reasons why this happens and why the UI frameworks out there haven't made it to the mainstream. He gives three rules that could help this situation: view and object handling, giving developers a way to extend things easily and knowing the limitations of what the framework can do.
</p>]]></description>
      <pubDate>Tue, 02 Nov 2010 09:16:06 -0500</pubDate>
    </item>
  </channel>
</rss>

