<?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>Eirik Hoem&#039;s Blog &#187; PHP</title>
	<atom:link href="http://blog.eirikhoem.net/index.php/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.eirikhoem.net</link>
	<description>PHP, AS3, Flex, Flash</description>
	<lastBuildDate>Tue, 18 May 2010 17:58:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Book review: Expert PHP5 Tools</title>
		<link>http://blog.eirikhoem.net/index.php/2010/05/18/book-review-expert-php5-tools/</link>
		<comments>http://blog.eirikhoem.net/index.php/2010/05/18/book-review-expert-php5-tools/#comments</comments>
		<pubDate>Tue, 18 May 2010 17:58:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=254</guid>
		<description><![CDATA[Book review: Expert PHP 5 Tools
ISBN: 1847198384
ISBN 13: 978-1-847198-38-9
Publisher:Packt Publishing
Author:Dirk Merkel
Short version: If you are working with PHP you&#8217;ll want to read this book. Covering topics like continuous integration, documentation and unit testing thoroughly it gives an insight of great value to any PHP developer.
Slightly longer version: This book is aimed at developers already working [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Book review:</strong> <a href="http://www.packtpub.com/expert-php-5-tools/book/mid/160410eip616?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_003021" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Expert PHP 5 Tools</a><br />
<strong>ISBN:</strong> 1847198384<br />
<strong>ISBN 13:</strong> 978-1-847198-38-9<br />
<strong>Publisher:</strong><a href="http://www.packtpub.com/" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Packt Publishing</a><br />
<strong>Author:</strong><a href="https://www.packtpub.com/authors/profiles/dirk-merkel" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Dirk Merkel</a></p>
<div id="attachment_250" class="wp-caption alignleft" style="width: 241px"><a href="http://www.packtpub.com/expert-php-5-tools/book/mid/160410eip616?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_003021" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><img class="size-medium wp-image-250 " title="Book cover: Expert PHP 5 Tools " src="http://blog.eirikhoem.net/wp-content/uploads/2010/05/expert_php_5_tools_cover-231x300.jpg" alt="Book cover: Expert PHP 5 Tools" width="231" height="300" /></a><p class="wp-caption-text">Book cover: Expert PHP 5 Tools</p></div>
<p><strong>Short version:</strong> If you are working with PHP you&#8217;ll want to read this book. Covering topics like continuous integration, documentation and unit testing thoroughly it gives an insight of great value to any PHP developer.</p>
<p><strong>Slightly longer version:</strong> This book is aimed at developers already working with PHP on a daily basis, or developers which are picking up PHP. It&#8217;s main focus is the environment of the PHP developer. Areas like unit testing, continuous integration, application deployment, proper documentation and version control might already be very familiar if you have been working with PHP for a while, but this book covers each of these important areas in detail and with prime examples on do and dont&#8217;s. Even if you feel like you are doing quite well I&#8217;m sure this book will give you a few &#8220;aha!&#8221; moments. If you are coming from a hobby-background these areas might not be your strongest suit, and this book will help you get a firm grasp on what a professional PHP setup is all about. The chapter on continous integration is based around <a href="http://www.phpundercontrol.org/about.html" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.phpundercontrol.org');">phpUnderControl</a>, which is a nice piece of software for this purpouse. However, I would have liked to see other alternatives like for example <a href="http://hudson-ci.org/" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/hudson-ci.org');">Hudson</a>. Luckily, moving over to a different CI app is fairly easy after having set up a phpUC installation with the <a href="http://phing.info/trac/" target="_self" onclick="javascript:pageTracker._trackPageview ('/outbound/phing.info');">phing/ant</a> configuration.</p>
<p>The book is available both as paperback and eBook from Packt. I&#8217;ve been reading the eBook, which worked quite well for me. PS: Convering the PDF to ePub will destroy some of the formatting.</p>
<p>Check out the sample chapter <a href="http://www.packtpub.com/sites/default/files/8389_Expert%20PHP%20Development_SampleChapter.pdf" title="Sample chapter" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><span>Documentation with phpDocumentor</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2010/05/18/book-review-expert-php5-tools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Book preview: Expert PHP5 Tools</title>
		<link>http://blog.eirikhoem.net/index.php/2010/05/02/book-preview-expert-php5-tools/</link>
		<comments>http://blog.eirikhoem.net/index.php/2010/05/02/book-preview-expert-php5-tools/#comments</comments>
		<pubDate>Sun, 02 May 2010 10:56:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=248</guid>
		<description><![CDATA[While I am currently reading PHP5 eCommerce Development I&#8217;ve also got lined up a copy of Expert PHP 5 Tools from Packt.
This book will enable you to take your PHP development skills to an  enterprise level by teaching you the skills and tools necessary to write  maintainable and efficient code. You will learn [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_250" class="wp-caption alignleft" style="width: 241px"><a href="http://www.packtpub.com/expert-php-5-tools/book/mid/160410eip616?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_003021" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><img class="size-medium wp-image-250" title="Book cover: Expert PHP 5 Tools " src="http://blog.eirikhoem.net/wp-content/uploads/2010/05/expert_php_5_tools_cover-231x300.jpg" alt="Book cover: Expert PHP 5 Tools" width="231" height="300" /></a><p class="wp-caption-text">Book cover: Expert PHP 5 Tools</p></div>
<p>While I am currently reading PHP5 eCommerce Development I&#8217;ve also got lined up a copy of <a href="http://www.packtpub.com/expert-php-5-tools/book/mid/160410eip616?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_003021" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Expert PHP 5 Tools</a> from <a href="http://www.packtpub.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Packt</a>.</p>
<p><em>This book will enable you to take your PHP development skills to an  enterprise level by teaching you the skills and tools necessary to write  maintainable and efficient code. You will learn how to perform  activities such as unit testing, enforcing coding standards, automating  deployment, and interactive debugging using tools created for PHP  developers – all the information in one place. Your code will be more  maintainable, efficient, and self-documented.</em></p>
<p>Check out the sample chapter <a href="http://www.packtpub.com/sites/default/files/8389_Expert%20PHP%20Development_SampleChapter.pdf" title="Sample chapter" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><span style="font-family: Calibri;">Documentation with phpDocumentor</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2010/05/02/book-preview-expert-php5-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book preview: PHP 5 E-commerce Development</title>
		<link>http://blog.eirikhoem.net/index.php/2010/03/16/book-preview/</link>
		<comments>http://blog.eirikhoem.net/index.php/2010/03/16/book-preview/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 09:33:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=239</guid>
		<description><![CDATA[I have been reviewing some books from  Packt   Publishing lately, and I&#8217;m now expecting a copy of PHP 5 E-commerce Development in a few days.  I have been looking forward to for a while, as I will be working on a similar project in the near future. Here  is the lowdown:
This book [...]]]></description>
			<content:encoded><![CDATA[<p>I have been reviewing some books from  <a href="http://www.packtpub.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Packt   Publishing</a> lately, and I&#8217;m now expecting a copy of <a href="http://www.packtpub.com/php-5-e-commerce-development/book/mid/1503100i179x?utm_source=eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_002721" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">PHP 5 E-commerce Development</a> in a few days.  I have been looking forward to for a while, as I will be working on a similar project in the near future. Here  is the lowdown:</p>
<div id="attachment_240" class="wp-caption alignleft" style="width: 253px"><a href="http://blog.eirikhoem.net/wp-content/uploads/2010/03/php-5-ecommerce-development-320x200.jpg"><img class="size-medium wp-image-240" title="Php 5 eCommerce Development Book Cover" src="http://blog.eirikhoem.net/wp-content/uploads/2010/03/php-5-ecommerce-development-320x200-243x300.jpg" alt="Php 5 eCommerce Development Book Cover" width="243" height="300" /></a><p class="wp-caption-text">Php 5 eCommerce Development Book Cover</p></div>
<p><em>This book will show you how to create your  own PHP framework that can be extended and used with ease, particularly  for e-commerce sites. Using this framework you will be able to display  and manage products, customize products, create wish-lists, make  recommendations to customers based on previous purchases, send email  notifications when certain products are in stock, rate the products  online, and much more.</em></p>
<p>You can check out the <a href="http://www.packtpub.com/files/9645-php-5-e-commerce-development-sample-chapter-enhancing-the-user-experience.pdf" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">sample chapter Enhancing the User Experience</a> now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2010/03/16/book-preview/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Book review: Mastering phpMyAdmin 3.1</title>
		<link>http://blog.eirikhoem.net/index.php/2009/09/12/book-review-mastering-phpmyadmin-31/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/09/12/book-review-mastering-phpmyadmin-31/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 14:30:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=130</guid>
		<description><![CDATA[Book review: Mastering phpMyAdmin 3.1
ISBN: 9871847197863
Publisher: Packt Publishing
Author: Marc Delisle
I had pretty much forgotten phpMyAdmin when I got a mail from Swati at Packt Publishing asking me to review this book. It&#8217;s been a very long time since I last used phpMyAdmin. When I first started out with web development (under Windows) and PHP I [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_136" class="wp-caption alignleft" style="width: 172px"><a href="http://www.packtpub.com/mastering-phpmyadmin-3-1-fourth-edition/book/mid/260509je891v" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><img class="size-full wp-image-136" title="Mastering phpMyAdmin 3.1 Cover" src="http://blog.eirikhoem.net/wp-content/uploads/2009/09/mastering-phpmyadmin-311.jpg" alt="Mastering phpMyAdmin 3.1 Cover" width="162" height="200" /></a><p class="wp-caption-text">Mastering phpMyAdmin 3.1 Cover</p></div>
<p><strong>Book review:</strong> <a href="http://www.packtpub.com/mastering-phpmyadmin-3-1-fourth-edition/book/mid/260509je891v" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Mastering phpMyAdmin 3.1</a><br />
<strong>ISBN: </strong>9871847197863<br />
<strong>Publisher:</strong> <a href="http://www.packtpub.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Packt Publishing</a><br />
<strong>Author:</strong> <a href="http://infomarc.info/" onclick="javascript:pageTracker._trackPageview ('/outbound/infomarc.info');">Marc Delisle</a></p>
<p>I had pretty much forgotten <a href="http://www.phpmyadmin.net/home_page/index.php" onclick="javascript:pageTracker._trackPageview ('/outbound/www.phpmyadmin.net');">phpMyAdmin </a>when I got a mail from Swati at Packt Publishing asking me to review this book. It&#8217;s been a very long time since I last used phpMyAdmin. When I first started out with web development (under Windows) and PHP I was hosted on a shared web host. They had phpMyAdmin installed as their main database management tool. With little to no knowledge on databases I was very happy to be able to do my basic list of operations to get stuff working. Needless to say I was a lightweight user.</p>
<p>Fast forward to today. I&#8217;ve moved on to Linux and the way of the command-line as many others, using the <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html" onclick="javascript:pageTracker._trackPageview ('/outbound/dev.mysql.com');">MySQL Gui Tools</a> (Query Browser, Administrator) in addition. The tools from MySQL sure have their quirks and bugs, but they have mostly suited my needs for the last years. So, how does phpMyAdmin hold up, and is this the right book to get you started?</p>
<p>The book, written by <a href="http://infomarc.info/" onclick="javascript:pageTracker._trackPageview ('/outbound/infomarc.info');">Marc Delisle</a>, clocks in at 326 pages, split into 18 chapters. The topics range from basic installation and database / table management to the &#8220;Multi-Table Query Generator&#8221; amd &#8220;The Relational System&#8221;.</p>
<p>The first few pages of the first chapter explains a bit background info on the software, which is pretty much skim-though-if-interested. More interesting, it covers installation for various platforms. The coverage on the installation parts can be a bit short for new users, but should be sufficient in most cases.</p>
<p>I especially liked chapters 2 and 3. Chapter 2 deals with authentication, which is pretty well covered, and the features are surprisingly extensive. Previously I was a bit reluctant to use phpMyAdmin in a production environment due to the lack of proper authentication, but these added features grants it a new evaluation. In chapter 3 the author spends time explaining the GUI itself and how it can be customized. Some parts of this section will definitely be interesting for people doing web hosting as it allows some branding of the software itself as well as laying down some &#8216;ground rules&#8217; on the feature set to expose. In addition there are tips on user-centric adjustments for optimizing the work flow for the developer using the software. When using it on a regular basis this information is very nice to have.</p>
<p>Chapters 4 and 5 and 6 deals with database, table and data management. These chapters will probably be skim-trough material for most experienced developers, as the GUI is quite self-explanatory when it comes to these kind of actions. However, it&#8217;s worth mentioning that the author points out lots of configuration keys for controlling both the GUI, behavior and again features offered. Nothing is crucial for the lightweight user, but if phpMyAdmin is your main tool for the job you&#8217;d want to read these chapters in detail as well.</p>
<p>The coverage of exporting schemas and data is quite well done. Again I was surprised with the list of formats supported by phpMyAdmin. The author takes care to describe the various formats, as well as server-side requirements and how-to&#8217;s where applicable.</p>
<p>There is a chapter dedicated to searching, which I do not think needs a whole chapter on it&#8217;s own since it&#8217;s also very intuitive to use the GUI here. However, the chapter is quite short. The same goes for table and database operations which are also covered. Again I find the GUI clear enough for most of these tasks to be straight forward.</p>
<p>Chapter 11 deals with &#8216;The Relational System&#8217;, which I&#8217;ve never heard about. Turns out it&#8217;s pretty neat! The author does a good job of covering the tool and it&#8217;s features. It takes a bit of extra configuration to get it running (create the phpMyAdmin database). This is basically a tool that lets you work visually with your database, seeing relations between tables etc. I&#8217;ve mainly used MySQL Workbench when I&#8217;ve had to generate a model based on a database. This is a viable replacement. The chapter dealing with system documentation can come in handy if you like to document your schema.</p>
<p>There is also a chapter dedicated to MySql 5.0 and 5.1 features which may come in handy if you are up to date on that front.</p>
<p><strong>Conclusion</strong><br />
I&#8217;ve learned that phpMyAdmin has evolved quite a bit, especially in terms of authentication features and installation scripts. I was quite happy to set up the config by hand, but I think the guided setup script is a quite nice feature to new developers. My impression of phpMyAdmin has definitely changed. I used to view it as a &#8220;hobby-developers-tool&#8221; for database access, but I&#8217;ve come to realize that it offers a wast selection of features that might reduce both time and complexity for database management. For shared web-hosting and development environments it&#8217;s a really nice tool to have.</p>
<p>The book does a very good job at documenting phpMyAdmin. Some parts of the application are really too basic to describe in detail in a book, however the author has tackled this nicely by adding references to configuration tweaks and settings which makes these chapters interesting to the more advanced users.If phpMyAdmin is your weapon of choice when it comes to database management you&#8217;d definitely want to read this book. If you want to take it for a spin first, <a href="http://blog.eirikhoem.net/wp-content/uploads/2009/09/phpmyadmin_samplechapter.pdf" target="_blank">check out this sample chapter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/09/12/book-review-mastering-phpmyadmin-31/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Board migration &#8211; Discus 4.x to vBulletin</title>
		<link>http://blog.eirikhoem.net/index.php/2009/03/18/board-migration-discus-4x-to-vbulletin/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/03/18/board-migration-discus-4x-to-vbulletin/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 21:06:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Discus]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[vBulletin]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=96</guid>
		<description><![CDATA[A short recap of my experiences with migrating a DiscusWare board to vBulletin]]></description>
			<content:encoded><![CDATA[<p>I just finished the initial trial migration of a <a href="http://www.discusware.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.discusware.com');">Discus v4.x</a> based board over to <a href="https://www.vbulletin.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">vBulletin</a>.</p>
<p>Now, I&#8217;d like to write a few words on Discus. I cannot see why anyone looking to set up a new board would choose this software. It&#8217;s actually file based (!). Yes, you heard me. The posts, users and threads are stored in (plain) text files. I was quite surprised the first time I got around to checking out what I was supposed to migrate. If you head over to their site and check out a demo-site or two you&#8217;ll notice that the whole board seems a bit &#8230; unprofessional. It currently sells for 149 USD, which is quite amazing when you can get vBulletin for 180USD, or even <a href="http://www.phpbb.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.phpbb.com');">phpBB </a>for free. I went with vBulletin because they supported (at least partial) import from Discus, as well as the email based service in case I got stuck.</p>
<p>Now, the data migration. Upon purchasing vBulletin I got a migration utility called ImpEx which supports quite a number of boards to import from. Discus is listed as a tier 3 board, meaning it&#8217;s not actively supported anymore.. not a good sign, but still worth a shot.</p>
<p><strong>Here is a quick recap of the required actions:</strong></p>
<p>1. Download vBulletin and ImpEx from vBulletin.com<br />
2. Create a new database for vBulletin<br />
3. Install vBulletin <a href="http://www.vbulletin.com/docs/html/main/install" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">as described here</a>.<br />
4. Install the ImpEx tool <a href="http://www.vbulletin.com/docs/html/main/impex_installation" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">as described here</a>.<br />
5. Configure ImpEx <a href="http://www.vbulletin.com/docs/html/main/impex_config" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">as described here</a>.<br />
6. Run the ImpEx tool for Discus</p>
<p>Now, in step 6 there are some modules to import. Some of them runs in a matter of seconds, while others takes up to 10 minutes in my case. I&#8217;m not sure if the script actually refreshes, so one might want to up maximum execution time for PHP to be safe.</p>
<p>To my surprise everything went absolutely fine. Not a single hickup in the migration scripts. After the data was imported I followed the <a href="http://www.vbulletin.com/docs/html/main/impex_cleanup" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">post-migrate instructions</a> and did some data verification. Everything seemed to be present, but I was not able to see any threads in the forums. I could find them with searching, and when I opened a thread it clearly stated that it was belonging in the correct forum. After looking around for some time I discovered that the forums from Discus was now configured to act as categories. I solved this by going to <strong>Edit Forum -&gt; Act as Forum</strong> and set it to <strong>Yes</strong> for each forum. When I got back to the forum listing everything was in order.</p>
<p>The only things left is to move the forums around some, get a proper language pack and some other minor adjustments. All in I&#8217;m quite satisfied with the whole process. Kudos to vBulletin.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/03/18/board-migration-discus-4x-to-vbulletin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Internationalization in applications &#8211; Call for discussion</title>
		<link>http://blog.eirikhoem.net/index.php/2009/03/01/internationalization-in-applications-call-for-discussion/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/03/01/internationalization-in-applications-call-for-discussion/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 13:12:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Internationalization]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=52</guid>
		<description><![CDATA[ At no time is freedom of speech more precious than when a man hits his thumb with a hammer. 
~Marshall Lumsden
This is an experiment in designing an internationalization feature which I&#8217;ve been thinking about for a while. The idea is for people to come up with designs and implementations for the described requirements, and [...]]]></description>
			<content:encoded><![CDATA[<p><em> At no time is freedom of speech more precious than when a man hits his thumb with a hammer. </em></p>
<p>~Marshall Lumsden</p>
<p>This is an experiment in designing an internationalization feature which I&#8217;ve been thinking about for a while. The idea is for people to come up with designs and implementations for the described requirements, and get a healthy discussion going on how to get a feature like this implemented in the best way. I&#8217;ve came up with some features and requirements which should make the design somewhat interesting.</p>
<p>Wanna play? If so, continue reading.</p>
<p>Now, let&#8217;s consider a website, which is to be deployed for several markets (in several countries), and serve both residential and corporate customers.</p>
<p><strong>Requirements</strong></p>
<p>A &#8220;tag&#8221; is an identifier for any given text that may be translated. The &#8220;tag&#8221; can be the text itself in the source language, or an identifier such as LABEL_CLICK_HERE, all depending on the implementation.</p>
<p><strong>A tag&#8217;s content can be translated to any given language</strong></p>
<p>This is the most basic feature, and does not need any explanation.</p>
<p><strong>Any given market should be able to use the application in any given language</strong></p>
<p>Customers in the French market should be able to view the application in German and so on. Does not sound tricky, but see next point.</p>
<p><strong>A tag&#8217;s content *may* have different meaning in different markets</strong></p>
<p>For example, in the US a zipCode validation error will differ from the zipCode validation error used in Spain, but surname validation errors will be the same. This also goes for descriptive texts for features and services which might differ. However, for 90%+ of the translated texts, the English translation in Spain would be the same as the english translation in the US.</p>
<p><strong>A tag&#8217;s content *may* differ based on the context of the user</strong></p>
<p>Imagine the front-page when a used is logged in. A text is presented here with information about available features, instructions on how to use them etc. Now, some of these features are not available for residential customers, while some are exclusive to residential customers. The usage/instructions of the features may be different for corporate customers. In addition, both residential and corporate customers have roles in the application (admin users and regular users), and the content may differ based on the role. Most of the tags will just have one content, but some may have several.<strong> </strong>The available contexts could be visualized as a tree structure, with &#8216;ALL&#8217; at the top, which forks out to corporate and residential, which in turn forks out to admin / user:</p>
<div id="attachment_55" class="wp-caption alignnone" style="width: 410px"><img class="size-full wp-image-55" title="Contexts" src="http://blog.eirikhoem.net/wp-content/uploads/2009/03/rect3155.png" alt="Contexts" width="400" height="227" /><p class="wp-caption-text">Contexts</p></div>
<p>When retrieving content for a tag the system should first look for the user&#8217;s context, for example &#8220;Residential Admin&#8221;, and if no content is present it shall select the parent etc.<strong><br />
</strong><br />
<strong>Any changes to a tags&#8217;s content should be kept in a history log</strong></p>
<p>Every time a tag&#8217;s content is changed, the old version should be kept for historical purposes. A nice bonus would be to be able to change a tag&#8217;s content ahead of time , that is, setting an effective date.</p>
<p>These are the basic requirements I&#8217;ve made up for this experiment. Now, I&#8217;d like to hear how you tackle internationalization in your application, and how you would design a implementation which would sastisfy the requriements described here.  I&#8217;m working on my own implementation for this which I&#8217;d like to share after I&#8217;ve seen what other people come up with. If you have suggestions for more requirements which would make this even more interesting, please send a comment!</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/PHP" rel="tag">PHP</a>, <a href="http://technorati.com/tag/Internationalization" rel="tag">Internationalization</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/03/01/internationalization-in-applications-call-for-discussion/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Getting back to business!</title>
		<link>http://blog.eirikhoem.net/index.php/2008/12/18/getting-back-to-business/</link>
		<comments>http://blog.eirikhoem.net/index.php/2008/12/18/getting-back-to-business/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 12:38:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Multi-touch]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Prado]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/index.php/2008/12/18/getting-back-to-business/</guid>
		<description><![CDATA[ I&#8217;ve been dormant for quite some time, mainly due to a major project going on at work. This week I&#8217;m starting my vacation, and its time to get back to all things fun. Today I got offered a spot on the Prado Developer Team, which I hope will prove to be both a challenge [...]]]></description>
			<content:encoded><![CDATA[<p> I&#8217;ve been dormant for quite some time, mainly due to a major project going on at work. This week I&#8217;m starting my vacation, and its time to get back to all things fun. Today I got offered a spot on the Prado Developer Team, which I hope will prove to be both a challenge and a great opportunity to improve my knowledge on both the framework and PHP.</p>
<p>As a part-time project I&#8217;ve started building a multi-touch display surface inspired by Microsoft Surface. I&#8217;ve completed a *very* basic edition (<a href="http://blog.eirikhoem.net/wp-admin/%E2%80%9Dhttp://nuigroup.com/forums/viewthread/1731/%E2%80%9D">tutorial here</a>, and I&#8217;ve just started planning a more complicated setup along the lines of <a href="http://blog.eirikhoem.net/wp-admin/%E2%80%9Dhttp://nuigroup.com/forums/viewthread/1561/%E2%80%9D">this project</a>.</p>
<p>I&#8217;ll do some posts on the process as soon as I get some pictures.</p>
<p><code><p>Technorati Tags: <a href="http://technorati.com/tag/PHP" rel="tag">PHP</a>, <a href="http://technorati.com/tag/Prado" rel="tag"> Prado</a>, <a href="http://technorati.com/tag/Multi-touch" rel="tag"> Multi-touch</a></p>                                        </code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2008/12/18/getting-back-to-business/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VCL/PHP followup</title>
		<link>http://blog.eirikhoem.net/index.php/2008/08/26/vclphp-followup/</link>
		<comments>http://blog.eirikhoem.net/index.php/2008/08/26/vclphp-followup/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 10:09:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi for PHP]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Prado]]></category>
		<category><![CDATA[VCL4PHP]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/index.php/2008/08/26/vclphp-followup/</guid>
		<description><![CDATA[



 	 	
 	 	
After receiving quite some feedback on my post “Why Delphi for PHP should have used Prado instead of VCL” I decided to do a follow up to that post. Some of the feedback was quite interesting, hence this post was born.
First and foremost I&#8217;d like to address the feedback I got [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-0056923567680782";
/* default */
google_ad_slot = "6546082201";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8" /> 	<title></title> 	<meta name="GENERATOR" content="OpenOffice.org 2.4  (Linux)" /></p>
<style type="text/css"> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--> 	</style>
<p style="margin-bottom: 0in">After receiving quite some feedback on my post “<a href="http://blog.eirikhoem.net/index.php/2007/09/14/why-delphi-for-php-should-have-used-prado-instead-of-vcl/">Why Delphi for PHP should have used Prado instead of VCL</a>” I decided to do a follow up to that post. Some of the feedback was quite interesting, hence this post was born.</p>
<p style="margin-bottom: 0in">First and foremost I&#8217;d like to address the feedback I got regarding the class name prefixing in VCL/PHP. I argued that the lack of class prefixes could create problems in the future, and used Prado&#8217;s T notation as as sample of something that would at least be a bit better. Let&#8217;s take a look at two VCL/PHP classes named Collection and Object. These two names are often reserved in programming langues (atleast object oriented ones). If PHP decides to introduce these two classes the VCL/PHP guys would be pretty screwed. It would involve refactoring the framework as well as applications which uses those classes. Prado on the other hand has a prefix (TCollection etc. minor, but it&#8217;s a world of difference). I assume that the VCL/PHP authors will introduce namespace support with PHP 5.3, so this issue will hopefully be a thing of the past when 5.3 ships. That said, I&#8217;m a bit curious to see how the migration / backwards compability would turn out if VCL/PHP adopt namespaces.</p>
<p style="margin-bottom: 0in">What I miss in the feedback I got from my previous post was people acually using VCL/PHP for enterprise applications and how that is working. From what I can tell the usage of Exceptions is still limited to the 3<sup>rd</sup> party libs such as Zend Framework which are included with VCL/PHP. That&#8217;s a bit interesting.</p>
<p style="margin-bottom: 0in">I&#8217;d like to touch on the comment made by <cite>Pieter Viljoen</cite><cite><span style="font-style: normal"> for <a href="http://blog.eirikhoem.net/index.php/2007/09/14/why-delphi-for-php-should-have-used-prado-instead-of-vcl/">my original post</a>. I agree that Codegear pushed quite a toolset for the PHP community in a short time, but the underlying code is not enterprise quality. One can argue that PHP is ugly and flawed (not sure I agree on that part), but that does not mean that one should not strive for good architecture and methodology when developing frameworks on top of PHP. I see  the point that VCL/PJP offers features that are interesting for starting PHP developers, but for large scale applications I just don&#8217;t see it. I&#8217;d be pretty cautious pulling in a framework without exception support if I was to create an application.</span></cite></p>
<p style="margin-bottom: 0in"><cite><span style="font-style: normal">Again, I&#8217;m really interested in some feedback from someone that actually has built applications with VCL/PHP.  </span></cite></p>
<p>I&#8217;ve also noticed that there is not much activity in the <a href="http://vcl4php.svn.sourceforge.net/viewvc/vcl4php/trunk/vcl/" onclick="javascript:pageTracker._trackPageview ('/outbound/vcl4php.svn.sourceforge.net');">VCL/PHP SVN repository</a>. Anyone know what&#8217;s going on there?</p>
<p><code><p>Technorati Tags: <a href="http://technorati.com/tag/PHP" rel="tag">PHP</a>, <a href="http://technorati.com/tag/Prado" rel="tag"> Prado</a>, <a href="http://technorati.com/tag/VCL4PHP" rel="tag"> VCL4PHP</a></p>                                       </code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2008/08/26/vclphp-followup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comments moved from old blog</title>
		<link>http://blog.eirikhoem.net/index.php/2008/08/26/comments-moved-from-old-blog/</link>
		<comments>http://blog.eirikhoem.net/index.php/2008/08/26/comments-moved-from-old-blog/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 08:13:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/index.php/2008/08/26/comments-moved-from-old-blog/</guid>
		<description><![CDATA[If some of you recently got email saying you just made a comment here, it&#8217;s most likely due to that I moved some comments over from my old blog (http://eirikhoem.wordpress.com/). I&#8217;ll get around to answering any questions later today. Thanks for commenting!
]]></description>
			<content:encoded><![CDATA[<p>If some of you recently got email saying you just made a comment here, it&#8217;s most likely due to that I moved some comments over from my old blog (http://eirikhoem.wordpress.com/). I&#8217;ll get around to answering any questions later today. Thanks for commenting!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2008/08/26/comments-moved-from-old-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple config management for PHP</title>
		<link>http://blog.eirikhoem.net/index.php/2008/05/30/simple-config-management-for-php/</link>
		<comments>http://blog.eirikhoem.net/index.php/2008/05/30/simple-config-management-for-php/#comments</comments>
		<pubDate>Fri, 30 May 2008 07:30:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/index.php/2008/05/30/simple-config-management-for-php/</guid>
		<description><![CDATA[When doing complex applications it&#8217;s often nice to have some sort of system for handling settings. PHP has a nice function called parse_ini_file which can be used to create a basic but still usable setting file feature. A simple class which loads the configuration file and offers some methods to retrieve the values for a [...]]]></description>
			<content:encoded><![CDATA[<p>When doing complex applications it&#8217;s often nice to have some sort of system for handling settings. PHP has a nice function called <a href="http://no2.php.net/parse_ini_file" onclick="javascript:pageTracker._trackPageview ('/outbound/no2.php.net');">parse_ini_file</a> which can be used to create a basic but still usable setting file feature. A simple class which loads the configuration file and offers some methods to retrieve the values for a given key is all that&#8217;s needed. The example I&#8217;m providing is pretty basic, but it&#8217;s still very usable and can be added to almost any application.</p>
<p>First, we need to create a file to hold the settings. It&#8217;s ordinary plaintext and follows the INI format.</p>
<p><strong> Here is a quick sample of some key / value pairs:</strong></p>
<p>[general]<br />
locale = no_NO<br />
company.name = MyCompany</p>
<p>datasource.host = localhost<br />
datasource.database = mydb<br />
datasource.username = user<br />
datasource.password = 1234</p>
<p><strong>The class for accessing the file:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">class</span> MyConfigClass<span style="color: #66cc66;">&#123;</span>
  protected <span style="color: #0000ff;">$config</span>;
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">config</span> = <span style="color: #000066;">parse_ini_file</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'../conf/myapp.ini'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getConfig<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span> = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span> !== <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">isset</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">config</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$key</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
          <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">config</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$key</span><span style="color: #66cc66;">&#93;</span>;
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #b1b100;">else</span>
        <span style="color: #66cc66;">&#123;</span>
          throw <span style="color: #000000; font-weight: bold;">new</span> Exception<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Unknown key '$key' in configuration&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
      <span style="color: #66cc66;">&#125;</span>
      <span style="color: #b1b100;">else</span>
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">config</span>;
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setConfig<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$config</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
&nbsp;
      <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">config</span> = <span style="color: #0000ff;">$config</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Usage:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php"><span style="color: #0000ff;">$configManager</span> = <span style="color: #000000; font-weight: bold;">new</span> MyConfigClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$value</span> = <span style="color: #0000ff;">$configManager</span>-&gt;<span style="color: #006600;">getConfig</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'datasource.host'</span><span style="color: #66cc66;">&#93;</span>;</pre></td></tr></table></div>

<p>Now, when working on larger application one usually have a application like class, and that&#8217;s a nice place to put this code. When using Prado I usually place the config code in the TApplication class.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/PHP" rel="tag">PHP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2008/05/30/simple-config-management-for-php/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
