<?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>Wed, 19 Jun 2013 16:28:56 -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[Alex Bilbie: Introducing MongoQB]]></title>
      <guid>http://www.phpdeveloper.org/news/18759</guid>
      <link>http://www.phpdeveloper.org/news/18759</link>
      <description><![CDATA[<p>
<i>Alex Bilbie</i> has passed along a link to a project he's been working on to try to simplify access to MongoDB databases from PHP - his <a href="http://alexbilbie.com/2012/11/introducing-mongoqb/">MongoQB library</a>:
</p>
<blockquote>
A few years ago I released a <a href="https://github.com/alexbilbie/codeigniter-mongodb-library">MongoDB library</a> for the <a href="http://codeigniter.com/">CodeIgniter</a> PHP framework which has become quite popular thanks to it's likeness to CodeIgniter's query builder library. I've just spent the last week travelling and to keep myself occupied I spent some time re-architecting the library's code; removing the framework dependancy, making it <a href="http://getcomposer.org/">Composer</a> friendly and adding a full suite of unit tests. Check out the code on Github - <a href="https://github.com/alexbilbie/MongoQB">https://github.com/alexbilbie/MongoQB</a>.
</blockquote>
<p>
The library makes it simpler to do most of the usual CRUD (Create, Read, Update, Delete) operations with your Mongo data. Example code is included in the post. This is a nice lightweight alternative to things like the <a href="http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/query-builder-api.html">Doctrine query builder</a>.
</p>]]></description>
      <pubDate>Fri, 16 Nov 2012 09:38:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[VG Tech Blog: Using Elastica to Query ElasticSearch]]></title>
      <guid>http://www.phpdeveloper.org/news/18165</guid>
      <link>http://www.phpdeveloper.org/news/18165</link>
      <description><![CDATA[<p>
On the VG Tech blog today there's a new post by <i>Christer Edvartsen</i> about using the <a href="https://github.com/ruflin/Elastica">Elastica</a> PHP Elastic Search client to do more than just pull information out of the data source. He dug into the source of the tool itself and figured out a way to perform actual queries.
</p>
<blockquote>
The last couple of months I have been playing around with <a href="http://www.elasticsearch.org/">elasticsearch</a>, an open source, distributed, RESTful search engine built on top of Apache Lucene. To interact with elasticsearch in PHP I have been using a client called <a href="https://github.com/ruflin/Elastica">Elastica</a>. This was all fun and games until I needed to do actual queries, which is what our users will be doing most of the time. <a href="http://ruflin.github.com/Elastica/">Elastica's documentation</a> does not (yet) say anything about how to search using the client, so I needed to dig through the code to see if I could find some solutions. 
</blockquote>
<p>
He includes a sample mapping structure and shows how to take both a simple, single-term query and turn it into a request and how to make a more complex request with filters, facets, sorting and a few other things thrown in. He also shows how you can manually create a query (define the JSON structure yourself) and push that into the "query builder" for handling.
</p>]]></description>
      <pubDate>Tue, 03 Jul 2012 08:55:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Query parameter handling in Symfony2]]></title>
      <guid>http://www.phpdeveloper.org/news/17954</guid>
      <link>http://www.phpdeveloper.org/news/17954</link>
      <description><![CDATA[<p>
<i>Lukas Smith</i> is <a href="http://pooteeweet.org/blog/0/2096#m2096">looking for feedback</a> about a question that's been in his mind a lot lately - can the handling of query parameters be made better for the <a href="http://symfony.com">Symfony2</a> framework (and even easier to use).
</p>
<blockquote>
Obviously you can already access query parameters today already but it could be easier. Essentially what I want is a way for developers to easily configure what query parameters they expect and what values they expect. This is useful for several things like easier reading and validating of query parameters, self documenting API both for <a href="https://github.com/nelmio/NelmioApiDocBundle">API docs</a> for humans but also <a href="https://github.com/FriendsOfSymfony/FOSRestBundle/issues/52">for machines</a>.
</blockquote>
<p>
He's asking for feedback and ideas from the community on a <a href="https://github.com/FriendsOfSymfony/FOSRestBundle/pull/185">proposed solution</a> that could make things more flexible. He also briefly mentions the route matching and how qurey parameters could cause them not to match:
</p>
<blockquote>
For one I don't think that a mismatch on a <a href="http://symfony.com/doc/master/book/routing.html#adding-requirements">route requirement</a> of a query parameter cause the route to not match. However then it can quickly become confusing for the end user or it would require adding more and more syntax to handle all the different cases.
</blockquote>]]></description>
      <pubDate>Mon, 14 May 2012 11:56:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ulf Wendel's Blog: PHP mysqlnd query cache plugin quickstart is online!]]></title>
      <guid>http://www.phpdeveloper.org/news/17413</guid>
      <link>http://www.phpdeveloper.org/news/17413</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Ulf Wendel</i> has pointed out that the <a href="http://blog.ulf-wendel.de/2012/php-mysqlnd-query-cache-plugin-quickstart-is-online/">mysqlnd query cache plugin quickstart is posted</a> on the <a href="http://docs.php.net/manual/en/mysqlnd-qc.quickstart.php">docs.php.net</a> site.
</p>
<blockquote>
New in the PHP manual: a <a href="http://docs.php.net/manual/en/mysqlnd-qc.quickstart.php">quickstart for the mysqlnd query cache plugin</a>. PECL/mysqlnd_qc, the mysqlnd query cache plugin, is transparent and ease to use. But, how? Some pointers have been given in assorted <A href="http://blog.ulf-wendel.de/2012/php-mysqlnd-query-cache-plugin-quickstart-is-online/www.slideshare.net/nixnutz/">presentations</a>, here on my blog and in some, few examples from the manual. Fixed. You can now browse a quickstart to gain a quick overview.
</blockquote>
<p>
The <a href="http://pecl.php.net/package/mysqlnd_qc">query cache plugin</a> can replace the query caching MySQL does and can help with things like multiple storage options (memory, APC, Memcache, etc) and almost no changes to your application. There's also a method (mysqlnd_qc_get_query_trace_log) that comes with the plugin that gives you a "stack trace" of every query run through the MySQL interface. 
</p>]]></description>
      <pubDate>Wed, 18 Jan 2012 12:12:21 -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[Johannes Schl&#252;ter's Blog: MySQL Query Analyzer and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16935</guid>
      <link>http://www.phpdeveloper.org/news/16935</link>
      <description><![CDATA[<p>
<i>Johannes Schl&#252;ter</i> has a new post to his blog today mentioning the beta release of the <a href="http://pecl.php.net/mysqlnd_ms">mysqlnd_ms plugin</a> (previously mentioned by <a href="http://phpdeveloper.org/news/16918">Ulf Wendel</a> and a new feature that can be plugged into the MySQL Enterprise Monitor to make the Query Analyzer directly use PHP instead.
</p>
<blockquote>
When running a PHP-based application with MySQL it is often quite interesting to see what actually happens on the database sever. Besides monitoring of the system load etc. it is often interesting to see what queries are actually executed and which of them are expensive. A part of MySQL Enterprise Monitor is the <a href="http://mysql.com/products/enterprise/query.html">MySQL Query Analyzer</a> which helps answering these questions.
</blockquote>
<p>
This was handled via a proxy that sat between the database and app server and ran through the queries looking for improvements. This new plugin keeps it closer to PHP itself without having to hit against the proxy. You can see the result in these <a href="http://schlueters.de/blog/uploads/screenshots/mem_quan_php1.png">two</a> <a href="http://schlueters.de/blog/uploads/screenshots/mem_quan_php2.png">screenshots</a> from inside the Manager application. You also have the side benefit of getting a stack trace of it running through the app to help you identify the spots most needing improvement in the code too.
</p>]]></description>
      <pubDate>Fri, 30 Sep 2011 12:56:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Working Software Blog: Escaping single and double quotes for use with XPath queries in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16746</guid>
      <link>http://www.phpdeveloper.org/news/16746</link>
      <description><![CDATA[<p>
On the Working Software blog there's a new post showing a solution to a issue with <a href="http://www.workingsoftware.com.au/page/Escaping_single_and_double_quotes_in_XPath_queries_in_PHP">escaping quotes in XPath queries</a> that's not just an issue in PHP.
</p>
<blockquote>
I've been working with the Basecamp API to plugin our IRC bot that we use for time tracking and I'm astounded to learn that escaping single and/or double quotes for XPath queries in PHP does not have a well documented, best practices solution. In fact, it seems as though this is not peculiar to PHP. I took a look around and found this excellent article by "Kushal": <a href="http://kushalm.com/the-perils-of-xpath-expressions-specifically-escaping-quotes">http://kushalm.com/the-perils-of-xpath-expressions-specifically-escaping-quotes</a>.
</blockquote>
<p>
He's put together <a href="https://gist.github.com/1155973">his own (PHP) solution</a> to the problem - running the entire XPath query through a filtering method that splits it up, replaces the quote characters and combines it back down to a single string.
</p>]]></description>
      <pubDate>Fri, 19 Aug 2011 13:50:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[HashBangCode.com: Revisiting filter_var() and FILTER_VALIDATE_URL]]></title>
      <guid>http://www.phpdeveloper.org/news/16139</guid>
      <link>http://www.phpdeveloper.org/news/16139</link>
      <description><![CDATA[<p>
From the HashBangCode.com site today there's a new post that <a href="http://www.hashbangcode.com/blog/revisiting-filtervar-and-filtervalidateurl-548.html">revisits filtering with the filter_var function</a> included with the language. The focus in this article is specifically in validating URLs with the FILTER_VALIDATE_URL flag.
</p>
<blockquote>
<a href="http://www.hashbangcode.com/blog/php-filter-filtervalidateurl-limitations-111.html">Quite a while ago</a> I looked at using the filter_var() function to validate URL's using the FILTER_VALIDATE_URL flag and someone pointed out recently that this function has not only changed since the initial release, but that a number of flags can be added to change the way that this function works.
</blockquote>
<p>
He lists some of the other flags that are now available that can be used in conjunction with FILTER_VALIDATE_URL to get more fine-grained in your filtering - checks on things like a required scheme, hostname and query string. He includes some code with a set of URLs to run through some tests and output as a table with the pass/fail rank of each URL value. You can see the <a href="http://www.hashbangcode.com/examples/filter_var_url_validate/">resulting output here</a>.
</p>]]></description>
      <pubDate>Mon, 04 Apr 2011 08:44:45 -0500</pubDate>
    </item>
  </channel>
</rss>
