<?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>Thu, 23 May 2013 11:01:26 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: Building Ribbit in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18992</guid>
      <link>http://www.phpdeveloper.org/news/18992</link>
      <description><![CDATA[<p>
In the <a href="http://net.tutsplus.com/tutorials/html-css-techniques/build-a-twitter-clone-from-scratch-the-design/">first part</a> of a new series on NetTuts.com, they started on the creation of a full web application (a Twitter clone). The first article covered the CSS and using LESS to create an interface. In <a href="http://net.tutsplus.com/tutorials/php/building-ribbit-in-php/">this second post</a> they get into the PHP backend, opting to create it without a framework on the first shot.
</p>
<blockquote>
In the <a href="http://net.tutsplus.com/tutorials/html-css-techniques/build-a-twitter-clone-from-scratch-the-design/">initial entry</a> in this series, we took care of the UI-aspect of our Twitter-clone, called Ribbit. Now, we'll begin coding the application in a number of languages. This lesson will leverage standard PHP (with homegrown MVC), but, in future articles, we'll review other implementations, such as with Rails or Laravel.
</blockquote>
<p>
They provide all the code you'll need, the database table structure to power it (MySQL) and the examples of a model, router and basic MVC stack to handle the requests. They help you make a user creation and login system as well as a few other pages ("buddies", "make a post" and a few others). You can also <a href="https://github.com/NETTUTS/Ribbit-PHP">download the source</a> from their Github account if you want it all in one shot.
</p>]]></description>
      <pubDate>Fri, 04 Jan 2013 10:22:48 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Sencha Touch 2 Models - Loading And Saving Model Data Using a Proxy, PHP Example]]></title>
      <guid>http://www.phpdeveloper.org/news/18430</guid>
      <link>http://www.phpdeveloper.org/news/18430</link>
      <description><![CDATA[<p>
On DZone.com there's a new tutorial posted (by <i>Jorge Ramon</i>) about hooking together the models of Sencha's Touch 2 with a PHP backend to make saving data to them simpler via a proxy.
</p>
<blockquote>
Sencha Touch models have the ability to work with a proxy. This feature allows you to save and retrieve model data from the server, memory or local storage, without depending on a Sencha Touch data store. Let's try it with a very simple scenario where the server side is a PHP page.
</blockquote>
<p>
The article includes both the Javascript to create the models (along with its proxy and custom API methods defined) as well as the PHP that powers the backend. The PHP just reads from the "php://input" stream and echoes back out JSON, but it gives you an idea of what to expect to receive. For more information on Sencha Touch, check out <a href="http://docs.sencha.com/touch/2-0/">their documentation</a>.
</p>]]></description>
      <pubDate>Fri, 31 Aug 2012 11:54:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Server-Side HTML Handling Using phpQuery]]></title>
      <guid>http://www.phpdeveloper.org/news/18082</guid>
      <link>http://www.phpdeveloper.org/news/18082</link>
      <description><![CDATA[<p>
PHPMaster.com has a new tutorial today showing how you can <a href="http://phpmaster.com/server-side-html-handling-using-phpquery/">use phpQuery to work with HTML</a> in your application. <a href="http://code.google.com/p/phpquery/">phpQuery</a> is a server-side CSS-selector-driven based on jQuery's API.
</p>
<blockquote>
Think about how you can change and manipulate the generated HTML using server-side PHP code. phpQuery is the ultimate solution that will come to your mind. If you haven't heard about phpQuery, you may be interested in this article since I am going to give you a brief introduction to phpQuery and explain how you can use it in real-world projects.
</blockquote>
<p>
The tutorial shows you how to generate a simple table with alternating row colors (zebra) and column headers from an array of product information. They also talk a bit about why using something server-side like this is important (over something client-side like jQuery) - how it can make things easier by keeping the "business logic" all in one place, leaving your frontend to do what it does best.
</p>]]></description>
      <pubDate>Tue, 12 Jun 2012 10:58:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Let's Talk: Efficient Communication for PHP and Android, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/18010</guid>
      <link>http://www.phpdeveloper.org/news/18010</link>
      <description><![CDATA[<p>
On PHPMaster.com today, they've started a new series about integrating two popular technologies - PHP and the Android OS - in <a href="http://phpmaster.com/lets-talk-1/">this new tutorial</a> from <i>Matthew Turland</i>. He'll show both sides of the code needed to get your Android app talking to a PHP backend.
</p>
<blockquote>
This two-part article will guide you through the process of building an efficient PHP-based REST web service to be consumed by an Android-based application. Some of the concepts presented here are also applicable to other mobile platforms, such as iOS. I assume you already know the basics of PHP and Android development and that you have a suitable development environments set up for both. I'll focus mainly on showing you how to handle data serialization and compression in both environments.
</blockquote>
<p>
In this <a href="http://phpmaster.com/lets-talk-1/">first part</a>, he starts from the client side, creating the code (Java) that's needed to create the connection to the backend. He stets it up as a background task so its execution won't block the main app from working. He shows how to execute it, running an "on create" method and checking to ensure the network is available for the request.
</p>]]></description>
      <pubDate>Mon, 28 May 2012 16:20:09 -0500</pubDate>
    </item>
    <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>
  </channel>
</rss>
