<?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 21:49:03 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DZone.com: Factory patterns: Collaborators Map]]></title>
      <guid>http://www.phpdeveloper.org/news/18651</guid>
      <link>http://www.phpdeveloper.org/news/18651</link>
      <description><![CDATA[<p>
On DZone.com <i>Giorgio Sironi</i> has a new tutorial looking at <a href="http://css.dzone.com/articles/factory-patterns-collaborators">the Factory design pattern</a>, specifically the use of a "collaborators map" to create them inside of a dependency injection container.
</p>
<blockquote>
Like for every library, you should first evaluate if the costs and benefit of integrating [a dependency injection container] are worth it. The alternative is to write your own factory classes, methods and closures: this article explains one of the patterns for building dynamic Factory objects, and as such lowers the cost of the second option. What you know how to do has a lower cost than what you still have to learn, considering risk and implementation time.
</blockquote>
<p>
He talks about the "old way" of making your own factories to create objects and how the collaborators mapping can replace that. The collaboration mapping is passed in when the object is created and a "create" method is called when the objects (or sub-objects) are needed. He also mentions some of the "easy" and "hard" changes you could make to this setup to expand its functionality.
</p>]]></description>
      <pubDate>Wed, 24 Oct 2012 09:43:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Proof that PHP 5.4 is Twice as Fast as PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/18092</guid>
      <link>http://www.phpdeveloper.org/news/18092</link>
      <description><![CDATA[<p>
In <a href="http://www.lornajane.net/posts/2012/proof-that-php-5-4-is-twice-as-fast-as-php-5-3">this quick post</a> to her blog, <i>Lorna Mitchell</i> shares an interesting bit of benchmarking she did between PHP versions 5.3 and 5.4, finding 5.4 twice as fast as it's previous version sibling.
</p>
<blockquote>
So recently I was working on some benchmarks for different versions of PHP, because I heard that PHP 5.4 is "faster" and since I'm a data geek I want to know how much faster! Now, PHP 5.4 is, in general, faster than PHP 5.3 but not twice as fast* unless you pick a use case which has been particularly optimised. My first attempt at benchmarking the two versions <a href="http://www.lornajane.net/wp-content/uploads/2012/06/graphshot.png">produced this</a>. This was a surprise to me; was PHP 5.4 really so much faster??
</blockquote>
<p>
Her benchmark was a pretty simple one - looping and creating a new object, evaluating the <a href="http://php.net/microtime">timing</a> of how long it took to execute. A commentor also points to some <a href="http://news.php.net/php.internals/57760">more official benchmarks</a> that were done and posted to the php.internals mailing list.
</p>]]></description>
      <pubDate>Thu, 14 Jun 2012 10:04:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anson Cheung's Blog: Create nodes in eZ Publish using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17947</guid>
      <link>http://www.phpdeveloper.org/news/17947</link>
      <description><![CDATA[<p>
In <a href="http://www.ansoncheung.tk/articles/create-nodes-ez-publish-using-php">this new post</a> from <i>Anson Cheung</i>, he shows you a way to easily create nodes in an eZ Publish-based application, importing content, XML and files/files.
</p>
<blockquote>
Node creation in eZ Publish by using PHP is not well documented. However, when you encounter a large number of contents need to be insert periodically. You would ask is there any way to automate the content insert function with script in eZ Publish??? Any here I am going to summarize the way to achieve.
</blockquote>
<p>He includes the code examples showing how to:</p>
<ul>
<li>Set the creator
<li>Import generic content and attaching it to a parent node
<li>Importing some XML content 
<li>Adding an image or file record that points to a local file
</ul>]]></description>
      <pubDate>Fri, 11 May 2012 11:37:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Court Ewing's Blog: Create and Validate a Choice List in a Symfony 2 Form]]></title>
      <guid>http://www.phpdeveloper.org/news/16728</guid>
      <link>http://www.phpdeveloper.org/news/16728</link>
      <description><![CDATA[<p>
<i>Court Ewing</i> has written up a new post to his blog about <a href="http://epixa.com/2011/08/create-and-validate-a-choice-list-in-a-symfony-2-form">creating a "choice" list</a> (a select list as defined by Symfony 2) with dynamic options and validating the resulting submission. His example uses Doctrine 2 entities to work with most of the data handling.
</p>
<blockquote>
A standard select list can be created using Symfony's choice field type; it is pretty clear how to create a new <a href="http://symfony.com/doc/current/reference/forms/types/choice.html">choice</a> field with simple, non-dynamic options (e.g. gender), but it gets a little more complicated when you want to create and validate a dynamically generated choice list.
</blockquote>
<p>
He includes the code for a simple entity, a Post model to fetch the category information and the set up of the form element - a select list of post types/categories. He also includes a bonus section showing how you can achieve the same thing without a model to bind to. 
 The code's a little bit more complex than the previous example, but it's basically just reproducing some of the validation and fetching logic manually.
</p>]]></description>
      <pubDate>Wed, 17 Aug 2011 08:28:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Creating and Manipulating PDFs with PHP and FPDF]]></title>
      <guid>http://www.phpdeveloper.org/news/16032</guid>
      <link>http://www.phpdeveloper.org/news/16032</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a new tutorial about <a href="http://www.phpbuilder.com/columns/php-pdf-generation/Jason_Gilmore03102011.php3">creating editing PDFs</a> with the help of the <a href="http://www.fpdf.org/">FPDF library</a>.
</p>
<blockquote>
Because the Web has become the primary mechanism for distributing PDF documents, it's common to encounter questions on various web development forums pertinent to the dynamic creation of PDF documents using languages such as PHP. [...] Thankfully, such a demand for PDF manipulation capabilities exists within the PHP community that numerous alternative open source solutions have long been available, including notably <a href="http://www.fpdf.org/">FPDF</a>.
</blockquote>
<p>
They help you get the library installed and show you how to create a basic PDF with some simple text inside. They build on this and show how to add multiple text sections, images and watermarks.
</p>]]></description>
      <pubDate>Fri, 11 Mar 2011 10:13:07 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Jones' Blog: More on PHP and Oracle 11gR2 Improvements to Client Result Caching]]></title>
      <guid>http://www.phpdeveloper.org/news/15997</guid>
      <link>http://www.phpdeveloper.org/news/15997</link>
      <description><![CDATA[<p>
<i>Chris Jones</i> has posted more information to his Oracle blog about the <a href="http://blogs.oracle.com/opal/2011/03/more_on_php_and_oracle_11gr2_i.html">caching and other improvements</a> that come along with the Oracle 11gR2 release that can be used in PHP applications.
</p>
<blockquote>
Oracle 11.2 brought several improvements to Client Result Caching. CRC is way for the results of queries to be cached in the database client process for reuse. [...] PHP OCI8 as a "client" of the database can use CRC.  The cache is per-process, so plan carefully before caching large data sets.  Tables that are candidates for caching are look-up tables where the network transfer cost dominates.
</blockquote>
<p>
Like many of the other server-side tools Oracle has to offer, it's pretty simple to enable this caching. Before you had to add a custom bit to your query to tell it to enable the caching. Now it's as simple as setting it up on the CREATE or ALTER for the table - nothing extra for the developer to do.
</p>]]></description>
      <pubDate>Fri, 04 Mar 2011 09:56:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Dan Scott's Blog: Creating a MARC record from scratch in PHP using File_MARC]]></title>
      <guid>http://www.phpdeveloper.org/news/15996</guid>
      <link>http://www.phpdeveloper.org/news/15996</link>
      <description><![CDATA[<p>
<i>Dan Scott</i> has posted an example of how to <a href="http://www.coffeecode.net/archives/243-Creating-a-MARC-record-from-scratch-in-PHP-using-File_MARC.html">create a MARC record</a> (machine-readable cataloging, more details <a href=" http://loc.gov/marc/">here</a>) from scratch with the help of the <a href="http://pear.php.net/File_MARC">File_MARC</a> PEAR package.
</p>
<blockquote>
In the past couple of days, two people have written me email essentially saying: "Dan, this File_MARC library sounds great - but I can't figure out how to create a record from scratch with it! Can you please help me? Yes, when you're dealing with MARC, you'll quickly get all weepy and get help from anyone you can. 
</blockquote>
<p>
His example code is pretty simple - load the PEAR package into the script, create the record object and start adding fields to it. He shows various output methods ("pretty print", writing the raw data to a file, etc.) and the output to various other data structures like JSON and XML.
</p>]]></description>
      <pubDate>Fri, 04 Mar 2011 08:40:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Create your First Tiny MVC Boilerplate with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15958</guid>
      <link>http://www.phpdeveloper.org/news/15958</link>
      <description><![CDATA[<p>
If you ever find yourself in need of a basic MVC structure for your application but don't want to get involved with a full framework to do it, you should try out <a href="http://net.tutsplus.com/tutorials/php/create-your-first-tiny-mvc-boilerplate-with-php/">this new screencast</a> from NetTuts.com. It shows you the creation of a simple "tiny MVC" implementation.
</p>
<blockquote>
It's important for me to note that I'm not advocating that you shouldn't use large frameworks. They absolutely have their places, and I use them often. That said, there are definitely times when they can be overkill for smaller projects. When your only requirement is code organization, it's typically better to scrape together your own MVC boilerplate.
</blockquote>
<p>
<a href="http://net.tutsplus.com/tutorials/php/create-your-first-tiny-mvc-boilerplate-with-php/">The screencast's</a> about 15 minutes long and it walks you through each step of the way - making the routing, setting up controller handling and working with views. For the impatient, you can also <a href="http://nettuts.s3.amazonaws.com/924_tinyMvc/tinyMvc.zip">download the source</a> and get started quickly.
</p>]]></description>
      <pubDate>Thu, 24 Feb 2011 12:20:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SpeckBoy.com: Getting Started with CRUD In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15929</guid>
      <link>http://www.phpdeveloper.org/news/15929</link>
      <description><![CDATA[<p>
On SpeckBoy.com there's <a href="http://speckyboy.com/2011/02/17/getting-started-with-crud-in-php/">a new tutorial</a> posted that introduces you to the concept of CRUD - Create, Read, Update, Delete - in the database interface for your application. Technically CRUD can be applied to any sort of data store, but they chose to go with a MySQL-based example.
</p>
<blockquote>
It has become a common necessity for website owners to collect data and manage it properly. Creating a MySQL CRUD class allows you to conveniently create, read, update and delete entries for any of your projects, indifferent of how the database is devised. CRUD allows us to generate pages to list and edit database records.
So, in this tutorial I will show you how to build a simple CRUD web app, that will empower you with the basic functions of database management.
</blockquote>
<p>
They briefly walk you through the setup of a <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> server to use as a base and give you the settings needed to create a simple users table. The rest of the post is the code you'll need to make the connection from your PHP script, insert data into the table, update them, remove the rows and display their contents. They've wrapped it all up in a single "index.php" file to make it simpler.
</p>]]></description>
      <pubDate>Fri, 18 Feb 2011 12:10:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jim Plush's Blog: How to Auto Create Issues in Jira From PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15863</guid>
      <link>http://www.phpdeveloper.org/news/15863</link>
      <description><![CDATA[<p>
<i>Jim Plush</i> has a new post to his blog today that points out a bit of code you can use to <a href="http://jimplush.com/blog/article/176/How-to-Auto-Create-Issues-in-Jira-From-PHP">auto-create issues in Jira</a> from your PHP application.
</p>
<blockquote>
We use Jira at Gravity for tracking issues and bugs. Since I'm not always on VPN or have access to our network managing my todos has been cumbersome. I've tried every Todo app out there and always fail to use them for more than 2 days. I finally saw a great article on just using a simple Todo.txt file in your Dropbox folder and working from that. It's been a dream and working out great. 
</blockquote>
<p>
His tool lets him use the Todo list example to push its contents out to the PHP script that connects to the Jira instance and make a new issue. The code is included <a href="http://jimplush.com/blog/article/176/How-to-Auto-Create-Issues-in-Jira-From-PHP">in the post</a>, ready for cut-and-pasting.
</p>]]></description>
      <pubDate>Mon, 07 Feb 2011 08:06:52 -0600</pubDate>
    </item>
  </channel>
</rss>
