<?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>Marenkay.com &#187; Projects</title>
	<atom:link href="http://www.marenkay.com/tag/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marenkay.com</link>
	<description>developer, father, gamer, and nerd.</description>
	<lastBuildDate>Thu, 03 Jun 2010 10:19:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Porting legacy PHP apps: Rewrite, refactor, refine</title>
		<link>http://www.marenkay.com/featured/porting-legacy-php-apps-rewrite-refactor-refine/</link>
		<comments>http://www.marenkay.com/featured/porting-legacy-php-apps-rewrite-refactor-refine/#comments</comments>
		<pubDate>Mon, 04 May 2009 08:30:30 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP4]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Porting]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=284</guid>
		<description><![CDATA[This is the second article in the eight-part series &#8220;Porting legacy PHP apps&#8221;. In this session we will explore available options for breathing new life into our legacy application. Fasten your seat belts as we continue our journey after the jump. In the last article we have discovered that our application is at a dead [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second article in the eight-part series &#8220;Porting legacy PHP apps&#8221;. In this session we will explore available options for breathing new life into our legacy application. Fasten your seat belts as we continue our journey after the jump.</p>

<p><span id="more-284"></span></p>

<p>In the last article we have discovered that our application is at a dead end: PHP 4 has <a href="http://www.php.net/archive/2008.php#2008-01-03-1">officially been declared dead</a>, we are facing an increasing number of issues with running our application and our code is cluttered. Maintaining &#8211; and probably extending &#8211; our application is becoming a task that wastes resources and decreases our teams&#8217; motivation to continue this piece of software.</p>

<p>Now we are facing a simple question: <strong>what are we supposed to do to keep our application running and our customer(s) happy?</strong></p>

<h2>Rewriting our application</h2>

<p>If you have been facing the above issues for a while it may seem appealing to start from scratch and rewrite your application. A fresh start, based upon current approaches, throwing away everything we have. There even is the chance to redefine the application specification.</p>

<p>While this may sound good from a developers&#8217; point of view (don&#8217;t developers love challenges), it does not smell good from a business point of view.</p>

<ul>
<li><strong>Rewrites are expensive</strong>: the teams&#8217; resources will be bound to rebuilding everything from zero, and this <em>is</em> expensive. Man-hours are not cheap these days, and it will be hardly possible to convince the boss(es) to invest more money compared to the current maintenance costs of your application.</li>
<li><strong>Rewrites are a waste of investments</strong>: if your application ran for a few years, there is a huge investment involved. Consider a team of three or four developers and a designer in charge for maintaining an application. It is quite an impressive number of man-hours invested, and the Euros or Dollars (or whatever you are paid in) are not earned easy. After all, throwing investments into the thrash is no Good Thing.</li>
<li><strong>Rewrites ignore existing achievements</strong>: over the years the code in your application will have matured, as you very likely faced most issues that could raise during the application lifetime. This is of value, and should not be left behind. After all it <em>is</em> knowledge you gained.</li>
</ul>

<h2>Refactoring your application</h2>

<p>Refacto-what? <a href="http://en.wikipedia.org/wiki/Code_refactoring">Code refactoring</a> describes the process of &#8220;cleaning up&#8221; your applications&#8217; code. By refactoring we refer to modifying our existing code without touching the functionality or any defined <a href="http://en.wikipedia.org/wiki/API">API</a>.</p>

<p>Refactoring an application comes with a few requirements for your teams&#8217; knowledge:</p>

<ul>
<li>refactoring usually is tied to test-driven development. This means for every functionality you refactor, there will have to be a test defined and executed in order to verify the functionality of the refactored code. It has to deliver identical results, even though coded with a different approach.</li>
<li>refactoring forces you to revisit all skeletons in the closet. All the pieces of code giving you goose bumps will make a return in your teams&#8217; code editor of choice.</li>
<li>refactoring code and authoring test cases is different. If your team is used to procedural development, test-driven development may scare your team. Probably they read about unit testing in Java, C++, C#, etc. but unit testing in PHP?</li>
</ul>

<h2>Refining your application</h2>

<p>Porting is the most lightweight process to refine your applications. While rewriting and refactoring will include lot of code changes, porting only comes with a few changes.</p>

<p>If your application has been developed with PHP 4 and MySQL 4, you might make the jump and switch to PHP 5 and MySQL 5. Both versions only require minor changes to your code, and the manuals of both applications contain hints:</p>

<ul>
<li>Migrating from PHP 4 to PHP 5: <a href="http://www.php.net/manual/en/migration5.php">the PHP 4 to 5 migration</a> will only require a few code changes. It is recommended to work through the list of backward incompatible changes first.</li>
<li>Upgrading MySQL to MySQL 5: <a href="http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html">upgrading from 4.x to 5.x</a> mostly consists of updates for table storage engines, and might require a change of engines, and rebuilding indexes.</li>
</ul>

<p>Making the changes listed in the manual will require low effort, and can keep your application running for a few more years but it will not give you any benefits if you do not use new features introduced in PHP 5 and MySQL 5.</p>

<h1>Summary</h1>

<p>As we have seen there are a few options and the difference in effort and cost is huge. Before you decide on an option you will have to evaluate carefully what works best for you. Which option you chose will be different for every application, as no application will evolve equal to another.</p>

<p>In part three of our series we will develop a project plan for breathing new life into your legacy app.</p>

<p>Stay tuned for upcoming articles in <a href="http://www.marenkay.com/features/porting-legacy-php-apps-the-series/">&#8220;Porting legacy PHP apps ~ The Series</a>.</p>

<p>Comments and feedback is more than welcome, of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/featured/porting-legacy-php-apps-rewrite-refactor-refine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Porting legacy PHP apps: Spotting legacy apps</title>
		<link>http://www.marenkay.com/featured/porting-legacy-php-apps-spotting-legacy-apps/</link>
		<comments>http://www.marenkay.com/featured/porting-legacy-php-apps-spotting-legacy-apps/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 15:37:48 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP4]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Porting]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=267</guid>
		<description><![CDATA[This is the first article in the eight-part series &#8220;Porting legacy PHP apps&#8221;. Throughout the duration of this series we will be speaking about PHP functions and language features, a little bit about XHTML and CSS, and also about client-side scripting. As you read through the series, you might see code that could be written [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first article in the eight-part series &#8220;Porting legacy PHP apps&#8221;. Throughout the duration of this series we will be speaking about PHP functions and language features, a little bit about XHTML and CSS, and also about client-side scripting.</p>

<p><span id="more-267"></span></p>

<p>As you read through the series, you might see code that could be written differently or improved. At least I do expect you to do so and comment on the articles to refine what I wrote or just tell me that I suck. After all this is intended to help commercial PHP developers, and there are a lot of us out there who would all benefit from this.</p>

<h2>What actually is that thing you name &#8220;legacy app&#8221;?</h2>

<p>Speaking of &#8220;legacy applications&#8221; or &#8220;legacy code&#8221; as some might say, there comes <a href="http://en.wikipedia.org/wiki/Legacy_code">Wikipedia</a> to the rescue with a broad definition of what we can consider to be a legacy in terms of code:</p>

<blockquote>
  <p>Legacy code is source code that relates to a no-longer supported or manufactured operating system or other computer technology. The term can also mean code inserted into modern software for the purpose of maintaining an older or previously supported feature.</p>
</blockquote>

<p>Simply said, PHP is such a computer technology, and PHP scripts are source code after all, even though some may have considered PHP to be no <em>real</em> development language for commercial applications.</p>

<p>If you&#8217;re developing PHP application for a few years now, chances are good that you will have quite a few legacy applications in your companies portfolio and even a few that are still running on servers for your clients. As an example I have picked a PHP application developed for a commercial project which is dated back to mid-2000 when most of the PHP installations still were running a 3.x version of PHP and only a few early adopters made the switch to PHP4. The application is still running on a PHP 4.3.2 installation.</p>

<h2>What about your projects?</h2>

<p>If you are developing PHP applications for companies which sell services to consumers, chances are good that your application is still running. This is our first checkpoint for a legacy application.</p>

<h3>What is the lifetime of your application?</h3>

<p>Considering that PHP 4 was released in 2000, any PHP application older than five years can safely be stamped as <em>legacy code</em>. PHP 4.3.0 was released in December 2002, and it marked a point where the 4.x branch of PHP started to replace PHP3 installations in larger numbers.</p>

<h3>How large is your application?</h3>

<p>If you are using a Linux or Apple server, you can find out how many lines of code your application has pretty quickly. Open a console and enter</p>

<pre><code>wc -l `find . -name *.php4 -print`
</code></pre>

<p>Of course, adapt the line for the file extension you used. In my case we had to use <code>.php4</code> as <code>.php</code> still was pointing to an old PHP 3 installation. In my case this resulted in <em>312374</em> lines of code for an application that handles a few GB of user data, and ~300K users per month.</p>

<p>Now if I compare this with an application &#8211; written half a year ago &#8211; that comes with stuff like unit testing, UTF8 support, full i18n localization, separation of code and views and run the above command line again, I end up with whopping <em>116229</em> lines of code. This application does leverage what PHP 5 has to offer and leaves behind functions and language features from PHP 4 which have a replacement with a different approach in PHP 5.</p>

<p>They say, size does not matter. I say: <em>size matters</em>. It&#8217;s a combination of technique and size that wins the deal. After all size should be a sign for maintainability. Even if your code is well written, the larger the code, the larger the number of maintenance tasks will become as the years pass by.</p>

<h3>Do you see an increasing number of issue reports?</h3>

<p>As application get older, you may start to see strange errors happening, and the number of issue reports for errors that are hard or even impossible to track will rise. PHP has gone through quite an evolution since PHP 4 was released and with PHP 5 the number of errors may grow silently.</p>

<h3>Is your application documented?</h3>

<p>If your application is four or five years old, it is very unlikely that you will have documented your code in a style that will be helpful today. Documentation tools like <a href="http://www.phpdoc.org/">phpDoc</a> were not broadly used and while there may have been a specification for your application, commented code will be rather rare.</p>

<p>Missing documentation or aged documentation may be an issue, especially when you are tasked with updating the application.</p>

<h3>Does your application make use of libraries / frameworks?</h3>

<p>Most likely not. <a href="http://pear.php.net">PEAR</a> was not very popular back then, and for most applications there was no defined set of libraries used. From my own backlog it seems like the focus was more on which PHP extensions were used than what libraries one may use. E.g. extensions like GD and Freetype for dynamic image creation have been on the list.</p>

<p>This also may be a reason for large line counts for such an application. Code had to be written in multiple places even though it was identical. Personally the only &#8220;framework&#8221; I have seen in use back then was <a href="http://www.smarty.net/">Smarty</a> for templates.</p>

<h3>Does you application have style?</h3>

<p>Even in larger teams with source code control as part of the work-flow style guides for authoring PHP code have been a rare thing on the task list. It is very likely that the team was working on one large application, where each developer was assigned to a specific part of the application, e.g. one handled templates and views, the other one handled database usage, another one was assigned to the administration system.</p>

<p>While this may result in code styles being adapted and used, chances are good that there will be one code style for each part of the application. If you add team changes to this, code styles will start to turn into something that lacks style aka. <a href="http://en.wikipedia.org/wiki/Spagetti_code">spaghetti code</a>.</p>

<h3>Does your application separate code from views?</h3>

<p>In the early days of PHP 4 application used to mix code to implement functions with code to display output. While this may seem strange from todays&#8217; perspective it was perfectly fine back then. PHP development was mostly done in procedural fashion, and thus application logic and user interfaces were not isolated.</p>

<p>Today PHP and especially PHP 5 are used more in classical fashion of software engineering, applying architectural patterns like <a href="http://en.wikipedia.org/wiki/Model-view-controller">Model-View-Controller</a> to PHP projects.</p>

<h3>Deprecation and your application</h3>

<p>Within five years of time a lot of progress and evolution happens in Free Software, and PHP was no exception. Language features have changed, new features have been added, experimental PHP extensions turned into mainline extensions which are available by default. On top of that you will see a lot of PHP functions which are considered to be security risks, and have been replaced with safer functions in PHP 5.</p>

<p>If you are using PHP 5, there is a chapter available in the PHP manual which describes potential issues when <a href="http://www.php.net/manual/en/migration5.php">migrating from PHP 4</a>.</p>

<h2>Last but not least</h2>

<p>By now you should have an idea what the signs are to spot a legacy PHP application, and with by looking at your application&#8217;s code you should know if it is legacy or not.</p>

<p>In part two of our series we will continue with exploring available options for breathing new life into your legacy app.</p>

<p>Stay tuned for upcoming articles in <a href="http://www.marenkay.com/features/porting-legacy-php-apps-the-series/">&#8220;Porting legacy PHP apps ~ The Series</a>.</p>

<p>Comments and feedback is more than welcome, of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/featured/porting-legacy-php-apps-spotting-legacy-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Porting legacy PHP apps ~ The Series</title>
		<link>http://www.marenkay.com/featured/porting-legacy-php-apps-the-series/</link>
		<comments>http://www.marenkay.com/featured/porting-legacy-php-apps-the-series/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 14:21:01 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP4]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Porting]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=258</guid>
		<description><![CDATA[While I have been blogging for a few years now with varying spare time, this is the first time that I feel the need to publish an article series. Introducing &#8220;Porting legacy PHP apps&#8221;, an eight part series of how-to&#8217;s, rules and recommendations, and a few bits and pieces of good advice to be published [...]]]></description>
			<content:encoded><![CDATA[<p>While I have been blogging for a few years now with varying spare time, this is the first time that I feel the need to publish an article series.</p>

<p>Introducing &#8220;Porting legacy PHP apps&#8221;, an eight part series of how-to&#8217;s, rules and recommendations, and a few bits and pieces of good advice to be published in the next weeks, with the first part of the series debuting this week. The term &#8220;legacy&#8221; in the title refers to code developed for PHP when PHP version 3 was common on most servers, and PHP4 was right around the corner, mostly used by &#8220;early adopters&#8221;. Wikipedia of course offers a definition of <a href="http://en.wikipedia.org/wiki/Legacy_code">legacy code</a> for us to read, and you will probably discover a few of those common criteria in this series.</p>

<p><span id="more-258"></span></p>

<p>Here is what you can expect to see:</p>

<ul>
<li><a href="http://www.marenkay.com/features/porting-legacy-php-apps-spotting-legacy-apps/">Part One: Spotting legacy apps</a>.
The first part of the series will briefly discuss what a legacy PHP application actually is, and how you can run a quick check on your own applications to see if they qualify for being &#8220;dinosaurs&#8221;.</li>
<li><a href="http://www.marenkay.com/features/porting-legacy-php-apps-rewrite-refactor-refine/">Part Two: Rewrite, refactor, refine</a>.
Since we identified what apps are considered legacy apps, it is time to consider the available options. What&#8217;s worth the effort, and what not? </li>
<li><strong>Part Three: How to move your app forward.</strong>
Now that we know more about the available options for making changes to our beloved app, we can take a close look at the type of code which needs to be updated.</li>
<li><strong>Part Four: It&#8217;s all in the process.</strong>
Making changes to your app should not be done without a plan. Part four will supply the tools and tasks for you to make your plan.</li>
<li><strong>Part Five: The foundation.</strong>
With PHP5 and future versions you do have the unique option to apply common development methods to your workflow. Test-driven, agile development is not restricted to Ruby and Ruby on Rails, it&#8217;s an option for PHP5, too. We&#8217;ll explore available options, both available frameworks, and building your own framework.</li>
<li><strong>Part Six: Breathing new life into the beast.</strong>
This is all about <a href="http://gettingreal.37signals.com/">Getting Real</a>. By now you should have a plan, and the tools to start refreshing you app, and we&#8217;ll make the initial steps together.</li>
<li><strong>Part Seven: Are you prepared?</strong>
Now that our app has made its&#8217; steps into the future, we will take a look at the tasks we will face, once PHP5 leaves the stage, and makes room for PHP6. of course, assuming your customers still love your refreshed app.</li>
<li><strong>Part Eight: Final thoughts.</strong>
This is it. The last part of the series will feature a few recommendations and probably wise words by me featuring insights gathered during my own endeavors with legacy PHP apps.</li>
</ul>

<p>Code examples of legacy code and new code will be supplied with each part, and some will probably be taken from a few legacy apps that I currently work on as part of my contracted work.</p>

<p>See you back in a couple of days for part one of our series.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/featured/porting-legacy-php-apps-the-series/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>phpArmory 0.4.2 &#8211; &#8220;Fishing Extravaganza&#8221; released</title>
		<link>http://www.marenkay.com/tipsresources/programming/phparmory-042-fishing-extravaganza-released/</link>
		<comments>http://www.marenkay.com/tipsresources/programming/phparmory-042-fishing-extravaganza-released/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 15:07:24 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[phpArmory]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=207</guid>
		<description><![CDATA[This release should fix issues with character that could not be retrieved from the armory due to special characters in realm or character names, as reported by several users. There have been some minor tweaks to existing functions. Further details, the download it after the jump. 0.4.2 &#8211; &#8220;Fishing Extravaganza&#8221; &#8211; Dec 17, 2008 This [...]]]></description>
			<content:encoded><![CDATA[<p>This release should fix issues with character that could not be retrieved from the armory due to special characters in realm or character names, as reported by several users. There have been some minor tweaks to existing functions. Further details, the download it after the jump.</p>

<p><span id="more-207"></span></p>

<h2>0.4.2 &#8211; &#8220;Fishing Extravaganza&#8221; &#8211; Dec 17, 2008</h2>

<p>This release should fix issues with character that could not be retrieved from the armory due to special characters in realm or character names.</p>

<h3>Bugs squashed</h3>

<ul>
<li>phpArmory5Cache: the setCachedData(&#8230;) function was called without prior checks if there <em>was</em> any valid data to cache. This has been fixed.</li>
<li>phpArmory5: Strings used in URLs do not need a manual replacement of the space character. urlencode() handles this for us already.</li>
<li>phpArmory5: fixed an issue in __construct, where required PHP extension have not been checked properly. Thanks to Gizzmo for the hint.</li>
</ul>

<h3>Features added</h3>

<ul>
<li>phpArmory5: added getAnyData($searchType = NULL, $objectName = NULL, $filter = NULL). $searchType can be any of &#8220;arenateams&#8221;, &#8220;characters&#8221;, &#8220;guilds&#8221;, &#8220;items&#8221;. $filter needs to be an associative array of filter properties. For now, try out the armory item search page to see valid filter options.</li>
<li><p>phpArmory5: added a third parameter to getCharacterData for retrieving only the basic character data. Defaults to false. Use the following to get basic character data only:</p>

<pre><code class="php">$character = $phpArmory-&gt;getCharacterData($characterName = "Char", $realmName = "Realm", $onlyBasicData = true)
</code></pre></li>
</ul>

<h2>Download</h2>

<p>Enjoy the 0.4.2 release, and either grab <a href="http://www.marenkay.com/wp-content/uploads/2008/12/phparmory-042.zip">phparmory-0.4.2.zip</a> or <a href="http://www.marenkay.com/wp-content/uploads/2008/12/phparmory-042tar.gz">phparmory-0.4.2.tar.gz</a>. Please note that all PHP files are formatted with Unix line endings, as I am mostly a Linux / Mac geek.</p>

<p>Feel free to leave a comment if you should end up having trouble with the classes.
phparmory-042tar</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/tipsresources/programming/phparmory-042-fishing-extravaganza-released/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>phpArmory &#8211; What features do you want to see?</title>
		<link>http://www.marenkay.com/tipsresources/programming/phparmory-what-features-do-you-want-to-see/</link>
		<comments>http://www.marenkay.com/tipsresources/programming/phparmory-what-features-do-you-want-to-see/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:39:16 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[phpArmory]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=167</guid>
		<description><![CDATA[With phpArmory 0.4.1 released, I am currently investigating which features to add next. Thus it is your turn. Tell me what features you like, does the API work for you? Do you see anything that could be improved? First, let us check what we currently have in store: Characters: Retrieve full character details including stats, [...]]]></description>
			<content:encoded><![CDATA[<p>With <a href="http://www.marenkay.com/tipsresources/programming/phparmory-041-call-to-arms-released/">phpArmory 0.4.1</a> released, I am currently investigating which features to add next. Thus it is your turn. Tell me what features you like, does the API work for you? Do you see anything that could be improved?</p>

<p><span id="more-167"></span></p>

<p>First, let us check what we currently have in store:</p>

<ul>
<li><strong>Characters</strong>: Retrieve full character details including stats, equipped items, skills, reputation, buffs,</li>
<li><strong>Items</strong>: With complete stats, reagent details, related quests,</li>
<li><strong>Guilds</strong>: List of members,</li>
<li><strong>Caching</strong>: Caches results of requests to improve performance</li>
<li><strong>Localisation</strong>: Results returned in the armory&#8217;s supported languages from localised servers.</li>
</ul>

<p>This seems like the basics done. Personally I would love to add the following stuff:</p>

<ul>
<li><strong>Arena teams</strong>: it&#8217;s on the TODO list, and will be released after December 17th, 2008. Why? Because arena season 5 will start then, and only then I can get arena team data from the armory to test and implement this.</li>
<li><strong>Searching</strong>: Query the armory for any kind of data.</li>
<li><strong>Guild banks</strong> and <strong>calendars</strong>: You have guessed by the name, don&#8217;t you?</li>
</ul>

<p>Searching is pretty simple to implement, as we can base upon getXmlData( ..) and search for arena teams, characters, guilds, and items easily. We can even filter the results by any desired parameter.</p>

<p>Now when it comes to guild banks and calendars, things get a bit spooky. Both features can be implemented, but you would have to trust phpArmory to not do bad things with your account data, as the class would need to authenticate using your account data on the armory site in order to retrieve the guild bank contents, or your calendar.</p>

<p>Here is your chance, to influence future releases. Raise your voice, and share your thoughts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/tipsresources/programming/phparmory-what-features-do-you-want-to-see/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>phpArmory 0.4.1 &#8211; &#8220;Call to Arms&#8221; released</title>
		<link>http://www.marenkay.com/tipsresources/programming/phparmory-041-call-to-arms-released/</link>
		<comments>http://www.marenkay.com/tipsresources/programming/phparmory-041-call-to-arms-released/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 17:53:24 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[phpArmory]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=157</guid>
		<description><![CDATA[Today the World of Warcraft armory has been updated to reflect the new character features introduced with Patch 3.0.2 &#8211; &#8220;Echoes of Doom&#8221; &#8211; and the Wrath of the Lich King expansion. phpArmory 0.4.1 &#8211; &#8220;Call to Arms&#8221; (named after the Battleground holidays ) is out and supports the added character achievements and statistics. 0.4.1 [...]]]></description>
			<content:encoded><![CDATA[<p>Today the <a href="http://www.wowarmory.com/">World of Warcraft armory</a> has been updated to reflect the new character features introduced with Patch 3.0.2 &#8211; &#8220;Echoes of Doom&#8221; &#8211; and the <a href="http://www.worldofwarcraft.com/wrath/">Wrath of the Lich King</a> expansion. phpArmory 0.4.1 &#8211; &#8220;Call to Arms&#8221; (named after the <a href="http://www.wowwiki.com/Battlegrounds_Holiday">Battleground holidays</a> ) is out and supports the added character achievements and statistics.</p>

<p><span id="more-157"></span></p>

<h2>0.4.1 &#8211; &#8220;Call to Arms&#8221; &#8211; Nov 26, 2008</h2>

<p>The <a href="http://www.wowarmory.com/">World of Warcraft armory</a> has received quite a
few improvements, making it feature complete with the added character data from
the &#8220;Wrath of the Lich King&#8221; expansion.</p>

<h3>Features added</h3>

<ul>
<li><p>getCharacterData($characterName, $realmName) will now return an array which
contains character achievements and statistics.</p>

<pre><code class="php">$character = Array
(
    [characterinfo] =&gt; Array
        (
                ...
        )

    [reputationtab] =&gt; Array
        (
                ...
        )

    [skilltab] =&gt; Array
        (
                ...
        )

    [talenttab] =&gt; Array
        (
                ...
        )

    [achievements] =&gt; Array
        (
                ...
        )

    [statistics] =&gt; Array
        (
                ...
        )

    [armorypatchlevel] =&gt; 030003
)
</code></pre></li>
</ul>

<h3>Download</h3>

<p>Enjoy the 0.4.1 release, and either grab <a href="http://www.marenkay.com/wp-content/uploads/2008/11/phparmory-041.zip">phparmory-0.4.1.zip</a> or <a href="http://www.marenkay.com/wp-content/uploads/2008/11/phparmory-041tar.gz">phparmory-0.4.1.tar.gz</a>. Please note that all PHP files are formatted with Unix line endings, as I am mostly a Linux / Mac geek.</p>

<p>Feel free to leave a comment if you should end up having trouble with the classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/tipsresources/programming/phparmory-041-call-to-arms-released/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>phpArmory 0.4.0 &#8211; &#8220;Jack-o-Lantern&#8221; released</title>
		<link>http://www.marenkay.com/tipsresources/programming/phparmory-040-jack-o-lantern-released/</link>
		<comments>http://www.marenkay.com/tipsresources/programming/phparmory-040-jack-o-lantern-released/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 13:18:44 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[phpArmory]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=143</guid>
		<description><![CDATA[As proposed earlier in the 0.4.0 preview, we now have a final release of phpArmory 0.4.0 available. phpArmory 0.4.0 &#8211; &#8220;Jack-o&#8217;-Lantern&#8221; (named after the event Hallow&#8217;s End ) is out and features the big switch to PHP5. PHP4 legacy support has been dropped, and the API received a /love and /hug. 0.4.0 &#8211; &#8220;Jack-o’-Lantern&#8221; &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>As proposed earlier in the <a href="http://www.marenkay.com/tipsresources/programming/upcoming-changes-in-phparmory-040-jack-o-lantern/">0.4.0 preview</a>, we now have a final release of phpArmory 0.4.0 available. phpArmory 0.4.0 &#8211; &#8220;Jack-o&#8217;-Lantern&#8221; (named after the event <a href="http://www.wowwiki.com/Hallow's_End">Hallow&#8217;s End</a> ) is out and features the big switch to PHP5. PHP4 legacy support has been dropped, and the API received a /love and /hug.</p>

<p><span id="more-143"></span></p>

<h2>0.4.0 &#8211; &#8220;Jack-o’-Lantern&#8221; &#8211; Nov 20, 2008</h2>

<p>phpArmory has been rewritten for PHP5 and the new OOP class syntax. The class interfaces have been changed to use getFunction() and setFunction() syntax, and class variables have been adjusted to use private, protected, and public states. Please consult the doc/ folder for updated API documentation.</p>

<blockquote>
  <p>NOTE: arena team handling has been postponed to release 0.5.0, as with the recent release of Wrath of the Lich King, all arena teams have been wiped and no sample data was available to develop the feature.</p>
</blockquote>

<h3>Bugs squashed</h3>

<ul>
<li>all functions have received input checking, now all functions will properly return FALSE when something goes wrong.</li>
</ul>

<h3>Features added</h3>

<ul>
<li>phpArmory5 and phpArmory5Cache will now make use of trigger_error provided by PHP5 to raise notices (E_USER_NOTICE), warnings (E_USER_WARNING), and errors (E_USER_ERROR). Please note that warnings and notices will only be raised when you use phpArmory from the command line. If you use it on your web server, only errors will be raised.</li>
<li>you can now use getArea / setArea to make changes to the armory area.</li>
<li>you can now use getLocale / setLocale to set the language in which you want to query data from the armory.</li>
<li>you can retrieve talent definitions for all classes, including the recently added Death Knight using getTalentData().</li>
</ul>

<h3>Features changed</h3>

<ul>
<li>the phpArmory class API has been changed. All functions now use get&#8230; and set&#8230; for their names. The current API documentation is <a href="http://www.marenkay.com/wp-content/plugins/wow-armory/phparmory/doc/">available online</a></li>
<li>character icons will now be properly display for characters up to level 80. We have shiny WotLK character icons.</li>
</ul>

<h3>Download</h3>

<p>Enjoy the 0.4.0 release, and either grab <a href="http://www.marenkay.com/wp-content/uploads/2008/11/phparmory-040.zip">phparmory-0.4.0.zip</a> or <a href="http://www.marenkay.com/wp-content/uploads/2008/11/phparmory-040tar.gz">phparmory-0.4.0.tar.gz</a>. Please note that all PHP files are formatted with Unix line endings, as I am mostly a Linux / Mac geek.</p>

<p>Feel free to leave a comment if you should end up having trouble with the classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/tipsresources/programming/phparmory-040-jack-o-lantern-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upcoming changes in phpArmory 0.4.0 &#8211; &#8220;Jack-o-Lantern&#8221;</title>
		<link>http://www.marenkay.com/tipsresources/programming/upcoming-changes-in-phparmory-040-jack-o-lantern/</link>
		<comments>http://www.marenkay.com/tipsresources/programming/upcoming-changes-in-phparmory-040-jack-o-lantern/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 10:18:41 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[phpArmory]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=61</guid>
		<description><![CDATA[Work on phpArmory 0.4.0 has started, and this time it will be a bit more work going into the classes. While you test and (hopefully) enjoy phpArmory 0.3.2, let me give you all the details on the upcoming 0.4.0 release. On Aug 27, 2008 the PHP team has released the final release of PHP4, and [...]]]></description>
			<content:encoded><![CDATA[<p>Work on phpArmory 0.4.0 has started, and this time it will be a bit more work going into the classes. While you test and (hopefully) enjoy <a href="http://www.marenkay.com/tipsresources/programming/phparmory-032-giddyup-released/">phpArmory 0.3.2</a>, let me give you all the details on the upcoming 0.4.0 release.</p>

<p><span id="more-61"></span></p>

<p>On Aug 27, 2008 the PHP team has released the <a href="http://www.php.net/archive/2008.php#id2008-08-07-1">final release of PHP4</a>, and thus it is time to make the switch to PHP5 in phpArmory, too.</p>

<p>As some may know, PHP5 introduced quite a few features to enhance the OOP features for classes, and make them feel like <em>real</em> classes. Among the changes, there are real class constructors and destructors, plus private, protected, and public keywords became available for class variables and functions. Cheers for this! I have waited for this quite some time, being a C++ developer it just felt wrong to have no real classes in PHP4.</p>

<p>This means, most variables and functions of phpArmory / phpArmoryCache will be changed. For most class variables, their status will become private to prevent their usage from outside the class. All variables have been intended for internal use anyway. If you did use them, stop now. Class functions will be changed to private or protected. Only two functions will become private, as they are intended to be used only inside phpArmory / phpArmoryCache. The remaining functions will become protected (not public!). What does this mean? Simply spoken, protected functions may only be used from inherited classes.</p>

<p>Along these changes the class documentation will be rewritten from scratch, using the phpDoc syntax. I also plan to add new usage examples.</p>

<p>One change yet is not decided on, but you can raise your voice to help me. I am considering to switch the phpArmoryCache class to use <a href="http://www.php.net/manual/en/book.pdo.php">PHP data objects</a> instead of using the MySQL extension directly. In common this does sound good, but in reality I am not sure if it would be worth the effort. Does anyone want to use PostgreSQL, SQLite or other database backends for phpArmory? If yes, raise your voice and tell me. If not, this change will probably become a task for phpArmory 0.5.0.</p>

<p>If you want to see what I am working on currently, I have added a <a href="http://www.marenkay.com/wp-content/plugins/wow-armory/phparmory/status/">issue tracker</a>. The issue tracker is updated weekly and shows the progress with fixing bugs, implementing features, and how planned releases progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/tipsresources/programming/upcoming-changes-in-phparmory-040-jack-o-lantern/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>phpArmory 0.3.2 &#8211; &#8220;Giddyup!&#8221; released</title>
		<link>http://www.marenkay.com/tipsresources/programming/phparmory-032-giddyup-released/</link>
		<comments>http://www.marenkay.com/tipsresources/programming/phparmory-032-giddyup-released/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 09:55:01 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP4]]></category>
		<category><![CDATA[phpArmory]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=34</guid>
		<description><![CDATA[It has been a few months since my last updated release of phpArmory, and now a final release of the 0.3.x branch is available. phpArmory 0.3.2 &#8211; &#8220;Giddyup!&#8221; (named after the currently running event Brewfest ) is out and silently introduces bug fixes to make things run smooth. There has been a 0.3.1 release which [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a few months since my last updated release of phpArmory, and now a final release of the 0.3.x branch is available. phpArmory 0.3.2 &#8211; &#8220;Giddyup!&#8221; (named after the currently running event <a href="http://www.wowwiki.com/Brewfest">Brewfest</a> ) is out and silently introduces bug fixes to make things run smooth.</p>

<p><span id="more-34"></span></p>

<p>There has been a 0.3.1 release which never made it into the open, due to a last minute issue discovered during testing. The Changelog has all the details on what was changed in 0.3.1 and 0.3.2, and why it changed.</p>

<h2>0.3.2 &#8211; Oct 02, 2008</h2>

<h3>Bugs squashed</h3>

<ul>
<li><em>phpArmory.class.php</em>: Class will not be instantiated if the Curl or XML extension is missing from your PHP installation.</li>
<li><em>examples/character.php</em>: Updated to use setArea. Properly dumps character data as XML. Please note that characterFetch() will now return the armory patchlevel, too.</li>
<li><em>examples/guildroster.php</em>: Updated to use setArea. Properly dumps the full guild roster as plain table.</li>
</ul>

<h2>0.3.1 &#8211; Sep 28, 2008</h2>

<h3>Features added</h3>

<ul>
<li>Patchlevel detection*: <code>getCurrentPatchlevel()</code> will return the current patch version for the armory region you use.</li>
<li>Talent definitions: <code>TalentDefinitionFetch()</code> will retrieve talent definition for all classes from the World of Warcraft website.</li>
<li>WoW armory lockout prevention: with previous phpArmory versions, it could happen that your applications would be temporarily locked out from the armory. To prevent this, you can now limit the number of retries for XML pulling. To do this inherit your own classes by specifying the `$retries&#8217; parameter with the number of retries to perform.</li>
</ul>

<h3>Features changed</h3>

<ul>
<li>*Armory region and locales: this has been simplified, to only supply a setArea function to define which armory region we use.</li>
</ul>

<h3>Download</h3>

<p>Enjoy the 0.3.2 release, and either grab <a href="http://www.marenkay.com/wp-content/uploads/2008/10/phparmory-032.zip">phparmory-0.3.2.zip</a> or <a href="http://www.marenkay.com/wp-content/uploads/2008/10/phparmory-032tar.gz">phparmory-0.3.2.tar.gz</a>. Please note that all PHP files are formatted with Unix line endings, as I am mostly a Linux / Mac geek.</p>

<p>Feel free to leave a comment if you should end up having trouble with the classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/tipsresources/programming/phparmory-032-giddyup-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>phpArmory 0.3.0 &#8211; &#8220;Use soulstone&#8221; released</title>
		<link>http://www.marenkay.com/tipsresources/programming/phparmory-030-use-soulstone-released/</link>
		<comments>http://www.marenkay.com/tipsresources/programming/phparmory-030-use-soulstone-released/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 14:03:55 +0000</pubDate>
		<dc:creator>Daniel S. Reichenbach</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP4]]></category>
		<category><![CDATA[phpArmory]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.marenkay.com/?p=42</guid>
		<description><![CDATA[As I mentioned earlier, I based my armory plugin on the excellent phpArmory classes. phpArmory came into being soon after the armory went live and on 4th June 2007 we saw the last release of version 0.2 from the phpArmory project. If you happen to be curious like I am, you will have very likely [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned <a href="http://www.marenkay.com/tipsresources/programming/wow-armory-plugin-progress/">earlier</a>, I based my armory plugin on the excellent phpArmory classes. phpArmory came into being soon after the armory went live and on 4th June 2007 we saw the last release of version 0.2 from the <a href="http://sourceforge.net/projects/phparmory/">phpArmory</a> project.</p>

<p><span id="more-42"></span></p>

<p>If you happen to be curious like I am, you will have very likely noticed that those nice PHP classes have not received much love and maintenance or bug fixing since then. Thus I decided to jump in, tasking myself with streamlining the classes and fixing any bugs I might find in there. Both the base class for grabbing and parsing XML data, and the database / file caching class had bugs and missing features, which I added.</p>

<h2>phpArmory.class.php</h2>

<p>Below follows the list of changes and additions.</p>

<ul>
<li><em>Added</em>: language support. You now can use the setLanguage ($language) and getLanguage() methods to set and retrieve the language in which you want to query armory data.</li>
<li><em>Added</em>: the characterIconURL method now has a matching sister for items, named itemIconURL($itemRef). E.g. if you have the icon name from a character item slot, you can pass that and receive the full URL to the matching icon in JPG format.</li>
<li><em>Fixed</em>: the xmlToArray method was not properly checking if a children of the XML object really was an array. Checks added, thus warning message gone.</li>
</ul>

<h2>phpArmoryCache.class.php</h2>

<p>Below follows the list of changes and additions.</p>

<ul>
<li><p><em>Added</em>: the phpArmoryCache class now has a new optional parameters for its&#8217; constructur. Using the following example you can now define the MySQL connection settings instead of having to hack the PHP class to enter your settings.</p>

<pre><code class="php">$armory = new phpArmoryCache($armory = "http://www.wowarmory.com/", $dataStore = "mysql", $dataConn = "mysql://arthas:frostmourne@localhost/northrend", $dataTable = "frozen_throne"", $updateInterval = 14400
</code></pre></li>
<li><em>Fixed</em>: XML caching will now work again.</li>
<li><em>Fixed</em>: corrected storing of MySQL results. The cacheSave() method was not properly checking if a XML result already was stored. Now old data will be updated in case it exists instead of giving back a duplicated key error.</li>
</ul>

<h3>Download</h3>

<p>Enjoy the unofficial 0.3 release, and either grab <a href="http://www.marenkay.com/wp-content/uploads/2008/10/phparmory-03tar.gz">phparmory-0.3.0.tar.gz</a> or <a href="http://www.marenkay.com/wp-content/uploads/2008/10/phparmory-03.zip">phparmory-0.3.0.zip</a>. Please note that all PHP files are formatted with Unix line endings, as I am mostly a Linux / Mac geek.</p>

<p>Feel free to leave a comment if you should end up having trouble with the classes.</p>

<p><strong>Update</strong>: I have re-uploaded the archives and included the updated <a href="http://www.marenkay.com/wp-content/plugins/wow-armory/phparmory/doc/">phpDoc code documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marenkay.com/tipsresources/programming/phparmory-030-use-soulstone-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
