<?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>Tue, 18 Jun 2013 19:36:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sameer Borate: Simple user authentication in Laravel 4]]></title>
      <guid>http://www.phpdeveloper.org/news/19729</guid>
      <link>http://www.phpdeveloper.org/news/19729</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i> has a new post today showing how you can do <a href="http://www.codediesel.com/frameworks/simple-user-authentication-in-laravel-4/">simple user authentication</a> in a <a href="http://laravel.com">Laravel 4</a>-based application using the built-in Auth functionality.
</p>
<blockquote>
With the recent release of Laravel 4, PHP developers have at their disposal one of the finest frameworks for application development. As with all new frameworks, it is always good to write some quick code to get a feel for the underlying architecture. The following post shows a simple authentication application using Laravel.
</blockquote>
<p>
He walks you through the creation of the simple "users" table, the configuration the Auth class will need to connect and authenticate and the form for the login. He also shows the steps for the actual authentication process as well as the code for the routes to make it all work. Additionally, he shows how to restrict pages to only those with the "admin" level access via an auth filter. You can download the <a href="http://www.codediesel.com/downloads/laravel-login-demo">example code here</a>.
</p>
Link: http://www.codediesel.com/frameworks/simple-user-authentication-in-laravel-4]]></description>
      <pubDate>Mon, 17 Jun 2013 14:22:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Extract Objects from an Access Database with PHP, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19661</guid>
      <link>http://www.phpdeveloper.org/news/19661</link>
      <description><![CDATA[<p>
PHPMaster.com has posted the <a href="http://phpmaster.com/extract-ole-objects-from-an-access-database-using-php-2/">second part</a> of their series covering connecting PHP to a legacy Access database. In <a href="http://phpmaster.com/extract-ole-objects-from-an-access-database-using-php-1/">part one</a> they introduced you to working with the data and how to extract the object. In this new part they look at specific file types and how to pull out their data.
</p>
<blockquote>
 In this second part we'll learn how to extract Acrobat PDF documents and take a brief look at a selection of image formats. The only similarity that PDF, GIF, PNG, etc., have when stored in an Access database is that they are all wrapped in an OLE container consisting of a variable length header and trailer. As we shall see, the trailer can be ignored as it was with the package discussed in Part 1. The header is more useful, but doesn't contain all the information we need.
</blockquote>
<p>
They get into the details of the headers for each type of object and include screenshots of what they look like in a hex viewer. The code for the complete class is included in the post, making it easy to drop in and get started with your transition from database object to external file. 
</p>
Link: http://phpmaster.com/extract-ole-objects-from-an-access-database-using-php-2]]></description>
      <pubDate>Mon, 03 Jun 2013 10:37:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[MaltBlue.com: Zend Framework 2 - Hydrators, Models and the TableGateway Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/19589</guid>
      <link>http://www.phpdeveloper.org/news/19589</link>
      <description><![CDATA[<p>
<i>Matthew Setter</i> has written up a post to his site that continues his look at the features of Zend Framework 2. This time he's looking specifically at <a href="http://www.maltblue.com/tutorial/zendframework2-hydrators-models-tablegateway-pattern">hydrators, models and the table gateways</a> and their use in connecting your application with a database.
</p>
<blockquote>
One set of features has really been helping me of late ones that really have me smiling; these are: Hydrators, Models and Table Gateways. If you're new to ZF2 or database interaction with frameworks, then you're in a perfect position as today's post will be giving you a good introduction to the basics of using both together.
</blockquote>
<p>
He starts with a look back at how it all was done in ZF1 and shows how using these three components makes for an even better system, allowing the model to be completely data-source agnostic. His examples start with the table gateway class, showing how to connect it with a "users" table. From there he adds in the model (with an "exchangeArray" method) and a hydrator that maps the table columns to the properties on the entity. He shows how to add this setup to the service configuration and its use in a controller, returning a full list of the records in the "user" table.
</p>
Link: http://www.maltblue.com/tutorial/zendframework2-hydrators-models-tablegateway-pattern]]></description>
      <pubDate>Wed, 15 May 2013 11:13:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Jones: Getting Started with PHP Zend Framework 2 for Oracle DB]]></title>
      <guid>http://www.phpdeveloper.org/news/19588</guid>
      <link>http://www.phpdeveloper.org/news/19588</link>
      <description><![CDATA[<p>
In his <a href="https://blogs.oracle.com/opal/entry/getting_started_with_php_zend">latest post</a> to his site <i>Chris Jones</i> shows you how to update the <a href="http://zf2.readthedocs.org/en/latest/user-guide/overview.html">Zend Framework 2 tutorial app</a> (quickstart) to make it work with an Oracle database instead.
</p>
<blockquote>
This post shows the changes to the <a href="http://zf2.readthedocs.org/en/latest/user-guide/overview.html">ZF2 tutorial application</a> to allow it to run with Oracle Database 11gR2. [...] The instructions for creating the sample ZF2 application are <a href="http://zf2.readthedocs.org/en/latest/user-guide/overview.html">here</a>. Follow those steps as written, making the substitutions shown [in the rest of the post].
</blockquote>
<p>
The full schema definition is included in the post, complete with the same sample data as the tutorial. He includes the updates you'll need to make to the database configuration for the OCI8 connection and changes to the code to accommodate the Oracle data format (mostly uppercasing everything). 
</p>
Link: https://blogs.oracle.com/opal/entry/getting_started_with_php_zend]]></description>
      <pubDate>Wed, 15 May 2013 10:55:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[7PHP.com: A Chat With Adminer - A Simple, Yet Effective, Database Management tool written in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19578</guid>
      <link>http://www.phpdeveloper.org/news/19578</link>
      <description><![CDATA[<p>
On 7PHP.com today there's a new interview with <i>Jakub Vrana</i> about his tool <a href="http://www.adminer.org/">Adminser</a>, a lightweight alternative to things like phpMyAdmin for database management.
</p>
<blockquote>
<a href="http://www.adminer.org/">Adminer</a>, formerly known as phpMinAdmin, is a full-featured database management tool to be used as a more simple, effective and fast alternative to the famous PHPmyAdmin. Being curious about it, I had a chat with the creator of Adminer, Jakub Vrana.
</blockquote>
<p>
They talk about the problem the tool tries to solve and where the idea to make it came from. There's also a bit about why to use it over something like phpMyAdmin and what the current status/future plans for it are. If you want to read an interview with <i>Jakub</i> about his work and experiences, you can check out <a href="http://7php.com/php-interview-jakub-vrana/">this post</a>.
</p>
Link: http://7php.com/adminer-interview]]></description>
      <pubDate>Mon, 13 May 2013 09:12:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate: Efficiently Replicating RETS data to MySQL]]></title>
      <guid>http://www.phpdeveloper.org/news/19542</guid>
      <link>http://www.phpdeveloper.org/news/19542</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i> has a new post to his site that shares how he <a href="http://www.codediesel.com/data/efficiently-replicating-rets-data-to-mysql/">converted a RETS database to MySQL</a> with the help of a PHP library, <a href="https://github.com/troydavisson/PHRETS/wiki">PHPRETS</a>.
</p>
<blockquote>
A recent project of mine entailed replicating a <a href="http://www.reso.org/rets">RETS</a> database on a local MySQL database server. The client had a new real-estate mobile search app in development and wanted to have a local copy of the RETS database for search queries instead of a remote RETS server. [...] Replicating RETS data rather than using the live version is slightly complex, however. In order to replicate the RETS data into your own local database, a series of processes are needed in order to make sure the data you have is both updated and in sync with the server. 
</blockquote>
<p>He breaks it down into three main steps with some sample code for each:</p>
<ul>
<li>Grabbing the complete database once
<li>Keeping the data in sync
<li>Ensuring the cron job is executed on regular intervals
</ul>
Link: http://www.codediesel.com/data/efficiently-replicating-rets-data-to-mysql]]></description>
      <pubDate>Fri, 03 May 2013 10:26:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Building a PHP RSS Aggregator]]></title>
      <guid>http://www.phpdeveloper.org/news/19413</guid>
      <link>http://www.phpdeveloper.org/news/19413</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a quick tutorial showing you how to <a href="http://www.phpbuilder.com/articles/php-functions/xml/building-a-php-rss-aggregator.html">build an RSS aggregator</a> that can pull in RSS content and drop it into a MySQL table.
</p>
<blockquote>
RSS stands for Really Simple Syndication. It is a Web format that allows website owners to distribute their latest and frequently updated content in a standardized way. RSS feed is actually an XML document that can be easily read by using RSS reader software or built-in functions in programming languages, such as PHP or Java. In this article, the focus will be on building a RSS aggregator in PHP.
</blockquote>
<p>
They introduce the basics of an RSS feed - a specially formatted XML document with values for individual posts (like "title" and "link". They provide the SQL structure for the "article" and "feed" tables and the code to pull out each "feed" record, parse it and drop that into the "article" table for later consumption. They show two different methods for getting the content - one using <a href="http://php.net/file_get_contents">file_get_contents</a> and another using <a href="http://php.net/curl">cURL</a>.
</p>
Link: http://www.phpbuilder.com/articles/php-functions/xml/building-a-php-rss-aggregator.html]]></description>
      <pubDate>Thu, 04 Apr 2013 13:09:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Duckout Blog: Do Funny Stuff with the Google Charts API and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19366</guid>
      <link>http://www.phpdeveloper.org/news/19366</link>
      <description><![CDATA[<p>
In <a href="http://www.duckout.de/programming/do-funny-stuff-with-the-google-charts-api-and-php/">this recent post</a> to the Duckout blog, they show you how to hook your PHP-based (and database driven) application into the Google Charting API for chart/graph generation.
</p>
<blockquote>
I think, whenever we see a chart in a magazine, in books or applications our brain say's to us Yeepie!!! Don't read these stupid texts or tables! Just look at the green or yellow line and hope that they are above the other lines or hope that your opinion is the biggest part of the pie¯. This saves us a lot of work and in my opinion we should concentrate on drawing beautiful colorized pie charts, instead of writing long boring articles. But the question is: ¯How do I draw these beautiful colorized pie charts? The simple answer is: you don't have to, because google will draw them for you and you just have to tell them what to draw via the google charts api.
</blockquote>
<p>
The <a href="https://github.com/Gamma32/breakfast">sample application</a> is a "breakfast rating" tool that logs the results to a MySQL database via PDO calls. The results are then extracted and formated as JSON to be compatible with the Google Charts API data handling. Some sample Javascript is included showing how to call the Charts API with your data and get back a simple line graphing of the data from the database. You can see the application in action <a href="http://breakfast.cloudcontrolled.com/">here</a> for reference.
</p>]]></description>
      <pubDate>Tue, 26 Mar 2013 11:40:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam: Look mama, no databases]]></title>
      <guid>http://www.phpdeveloper.org/news/19325</guid>
      <link>http://www.phpdeveloper.org/news/19325</link>
      <description><![CDATA[<p>
In his most recent post <i>Michelangelo van Dam</i> talks about <a href="http://www.dragonbe.com/2013/03/look-mama-no-databases.html">unit testing and databases</a> and how, to effectively test what should be tested (the code, not "the ability to fetch data") you need to correctly mock your database objects.
</p>
<blockquote>
When I state "as is", I truly mean the way it's being used in production. So the database call collects real data on which business logic is applied. You can see this is not a healthy situation, especially when you also have services that apply business logic on data and store it back into the database. In "<a href="https://leanpub.com/grumpy-phpunit?ref=dragonbe>The Grumpy Programmer's PHPUnit Cookbook</a>", author <a href="https://twitter.com/grmpyprogrammer">Chris Hartjes</a> wrote this one sentence that says it all: "Unit test suites are meant to be testing code, not the ability of a database server to return results". And he's right, you shouldn't use database connections when your testing business rules and functional logic.
</blockquote>
<p>
He goes on to show a few code examples that show a pre-mocked state of testing where the Product information is pulled directly from a PDO connection. The more correct version mocks out this object, though, and overrides the "execute" and "fetchAll" methods to return mocked results. 
</p>]]></description>
      <pubDate>Mon, 18 Mar 2013 10:11:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Maarten Balliauw: Working with Windows Azure SQL Database in PhpStorm]]></title>
      <guid>http://www.phpdeveloper.org/news/19231</guid>
      <link>http://www.phpdeveloper.org/news/19231</link>
      <description><![CDATA[<p>
<i>Maarten Balliauw</i> has a new post to his site showing how you can work with a Azure SQL database <a href="http://blog.maartenballiauw.be/post/2013/02/25/Working-with-Windows-Azure-SQL-Database-in-PhpStorm.aspx">directly from the UI</a> of the popular PHP IDE, <a href="http://www.jetbrains.com/phpstorm/">phpStorm</a>.
</p>
<blockquote>
PhpStorm provides us the possibility to connect to Windows Azure SQL Database right from within the IDE. In this post, we'll explore several options that are available for working with Windows Azure SQL Database: Setting up a database connection, creating a table, inserting and updating data, using the database console, generating a database diagram and database refactoring.
</blockquote>
<p>
He includes the instructions and several screenshots showing each step of the above mentioned steps. The database diagram gives you a good overall view of your database structure and allows you to show a visualization of how the tables relate to each other. Note that, though this particular example shows it connecting to an Azure SQL database, the same setup can be used with lots of popular RDBMS out there.
</p>]]></description>
      <pubDate>Mon, 25 Feb 2013 09:13:20 -0600</pubDate>
    </item>
  </channel>
</rss>
