<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Coen's blog &#187; PHP</title>
	<atom:link href="http://blog.coenbijlsma.nl/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.coenbijlsma.nl</link>
	<description>The blog of Coen Bijlsma (coenie)</description>
	<lastBuildDate>Wed, 26 May 2010 20:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>About how school can be enjoyed again</title>
		<link>http://blog.coenbijlsma.nl/2008/02/16/about-how-school-can-be-enjoyed-again/</link>
		<comments>http://blog.coenbijlsma.nl/2008/02/16/about-how-school-can-be-enjoyed-again/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 16:46:23 +0000</pubDate>
		<dc:creator>coen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[hulk]]></category>
		<category><![CDATA[School]]></category>

		<guid isPermaLink="false">http://blog.coenbijlsma.nl/2008/02/16/about-how-school-can-be-enjoyed-again/</guid>
		<description><![CDATA[Finally I have some time to write another post to you, my dear readers! After starting up the HULK for about a fortnight, we started to bring up ideas for projects (so if anyone has an idea&#8230;). Actually, while I&#8217;m writing this I realize that I haven&#8217;t told you anything yet about the HULK (hmm.. [...]]]></description>
			<content:encoded><![CDATA[<p>Finally I have some time to write another post to you, my dear readers!</p>
<p>After starting up the <a href="http://www.hunix.nl" title="HULK" target="_blank">HULK</a> for about a fortnight, we started to bring up ideas for projects (so if anyone has an idea&#8230;). Actually, while I&#8217;m writing this I realize that I haven&#8217;t told you anything yet about the HULK (hmm.. weird).<br />
Well,  HULK stands for Hogeschool Utrecht Linux Kennisgroep, and consists of a few classmates and yours truly, who try to give Linux a shot in our university, the Hogeschool of Utrecht. The website is in Dutch, so if you want to follow up on it, you have to be able to read it.</p>
<p>We thought about some really cool projects like building our own Ubuntu distribution, HUbuntu , setting up Linux on mobile devices, teaching Unix, and also some smaller projects like building a logbook to keep track of what we&#8217;re doing and to provide student services (SSH access, web servers, database servers, etc.). Apart from that, I&#8217;ve started learning c(++), and for practice I&#8217;m building an IRC client, called skaar.</p>
<p>Next week, together with Mattijs, I&#8217;m starting on the logbook which will be built in PHP, so that we can start logging quickly.</p>
<p>Keeping you posted!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.coenbijlsma.nl/2008/02/16/about-how-school-can-be-enjoyed-again/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>One step at a time</title>
		<link>http://blog.coenbijlsma.nl/2007/12/29/one-step-at-a-time/</link>
		<comments>http://blog.coenbijlsma.nl/2007/12/29/one-step-at-a-time/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 12:08:46 +0000</pubDate>
		<dc:creator>coen</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[or mapping]]></category>

		<guid isPermaLink="false">http://blog.coenbijlsma.nl/2007/12/29/one-step-at-a-time/</guid>
		<description><![CDATA[Some time ago I wrote about some great plans for writing an or-mapping. Well, today, I actually made some progress! Before I started to write on this code, I divided it in three parts: Creating Objects Updating Objects Deleting Objects I finished a test version of the first part today. Basically, this is how it [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I wrote about some <a target="_blank" href="http://blog.coenbijlsma.nl/2007/12/18/great-plans/" title="Great Plans :)">great plans</a> for writing an <abbr title="Object Relational mapping"></abbr>or-mapping. Well, today, I actually made some progress!</p>
<p>Before I started to write on this code, I divided it in three parts:</p>
<ol>
<li>Creating Objects</li>
<li>Updating Objects</li>
<li>Deleting Objects</li>
</ol>
<p>I finished a test version of the first part today. Basically, this is how it works: There is a class <code>Object</code> that should be extended by every class that has to be in a database. If you create a class extending this one, it will also be created in the database (if it doesn&#8217;t exist yet) as a table. For example, see this class:</p>
<pre><code> 

/**
 * foo
 * bar
 * @table_name=__TEST__
 *
 */
class Test extends Object {    </code></pre>
<pre><code>     </code><code>/**
     * @nullable = false
     */
    private $firstname; 

    private $lastname; 

    /**
    * @type = string(12)
    * @nullable = false
    */
    private $dateofbirth; 

    private $city; 

    function __construct() {
       parent::__construct();
   } 

    public function getFirstName(){
   	return $this-&gt;firstname;
   } 

    public function setFirstname($firstname){
   	$this-&gt;firstname = $firstname;
   } 

    public function getLastname(){
   	return $this-&gt;lastname;
   } 

    public function setLastname($lastname){
   	$this-&gt;lastname = $lastname;
   } 

    public function getDateofbirth(){
   	return $this-&gt;dateofbirth;
   } 

    public function setDateofbirth($dob){
   	$this-&gt;dateofbirth = $dob;
   } 

    public function getCity(){
   	return $this-&gt;city;
   } 

    public function setCity($city){
   	$this-&gt;city = $city;
   }
}
</code></pre>
<p>Will result in this table:<br />
<a target="_blank" href="http://blog.coenbijlsma.nl/tempimg/screenie.jpg"><img align="left" width="500" src="http://blog.coenbijlsma.nl/tempimg/screenie.jpg" alt="table screenie" height="127" /></a></p>
<pre>
</pre>
<p>Pretty cool, huh? I still have to do some work, but the base is there. As you can see, you can also use some kind of annotations to set the information for the table and the columns in the database, but there are also default settings if they are omitted.<br />
Enough for today, I&#8217;m going to celebrate my weekend and &#8220;Oud &amp; nieuw&#8221;, as we call New Year&#8217;s Eve in Holland <img src='http://blog.coenbijlsma.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Soon more about this!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.coenbijlsma.nl/2007/12/29/one-step-at-a-time/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Great plans</title>
		<link>http://blog.coenbijlsma.nl/2007/12/18/great-plans/</link>
		<comments>http://blog.coenbijlsma.nl/2007/12/18/great-plans/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 10:01:31 +0000</pubDate>
		<dc:creator>coen</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[EJB]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.coenbijlsma.nl/2007/12/18/great-plans/</guid>
		<description><![CDATA[In the 2nd year of my study at the HU we learned about J2EE, in particular EJB. Happy with the general idea of never writing another line of SQL, we started doing our school projects with EJB. However it&#8217;s true that you don&#8217;t write SQL, there is EJB-QL, which looks a darn lot like SQL. [...]]]></description>
			<content:encoded><![CDATA[<p>In the 2nd year of my study at the <a href="http://www.hu.nl/" title="Hogeschool Utrecht">HU</a> we learned about J2EE, in particular <a href="http://java.sun.com/products/ejb/" title="Enterprise Java Beans">EJB</a>. Happy with the general idea of never writing another line of <abbr title="Structured Query Language">SQL</abbr>, we started doing our school projects with <abbr title="Enterprise Java Beans">EJB</abbr>. However it&#8217;s true that you don&#8217;t write SQL, there is EJB-QL, which looks a darn lot like SQL.<br />
While I like the concept, I wonder if Java is the right language to use. I can&#8217;t help thinking about all the layers my poor code has to go through, and how can that ever be fast? Anyway, according to <a href="http://shootout.alioth.debian.org/" title="Computer Language Benchmarks">this</a> test, Java is way faster than PHP, which was originally intended for the web (<a href="http://en.wikipedia.org/wiki/Comparison_of_programming_languages" title="Wikipedia">Wikipedia</a> also has a nice comparison about this).</p>
<p>Strangely enough, at that time there was no framework or <a href="http://en.wikipedia.org/wiki/Abstraction_layer" title="Wikipedia Abstraction Layer">abstraction layer</a> available for PHP, so I started building one myself. The idea was for it to work like <abbr title="Enterprise Java Beans">EJB</abbr>, and the result was satisfactory. Then doom hit me, because I lost all that code <img src='http://blog.coenbijlsma.nl/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  So now I&#8217;m going to start all over again, with a slightly different angle: I am going to write a framework that communicates with the <a href="http://framework.zend.com/" title="Zend Framework">Zend Framework</a>, but with a little extra: the Zend Framework does not provide creation and automatic querying for your objects in the database, and that&#8217;s what will be the extra in my framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.coenbijlsma.nl/2007/12/18/great-plans/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
