<?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>Sun, 19 May 2013 00:07:48 -0500</pubDate>
    <ttl>30</ttl>
    <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[Danne Lundqvist's Blog: Getting to grips with an existing XML structure]]></title>
      <guid>http://www.phpdeveloper.org/news/17864</guid>
      <link>http://www.phpdeveloper.org/news/17864</link>
      <description><![CDATA[<p>
<i>Danne Lundqvist</i> has a new post where he shares a bit of code he's written to "come to grips" with <a href="http://www.dotvoid.com/2012/04/getting-to-grips-with-an-existing-xml-structure/">an existing XML structure</a>.
</p>
<blockquote>
Very often I find myself writing input filters for large XML files using PHP. Common enough task; and PHP offer a great variety of tools to do this effectively depending on the situation. Unfortunately, almost as common is the lack of documentation for the aforementioned XML files. [...] I have looked around for a simple tool but I didn't really find a  tool that gave me the quick and dirty overview I wanted. A year or so ago I finally wrote a small PHP class to analyze large XML files.
</blockquote>
<p>
He includes an example XML file, the <a href="http://www.dotvoid.com/wp-content/uploads/2012/04/xmlstruct.png">HTML output</a> of the parsing and a sample of how to use <a href="http://www.dotvoid.com/wp-content/uploads/2012/04/xmlgrips.tar.gz">the class</a> to parse and output the XML structure, complete with some CSS.
</p>]]></description>
      <pubDate>Wed, 25 Apr 2012 10:44:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate' Blog: Creating SQL schemas with Doctrine DBAL]]></title>
      <guid>http://www.phpdeveloper.org/news/15621</guid>
      <link>http://www.phpdeveloper.org/news/15621</link>
      <description><![CDATA[<p>
On his blog today <i>Sameer Borate</i> has a new post looking at <a href="http://www.codediesel.com/mysql/creating-sql-schemas-with-doctrine-dbal">using Doctrine DBAL to make schemas</a> rather than having to make them by hand each time (can be very useful for reloads with fixtures).
</p>
<blockquote>
A tedious task during web development is that of database schema creation. A schema containing a few tables comprising of a small set of rows is quick, while that containing dozens of tables and large numbers of columns is a tedious process. I usually resort to a small php script with some regular expression tossed in to automatically create a schema from a text file definition. But that is a little buggy as I've to manually add the indexes and other small things. Now that Doctrine has released a DBAL library, this will provide a nice ability to automatically create sql schemas.
</blockquote>
<p>
He introduces the <a href="http://www.doctrine-project.org/projects">DBAL abstraction layer</a> and includes a basic script to create a schema for a MySQL database, manually adding the columns and setting up things like primary keys and foreign key constraints. He also includes the SQL statements that it will generate and execute on your Doctrine-based connection.
</p>]]></description>
      <pubDate>Wed, 22 Dec 2010 14:25:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Keep our PostgreSQL databases synchronized with PHP. Database version control]]></title>
      <guid>http://www.phpdeveloper.org/news/15567</guid>
      <link>http://www.phpdeveloper.org/news/15567</link>
      <description><![CDATA[<p>
In <a href="http://gonzalo123.wordpress.com/2010/12/13/keep-our-postgresql-databases-syncronized-with-php-database-version-control/">this new post</a> to his blog today <i>Gonzalo Ayuso</i> looks at how he's set up a system that uses PHP to synchronize their PostgreSQL databases' schemas when things changed.
</p>
<blockquote>
We create source code at development server and push the changes to production. It's really easy to keep synchronized all our code. But with databases it's different. [...] It's a recurrent problem working with databases. We create database objects (tables, views, ..) in the development server and when our application is ready to go live we push the changes to production server. If we are smart developers we save all database scripts in a file and when we deploy them to production we execute the script.
</blockquote>
<p>
He mentions tools like <a href="http://dbdeploy.com/">dbdeploy</a> and <a href="http://phing.info/">phing</a> to help make these migrations a bit more automatic. He needed something a little different though - a command-line script that would, based on an ini file, sync two or more databases. He's created the <a href="http://code.google.com/p/pgdbsync/source/browse/pgdbsync">basic script</a> that includes the actions to show the differences between the databases, a summary of the differences and an execution method to bring them into sync. He gives a basic example of how it would handle the sync between his example production and development databases.
</p>]]></description>
      <pubDate>Mon, 13 Dec 2010 09:26:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Akrabat_Db_Schema_Manager: Zend Framework database migrations]]></title>
      <guid>http://www.phpdeveloper.org/news/14260</guid>
      <link>http://www.phpdeveloper.org/news/14260</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has a new post to his blog today that looks at <a href="http://akrabat.com/zend-framework/akrabat_db_schema_manager-zend-framework-database-migrations/">database migrations in Zend Framework applications</a>. He introduces a component of his own - Akrabat_Db_Schema_Manager - to handle the migrations.
</p>
<blockquote>
It is intended that any time you want to make a change to your database schema (add columns, tables, indexes, etc), then you create a new migration file. [...] The migration file contains a class that extends Akrabat_Db_Schema_AbstractChange  and must contain two methods: up() and down(). It follows that up() is called when implementing the changes in this migration and down() is called to put the database back where it was if the change is backed out.
</blockquote>
<p>
He includes an example of a migration file, one that defines the "up" method to create a table and the "down" to remove it. The Akrabat_Db_Schema_Manager is what your script would interface with by calling the "updateTo" method and change your database's structure. It can even hook into Zend_Tool to make it command-line friendly.
</p>]]></description>
      <pubDate>Mon, 29 Mar 2010 10:16:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Converting Legacy Apps to CakePHP, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/11535</guid>
      <link>http://www.phpdeveloper.org/news/11535</link>
      <description><![CDATA[<p>
<i>Chris Hartjes</i> has posted the <a href="http://www.littlehart.net/atthekeyboard/2008/12/04/converting-legacy-apps-to-cakephp-part-2/">second part</a> of his look at converting legacy applications over to a more structured CakePHP environment. In this new post he looks at working with the database schema.
</p>
<blockquote>
Now you've decided to convert your legacy app over to CakePHP, you will run into the first serious obstacle: your database schema. To put it bluntly, if your schema does not already account for relationships between multiple tables you are screwed. Given that CakePHP is good at generating the queries you need to pull related records in for you, you NEED that schema to contain relationships. 
</blockquote>
<p>
He talks about the importance of relationships, creating his working models and some things to get well acquainted with - ow relationships work in CakePHP, how to use <a href="http://book.cakephp.org/view/474/Containable">Containable behavior</a> and some good SQL to back you up should you need it.
</p>]]></description>
      <pubDate>Tue, 09 Dec 2008 10:26:09 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Francois Zaninotto's Blog: Validating a YAML file against a schema in PHP ]]></title>
      <guid>http://www.phpdeveloper.org/news/11081</guid>
      <link>http://www.phpdeveloper.org/news/11081</link>
      <description><![CDATA[<p>
<i>Francois Zaninotto</i> submitted a <a href="http://redotheweb.com/2008/09/09/validating-a-yaml-file-against-a-schema-in-php/">tutorial he's written up</a> about creating a YAML validation script with PHP.
</p>
<blockquote>
As of today, there is no simple way to validate the syntax of a YAML file in PHP. But with two simple tricks, it takes only a few dozens of lines of code to build a robust validator capable of checking the syntax of any YAML file against a given schema.
</blockquote>
<p>
He points out that Ruby has a tool for this (<a href="http://www.kuwata-lab.com/kwalify/">kwalify</a>) but PHP doesn't. He creates his own with the help of the <A href="http://trac.symfony-project.org/browser/branches/1.1/lib/yaml">sfYaml</a> component from the symfony framework, translating the YAML data into something PHP can parse more easily - XML. He passes this through an XSL parser and uses the DOM XML <a href="http://php.net/schemaValidate">schemaValidate</a> function to check it against the given schema.
</p>]]></description>
      <pubDate>Wed, 24 Sep 2008 12:58:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Padraic Brady's Blog: ZF Blog Tutorial Addendum #1: Base URL, Magic Quotes, Database Schema & UTF-8]]></title>
      <guid>http://www.phpdeveloper.org/news/10302</guid>
      <link>http://www.phpdeveloper.org/news/10302</link>
      <description><![CDATA[<p>
<i>Padraic Brady</i> has <a href="http://blog.astrumfutura.com/archives/373-Zend-Framework-Blog-Application-Tutorial-Addendum-1-Base-URL,-Magic-Quotes-Reversal,-Database-Schema-and-UTF-8-Title-Transliteration.html">an addendum</a> he's posted to his "making a blogging application with the Zend Framework" series dealing with a few random issues from along the way.
</p>
<blockquote>
The interesting thing about live publishing of a long tutorial series is that it's not flawless. In fact it's the opposite. [...] To cover all these I'll occasionally highlight the more important ones both in notes to new entries, or where they slip past me, in Addendum entries like this one.
</blockquote>
<p>
There's four sections in <a href="http://blog.astrumfutura.com/archives/373-Zend-Framework-Blog-Application-Tutorial-Addendum-1-Base-URL,-Magic-Quotes-Reversal,-Database-Schema-and-UTF-8-Title-Transliteration.html">this update</a> - one dealing with the referencing of base URLs, another worrying about magic_quotes settings, an updated database schema for the project and the final about removing non-english characters in the title URLs.
</p>]]></description>
      <pubDate>Thu, 29 May 2008 16:12:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: Use an XML database in PHP and Java applications]]></title>
      <guid>http://www.phpdeveloper.org/news/9904</guid>
      <link>http://www.phpdeveloper.org/news/9904</link>
      <description><![CDATA[<p>
The IBM developerWorks site has <a href="http://www.ibm.com/developerworks/edu/x-dw-x-xmldbjavaphp.html?S_TACT=105AGX44&S_CMP=HP">posted a tutorial</a> (you'll need to log in) showing how to use native XML databases to speed up development time for your applications.
</p>
<blockquote>
Native XML databases have grown in popularity along with XML, because data is stored as native XML, rather than through tables in a traditional database. Using a native XML database means that a change to the schema requires minimal changes to your code and no change to the database. PHP and Java developers can benefit greatly from using native XML databases
</blockquote>
<p>
IT talks about how to connect to the database (in this case DB2), grab the XML data via a query and how to insert information back in via a web-based form. There's also an example showing how to make a "search" on the data and how to change the schema of the database on the fly as well.
</p>]]></description>
      <pubDate>Thu, 03 Apr 2008 09:33:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Greg Beaver's Blog: Update to libxml2 in PHP - progress hath been acquired]]></title>
      <guid>http://www.phpdeveloper.org/news/7988</guid>
      <link>http://www.phpdeveloper.org/news/7988</link>
      <description><![CDATA[<p>
Related to an <a href="http://greg.chiaraquartet.net/archives/176-W3C-SchemaRelax-NGDTD-seem-to-be-totally-useless-in-PHP,-help.html">issue from a previous post</a>, <i>Greg Beaver</i> has <a href="http://greg.chiaraquartet.net/archives/177-Update-to-libxml2-in-PHP-progress-hath-been-acquired.html">posted a solution</a> to his Relax NG schema problem in PHP.
</p>
<blockquote>
Shortly after my last blog post, I got a very helpful email from Rob Richards, who offered to help me with my trials and tribulations. He took a quick look at the schema for package.xml, and a sample package.xml and was able to find two small tweaks to make parsing actually work (gasp). This changes everything. I am abandoning the creation of a relax NG schema in favor of the battle-tested xsd. The error messages for xsd validation are far clearer than the rng ones.
</blockquote>
<p>
The <a href="http://greg.chiaraquartet.net/archives/177-Update-to-libxml2-in-PHP-progress-hath-been-acquired.html">code included</a> shows how much simpler the error messages are with the XSD validation option versus the RNG ones.
</p>]]></description>
      <pubDate>Wed, 06 Jun 2007 11:45:00 -0500</pubDate>
    </item>
  </channel>
</rss>
