<?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>a fine balance &#187; agile development</title>
	<atom:link href="http://absolutgcs.org/tag/agile-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://absolutgcs.org</link>
	<description>thoughts and observations</description>
	<lastBuildDate>Sat, 06 Feb 2010 06:56:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>My First Foray into Developing on a Web Platform for Fun and (non)-Profit</title>
		<link>http://absolutgcs.org/2008/10/08/my-first-foray-into-developing-on-a-web-platform-for-fun-and-non-profit/</link>
		<comments>http://absolutgcs.org/2008/10/08/my-first-foray-into-developing-on-a-web-platform-for-fun-and-non-profit/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 07:48:11 +0000</pubDate>
		<dc:creator>absolutgcs</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://absolutgcs.org/?p=82</guid>
		<description><![CDATA[A couple of weeks ago, I was looking for a short weekend project to get some experience building on a web platform. I looked at a few possible options and settled on building something for WordPress, the platform I use for this blog. A friend of mine had a need for a blog he was]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago, I was looking for a short weekend project to get some experience building on a web platform. I looked at a few possible options and settled on building something for <a title="Wordpress" href="http://wordpress.org" target="_blank">WordPress</a>, the platform I use for this blog. A friend of mine had a need for a blog he was setting up for his son&#8217;s school and it turned out to be the perfect weekend project.</p>
<h2>User Stories</h2>
<p>My friend told me that a problem they were experiencing with their blog was an inability to add users in bulk to the platform. Basically, they were using an existing plugin to generate newsletters that used posts on the blog as the core content, and they wanted to send those newsletters to an audience that was known in advance, but would not necessarily come to the blog to register themselves.</p>
<p>I did some poking around online and saw several mentions of frustration about not being able to add more than one user at a time to a blog so it appeared there was no existing solution available. I decided the problem was tractable for a weekend exploration project and set out to define a couple of basic scenarios for an alpha release.</p>
<p>First, there should be a &#8220;Settings&#8221; panel associated with the plugin that should allow an administrator to configure the default role applied to new users. For my friend&#8217;s situation, they only wanted to add subscribers, but I envisioned other scenarios were you would want to bulk add authors or editors as well and figured this should be pretty simple to build. In addition to the default role, the administrator may also want to set the delimiters used in the list of new user email addresses. This is a little technical for basic blog administrators, but a list of new user email addresses may be separated by commas, semicolons, etc and this seemed like a nice configurable option to have.</p>
<p>Second, there should be a plugin panel available in the &#8220;Users&#8221; section of the administrator&#8217;s site. The plugin panel should accept a delimited set of new user email addresses as well as allow the administrator to configure which role new users will have on the site.</p>
<h2>Iterative Development</h2>
<p>I first set out to write the &#8220;Settings&#8221; panel, which proved to have the steepest learning curve. I had used PHP nearly a decade ago and coming back to the language was interesting because so much has changed. I did a project at work that was rooted in PHP, but that had more to do with platform porting issues and a light application port, so it was nice to be on the other side of the fence. PHP is a very forgiving language, so much so that conventions you expect to work in C/C++/Java have unexpected behaviors in PHP. In addition to getting familiar with the language quirks, I had to get up to speed on the platform and how to utilize the plugin API. Thankfully I found a couple of decent &#8220;Getting Started&#8221; type guides to help me understand the infrastructure and mechanisms. I would recommend this one for anyone looking to pick up a similar project. Finally, I had to brush up on a little CSS/HTML as well, two technologies I hardly ever touch professionally.</p>
<p>After some trial and error, I had a functional &#8220;Settings&#8221; panel that would accept various option configuration from an administrator, persist them in the database, report its success and retrieve it upon further visits to the panel. I did some incremental testing to ensure this was very robust.</p>
<p>Next up was the plugin panel itself that would accept input from the administrator, parse it for valid email addresses, attempt to create new accounts for each valid email address in a specified role and email new account information to each email address. This part required diving deep into the WordPress documentation and implementation. The documentation for WordPress is lacking a bit as there is a Plugin API and a Function Reference and its not really clear what the distinction is since both sets of APIs are available to developers. Also, the documentation of some functions is just not available to a general audience, you need to be a WordPress developer to see it, which surprised me a bit.</p>
<p>Regardless, I was able to work around some of these hiccups and figure out what was going on. The plugin is able to discern whether input is a valid email address, and if it is, whether it is already associated with an existing user account. The results are reported back to the administrator after they submit their input and emails are sent to new users with their login and password. The last part I was not able to verify until I deployed the plugin on this blog, as my testbed using XAMPP was not configured with backend mail support (not common for sandboxed dev/test environments).</p>
<h2>Feedback from the &#8220;Customer&#8221;</h2>
<p>Between writing the &#8220;Settings&#8221; panel and the plugin panel, I powowed with my &#8220;customer&#8221; again to clarify the requirements to ensure I was writing something that would be simple and useful for the school&#8217;s blog&#8217;s needs. This also gave me a good opportunity to clarify his expectations and explain how the plugin would be most useful if it was complementary to any subscription management plugin, rather than piggyback on its implementation.</p>
<h2>Alpha Release</h2>
<p>I provided my friend with an alpha release, including known caveats like the specific environment I was using to build the plugin. We quickly discovered some issues in the configuration of the blog&#8217;s deployed environment that created some compatibility issues. I managed to resolve this by looking into WordPress functionality that mirrored what PHP offered without the same dependency on a PECL package.</p>
<p>I did think of a couple of minor revisions to make to improve the delimiter handling that I will add in over the next couple of days. After that is complete, I will submit the plugin to the WordPress plugin codex and create a Projects tab on my blog to host it with some basic documentation. I will include other projects I build there as well. This plugin is being called &#8220;Bulk User Add&#8221; for now and I&#8217;ll post again when it is available.</p>
<h2>Some Thoughts</h2>
<p>All told, I might have spent about 10 hours tops on this project. If I had to do something of similar complexity again, I could probably do it in a couple of hours as much of the learning curve was spent on PHP, HTML and WordPress API/documentation. It was an interesting endeavour, one that I was happy to see end successfully with the &#8220;customer&#8221;, my friend, more than satisfied with the capabilities and simplicity.</p>
<p>Moving on to other platforms and building more complex WordPress plugins should be good learning experiences as well. I&#8217;m looking forward to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://absolutgcs.org/2008/10/08/my-first-foray-into-developing-on-a-web-platform-for-fun-and-non-profit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
