<?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>Sat, 18 May 2013 17:35:35 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: MongoDB Indexing, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19579</guid>
      <link>http://www.phpdeveloper.org/news/19579</link>
      <description><![CDATA[<p>
PHPMaster.com has posted part two of their series looking at indexing in MongoDB databases (<a href="http://phpdeveloper.org/news/19551">part one here</a>) with some <a href="http://phpmaster.com/mongodb-indexing-2">more advanced concepts</a> Mongo makes available.
</p>
<blockquote>
In <a href="http://phpmaster.com/mongodb-indexing-1/">part 1</a> of this series we had an introduction to indexing in MongoDB. we saw how to create, use, and analyze queries with indexes giving us a good foundation to build on. In this part, we'll take a look at a few more small but important concepts, like indexing on sub-documents and embedded fields, covered queries, and index direction.
</blockquote>
<p>
They use the same "posts" collection from the previous article, showing you how to index it based on a "location" sub document and "embedded fields" inside of it. They also touch on complex sorting with a multi-field index and the idea of "covered queries." These are queries that all fields queried are part of an index as well as all returned. They finish up the article by showing you how to remove indexes too.
</p>
Link: http://phpmaster.com/mongodb-indexing-2]]></description>
      <pubDate>Mon, 13 May 2013 10:36:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: MongoDB Indexing, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/19551</guid>
      <link>http://www.phpdeveloper.org/news/19551</link>
      <description><![CDATA[<p>
New on PHPMaster.com is the first part of their series about <a href="http://phpmaster.com/mongodb-indexing-1/">indexing in MongoDB</a>, a method for optimizing your collections to make querying them even faster. They cover the five main types of indexes and situations where they can help.
</p>
<blockquote>
Indexing is one of the more important concepts of working with MongoDB. A proper understanding is critical because indexing can dramatically increase performance and throughput by reducing the number of full documents to be read, thereby increasing the performance of our application. Because indexes can be bit difficult to understand, this two-part series will take a closer look at them.
</blockquote>
<p>
They look at the default "_id" index, secondary, compound, multikey and multikey compound indexes. Example documents and results are included as well as some of the options that can be set on the index types to tweak performance. They finish up the article with a look at some of the limitations and considerations to think about when using indexing, including that they cannot be used with regex queries.
</p>
Link: http://phpmaster.com/mongodb-indexing-1]]></description>
      <pubDate>Mon, 06 May 2013 11:50:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ben Ramsey: Introducing Array_column() in PHP 5.5]]></title>
      <guid>http://www.phpdeveloper.org/news/19344</guid>
      <link>http://www.phpdeveloper.org/news/19344</link>
      <description><![CDATA[<p>
<i>Ben Ramsey</i> has a new post talking about a feature that will become available in the PHP 5.5.x release series of the language - the <a href="http://benramsey.com/blog/2013/03/introducing-array-column-in-php-5-dot-5/">array_column</a> function. This function will extract all values from an array matching a given key.
</p>
<blockquote>
My original patch for array_column() was written for PHP 5.2, but it sat around collecting dust for many years, until April of last year, when PHP moved to git and GitHub. That's when it became easy enough to apply the patch and send a pull request, which I did. [...] My goal for array_column() was simplicity. Many implement the functionality in different ways, and many call the function by other names (such as "pluck"), but I wanted to keep it simple and recognizable.
</blockquote>
<p>
He includes an example of some sample data and how the function could be used to pull out the "last_name" field from each of the records and return just those as an array. If you're interested in seeing the original proposal and the RFC that was created for it, you can see it <a href="https://wiki.php.net/rfc/array_column">on the PHP wiki</a>.
</p>]]></description>
      <pubDate>Thu, 21 Mar 2013 10:46:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Building A RESTful PHP Server: Understanding the Request]]></title>
      <guid>http://www.phpdeveloper.org/news/17418</guid>
      <link>http://www.phpdeveloper.org/news/17418</link>
      <description><![CDATA[<p>
In <a href="http://www.lornajane.net/posts/2012/building-a-restful-php-server-understanding-the-request">this new post</a> to her blog <i>Lorna Mitchell</i> starts off a new series (based on popular demand) looking at building an RESTful server in PHP. Back to basics - no framework, just PHP.
</p>
<blockquote>
In the first part of this (probably) 3-part series, we'll begin with the basics. It might seem boring, but the most important thing to get right with REST is parsing all the various elements of the HTTP request and responding accordingly. I've put in code samples from from a small-scale toy project I created to make me think about the steps involved.
</blockquote>
<p>Her "basics" include:</p>
<ul>
<li>the routing to send everything to the main index file (a "front controller" of sorts) with the .htaccess settings included
<li>Handling the incoming request with a "Request" class
<li>Parsing the incoming parameters from the "php://input" stream
</p>]]></description>
      <pubDate>Thu, 19 Jan 2012 10:02:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: MongoDB Revisited]]></title>
      <guid>http://www.phpdeveloper.org/news/17407</guid>
      <link>http://www.phpdeveloper.org/news/17407</link>
      <description><![CDATA[<p>
In <a href="http://phpmaster.com/mongodb-revisited/">this new post</a> to PHPMaster.com today <i>Ahmed Shreef</i> continues on from his <a href="http://phpmaster.com/introduction-to-mongodb/">previous introduction to MongoDB</a> and gets into more detail on things like cursors, query operators, queries on embedded documents and the sort/skip methods.
</p>
<blockquote>
In my previous article Introduction to MongoDB I discussed installing Mongo, its PHP extension, and how to perform simple insert and find operations. Of course there are many, many more features than what I mentioned so I wanted to write another article to show you some of them. </blockquote>
<p>
Other topics mentioned include queries on arrays of data and running queries with indexes to improve their performance. Code is also included for each example.
</p>]]></description>
      <pubDate>Tue, 17 Jan 2012 12:44:07 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Debugging Zend Framework unit tests with Xdebug and NetBeans]]></title>
      <guid>http://www.phpdeveloper.org/news/16629</guid>
      <link>http://www.phpdeveloper.org/news/16629</link>
      <description><![CDATA[<p>
In <a href="http://robertbasic.com/blog/debugging-zend-framework-unit-tests-with-xdebug-and-netbeans/">this quick post</a> today <i>Robert Basic</i> shares a hint for using Xdebug together with Zend Framework unit tests to get effective results.
</p>
<blockquote>
I've spent this weekend hacking on some <a href="https://github.com/robertbasic/zf2/tree/dojo">unit tests for ZendDojo</a> and I ran into an issue where I need Xdebug to, well, debug. Note, that this is not for debugging a Zend Framework application, but for debugging Zend Framework itself. I am using Netbeans + Xdebug to debug regular code, but debugging unit tests was something completely new for me. Turns out, it's not entirely different from "regular" debugging.
</blockquote>
<p>
Thanks to hints from <a href="http://blog.rafaeldohms.com.br/2011/05/13/debugging-phpunit-tests-in-netbeans-with-xdebug/">this post</a> and some trial and error on working with autoloading, he finally got things working in his Netbeans environment. The trick is setting up the "Index File" to the correct location.
</p>]]></description>
      <pubDate>Mon, 25 Jul 2011 13:57:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Taming SplPriorityQueue]]></title>
      <guid>http://www.phpdeveloper.org/news/15760</guid>
      <link>http://www.phpdeveloper.org/news/15760</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> has <a href="http://weierophinney.net/matthew/archives/253-Taming-SplPriorityQueue.html">a new post</a> to his blog today looking at one of the tools the <a href="http://php.net/spl">Standard PHP Library (SPL)</a> has to offer developers - the SplPriorityQueue (PHP 5.3+)
</p>
<blockquote>
<a href="http://php.net/SplPriorityQueue">SplPriorityQueue</a> is a fantastic new feature of PHP 5.3. However, in trying to utilize it in a few projects recently, I've run into some behavior that's (a) non-intuitive, and (b) in some cases at least, undesired. In this post, I'll present my solutions.
</blockquote>
<p>
He talks about the "first in, first out" nature of queues and how it differs from a stack (including links to some of the other SPL offerings for both). He then moves into the problems he was seeing - that iteration removes values from the heap and the unexpected order of equal values in the queue. To solve the first problem, he creates an "outer iterator" that creates an "innerQueue" that's protected. The solution for the second issue - the random queue order - is a simple one: priority indexes aren't required to be integers. Strings can be substituted to help make things a bit more unique.
</p>]]></description>
      <pubDate>Tue, 18 Jan 2011 12:43:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Deleting indexes from Zend_Registry and why you shouldn't do it !]]></title>
      <guid>http://www.phpdeveloper.org/news/15286</guid>
      <link>http://www.phpdeveloper.org/news/15286</link>
      <description><![CDATA[<p>
New on the Zend Developer Zone today there's a post that looks at working with the Zend_Registry component of the <a href="http://framework.zend.com">Zend Framework</a> and how deleting the index out of it directly <a href="http://devzone.zend.com/article/12643-Deleting-indexes-from-Zend_Registry-and-why-you-shouldnt-do-it-">could be a bad thing for your application</a>.
</p>
<blockquote>
Zend_Registry is the implementation of the Registry design pattern in the Zend Framework. It is similar to the $_GLOBALS array in pure PHP , but unlike it, it does not provide a transparent way to unset values at a specified index. As you will see in this short article, there is a very simple way to do it, but that doesn't mean it should be done.
</blockquote>
<p>
He advises against directly using the "_unsetInstance" method that the component provides to remove items from the registry but that could cause unwanted side effects with your data. Instead he recommends using the SPL ArrayObject interfaces and the "offsetUnset" method on the registry instance to drop the item. He ends with a word of warning, though - be careful what you remove in one part of your application because something, somewhere might be depending on it being there, set or not, to make another decision.
</p>]]></description>
      <pubDate>Fri, 15 Oct 2010 09:19:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ServerGrove Blog: Creating indexes for your Doctrine ODM documents with Symfony 2]]></title>
      <guid>http://www.phpdeveloper.org/news/15249</guid>
      <link>http://www.phpdeveloper.org/news/15249</link>
      <description><![CDATA[<p>
On the ServerGrove blog there's <a href="http://blog.servergrove.com/2010/10/07/creating-indexes-for-your-doctrine-odm-documents-with-symfony-2/">a new post</a> showing you how to create indexes for your <a href="http://www.doctrine-project.org/projects/mongodb_odm/1.0/docs/reference/indexes/en#indexes">Doctrine ODM documents</a> in a Symfony 2 application.
</p>
<blockquote>
Creating indexes in NoSQL / Document-based databases is quite different compared to traditional relational databases. Since the former are schema-less (there is no table creation), indexes do not get created when the collection or the document is created or inserted. Here is a quick tip that will create all the indexes defined in your documents when using Symfony 2 and Doctrine ODM for MongoDB. Indexes are a great way to speed up your queries, in fact, it is a crime not to include them in your documents.
</blockquote>
<p>
Adding the index is as easy as putting a new annotation on the property in its document class (for @Index) and run a bit of code in Symfony to build it out. The two lines you'll need to execute are included in the post.
</p>]]></description>
      <pubDate>Fri, 08 Oct 2010 08:24:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Indexing Web Content with PHP and SWISH-E]]></title>
      <guid>http://www.phpdeveloper.org/news/13556</guid>
      <link>http://www.phpdeveloper.org/news/13556</link>
      <description><![CDATA[<p>
On the Zend Developer Zone today <i>Vikram Vaswani</i> has <a href="http://devzone.zend.com/article/11335-Indexing-Web-Content-with-PHP-and-SWISH-E?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ZendDeveloperZone+(Zend+Developer+Zone+-+front+page)">posted a new tutorial</a> covering the integration of PHP and SWISH-E, one of many alternatives for indexing content and making it searchable.
</p>
<blockquote>
This article deals with one such alternative, SWISH-E aka the Simple Web Indexing System for Humans - Enhanced. As the name suggests, SWISH-E is particularly good at indexing Web content, be it in text, HTML, XML, PDF or DOC format. If you're trying to add a full-text search engine to your Web site, but don't really want to spend too much time on configuration and data processing, this might just be the thing you're looking for.
</blockquote>
<p>
He looks at some of the basics of SWISH-E, how to get it all installed (as a PECL module) and some of the other libraries it'll need to get working. He shows how to create a sample index and search on the command line and how to spider a site to gather the information it needs to index.
</p>]]></description>
      <pubDate>Wed, 18 Nov 2009 12:43:31 -0600</pubDate>
    </item>
  </channel>
</rss>
