<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" version="2.0">

<channel>
	<title>Streamhead</title>
	
	<link>http://www.streamhead.com</link>
	<description>multimedia webapplication thoughts and experiments</description>
	<lastBuildDate>Tue, 27 Dec 2011 14:00:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/streamhead" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="streamhead" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>51.0333</geo:lat><geo:long>3.7000</geo:long><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">streamhead</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Review and Preview, Streamhead 2012 Goals</title>
		<link>http://www.streamhead.com/review-and-preview-2012/</link>
		<comments>http://www.streamhead.com/review-and-preview-2012/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 14:00:47 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[On Streamhead]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3356</guid>
		<description><![CDATA[2011 has been a transformative year for Streamhead. Due to some major work and planning behind the scenes, I haven&#8217;t been able to post as much as I would have liked. But all this hard work is about to pay off and you, my dear reader, will enjoy the fruits of it. In 2012, I [...]]]></description>
			<content:encoded><![CDATA[<img width="300" height="250" src="http://www.streamhead.com/wp-content/uploads/2011/12/streamhead_goals_2012.png" class="attachment-post-thumbnail wp-post-image" alt="It&#039;s always good to have goals" title="streamhead_goals_2012" /><p>2011 has been a transformative year for Streamhead. Due to some major work and planning behind the scenes, I haven&#8217;t been able to post as much as I would have liked. But all this hard work is about to pay off and you, my dear reader, will enjoy the fruits of it. In 2012, I plan to double down on in-depth articles, tutorials and case studies. All practical hands-on information. Read on for a review of 2011 and my goals for 2012.</p>
<p><span id="more-3356"></span>Before I start making plans, it&#8217;s good to look back at the goals I had a year ago. In 2011, I finally managed to focus on just a few projects and not be so random, which is why I don&#8217;t score too good on <a title="Looking Forward, Streamhead in 2011" href="http://www.streamhead.com/streamhead-in-2011/">the goals I set for myself</a>:</p>
<ol>
<li><strong>HTML5, CSS3, etc.</strong>: I wanted to learn new enabling technologies for the web. And, in a way, I did, but not like I imagined. I learned PHP and got into the WordPress plugin business (a post on that is forthcoming). <a title="Rapid web app development with Node.JS" href="http://www.streamhead.com/expensesspreadsheet-net-node-js/">I also used Node.js to launch my latest personal project</a> and I&#8217;m glad I did.</li>
<li><strong>Mobile</strong>: Sadly, I wasn&#8217;t able to create anything worth showing on the mobile front. Apart from some very small experiments, I got nowhere.</li>
<li><strong>Online Marketing</strong>: For the last few months I&#8217;ve had an Adwords campaign running. It&#8217;s been slow learning, but I am getting better at finding keywords and convincing Google my ads are relevant. And I managed to get a site to position 7 in Google for my target keywords in about a month. Nothing major, but I&#8217;m pretty happy with this evolution. <em>I haven&#8217;t written about any of this, because I feel I got very little to add to the discussion at the moment. That might change, though</em>.</li>
<li><strong>Game Modding</strong>: A big zero on this one. I launched two small experiments early in the year. There was little interest and I wasn&#8217;t convinced myself, so I didn&#8217;t promote anything. <a title="ActionScript Ticket to Ride clone" href="http://www.streamhead.com/actionscript-3-ticket-to-ride/">I did manage to pull of a half-assed ticket to ride clone</a>, which convinced me I shouldn&#8217;t invest further in ActionScript. Adobe killing of Flash has only strengthened that opinion.</li>
</ol>
<p>What you haven&#8217;t seen is my search for a sustainable business model for Streamhead and my other projects. Making money with a blog is, for all intents and purposes, impossible. Unless you want to churn out a few long-form articles a day, like Tuts+ (A great resource BTW), you can&#8217;t live of of advertising or ebook sales. Furthermore, I realized a full-time writing gig is not my thing. <em>I want to be in the trenches, developing, not writing about developing</em>.</p>
<h2>Plans for 2012</h2>
<p>Most developers tend to stay away from sites like elance. I did discover that there is good work out there, with good clients that want to pay for quality. And the further my reputation improves, the easier it is to find that work. It&#8217;s very easy to phase in and out small projects as time permits.</p>
<p>There is a lot of work out there in the widest possible range of technologies, but it is most profitable to stay focused on just a few. Which is a major pain point for me, so in 2012 I intend to <strong>focus on a few core technologies</strong>.</p>
<p>Currently, I&#8217;m trying to limit my programming languages to <strong>Java, JavaScript and PHP</strong>. I might try out something related (Groovy, Clojure, Coffeescript), but I&#8217;m going to try to not stray too far from the path.</p>
<h3>Java</h3>
<p>Although there are now other cheap options, I still like the AppEngine platform for Java web application deployment. Libraries, such as Vaadin, are what keep the platform young. However, I do feel that there&#8217;s going to be a turning point soon when one of the other JVM languages really goes mainstream. It&#8217;s probably not going to be Clojure, maybe Scala?</p>
<p>I also still have that Android in Action book I want to go through.</p>
<h3>PHP</h3>
<p>PHP is a great source of small project work. It&#8217;s an interesting language I will continue to use. However, I am going to narrow it down to WordPress development and possibly a few other applications.</p>
<h3>JavaScript</h3>
<p>Like it or not, JavaScript is the language of the future. It&#8217;s everywhere and there&#8217;s no reason why it would go away. And now it has also invaded the server side. I was pleasantly surprised with Node.JS. It&#8217;s a very robust programming module that is going to stay in my tool-belt. On the client side, I do hope to get some game programming in and maybe some cross-platform mobile programming.</p>
<h3>Non-technical</h3>
<p>Of course, 2012 isn&#8217;t going to be just programming. I will continue with my Internet marketing efforts and if I feel it&#8217;s worth sharing, you&#8217;ll be the first to know.</p>
<h2>Conclusion</h2>
<p>I value input. Do you have a great topic you want me to write about? A question you can&#8217;t find the answer to? Get in touch with me and I&#8217;ll make it happen in 2012.</p>
<p>(<a title="Two goals on Flickr" href="http://www.flickr.com/photos/danieldslee/5425899591/">photo credit</a>)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=yLywCq31FNg:iQQyv59LjoM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=yLywCq31FNg:iQQyv59LjoM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=yLywCq31FNg:iQQyv59LjoM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=yLywCq31FNg:iQQyv59LjoM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=yLywCq31FNg:iQQyv59LjoM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=yLywCq31FNg:iQQyv59LjoM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=yLywCq31FNg:iQQyv59LjoM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=yLywCq31FNg:iQQyv59LjoM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=yLywCq31FNg:iQQyv59LjoM:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/review-and-preview-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://www.streamhead.com/wp-content/uploads/2011/12/streamhead_goals_2012.png" />
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/12/streamhead_goals_2012.png" medium="image">
			<media:title type="html">streamhead_goals_2012</media:title>
		</media:content>
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/12/streamhead_goals_2012.png" medium="image">
			<media:title type="html">streamhead_goals_2012</media:title>
		</media:content>
	</item>
		<item>
		<title>ExpensesSpreadsheet.net, Rapid Web App Development with Node.js</title>
		<link>http://www.streamhead.com/expensesspreadsheet-net-node-js/</link>
		<comments>http://www.streamhead.com/expensesspreadsheet-net-node-js/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 14:00:46 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Java and JavaScript]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3343</guid>
		<description><![CDATA[My latest project is ExpensesSpreadsheet.NET. It is the simplest and easiest solution I could come up with to track and categorize expenses &#8230; in a spreadsheet. Let&#8217;s call it a niche web application, so it&#8217;s probably not for every one, but it should fit some extremely well. It runs on Heroku&#8217;s Node.js stack. Over the [...]]]></description>
			<content:encoded><![CDATA[<p>My latest project is <a title="Track your expenses the smart way" href="http://www.expensesspreadsheet.net">ExpensesSpreadsheet.NET</a>. It is the simplest and easiest solution I could come up with to track and categorize expenses &#8230; in a spreadsheet. Let&#8217;s call it a niche web application, so it&#8217;s probably not for every one, but it should fit some extremely well. It runs on Heroku&#8217;s Node.js stack.</p>
<p><span id="more-3343"></span>Over the last month or two, I&#8217;ve been very busy with a few projects. And it was about time to present some. I have many more ideas on how to extend <strong><a title="Track your expenses the smart way" href="http://www.expensesspreadsheet.net">ExpensesSpreadsheet</a></strong>, but I thought it wise to first gauge the reaction of people.</p>
<p>It uses the following technology:</p>
<ul>
<li><strong>Node.js</strong>, the JavaScript event machine that is all the rage now.</li>
<li><strong>RailwayJS</strong>, a Rails-like web framework.</li>
<li><strong>connect-auth</strong> for Facebook integration (and a lot more)</li>
<li><strong>MongoDB</strong> for data storage. Mostly because it was so easy to get started with compared to traditional related databases. But in hindsight, I think it&#8217;s an ok choice. I really don&#8217;t safe any relations anyway.</li>
<li><strong>EJS</strong> JavaScript templates. Although in hindsight, I think I like Jade better.</li>
<li><strong>Heroku</strong>, cloud hosting done right.</li>
</ul>
<p>This was my first experiment with Node.js and Heroku and it was extremely enlightening. JavaScript is not my favorite programming language, but it certainly has a way of reducing boiler plate code (stuff I&#8217;m really starting to hate in Java). Combined with deployment to Heroku, the time between idea and deployed application is so short, it will make any developer smile.</p>
<p>If your day-to-day life involves lots of Java, you owe it to yourself to try out this stack. It&#8217;s not your average hacked together client side JavaScript. It takes a little time to wrap your head around the Node model, but it&#8217;s all worth it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=hDbtQuXGbFI:2PRIRMxMj8A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=hDbtQuXGbFI:2PRIRMxMj8A:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=hDbtQuXGbFI:2PRIRMxMj8A:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=hDbtQuXGbFI:2PRIRMxMj8A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=hDbtQuXGbFI:2PRIRMxMj8A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=hDbtQuXGbFI:2PRIRMxMj8A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=hDbtQuXGbFI:2PRIRMxMj8A:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=hDbtQuXGbFI:2PRIRMxMj8A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=hDbtQuXGbFI:2PRIRMxMj8A:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/expensesspreadsheet-net-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Permanent Redirect Non-WWW to WWW in Node.JS on Heroku</title>
		<link>http://www.streamhead.com/nodejs-permanent-redirect/</link>
		<comments>http://www.streamhead.com/nodejs-permanent-redirect/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 12:00:41 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Java and JavaScript]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3329</guid>
		<description><![CDATA[For SEO reasons it&#8217;s important to make sure that users only visit your site through a single domain name. Either www.example.com or example.com, but not both. In most cases a .htaccess change is the easiest fix. But not when you&#8217;re deploying to an environment that doesn&#8217;t have Apache, like Heroku. Here&#8217;s a quick way to [...]]]></description>
			<content:encoded><![CDATA[<p>For SEO reasons it&#8217;s important to make sure that users only visit your site through a single domain name. Either www.example.com or example.com, but not both. In most cases a .htaccess change is the easiest fix. But not when you&#8217;re deploying to an environment that doesn&#8217;t have Apache, like Heroku. Here&#8217;s a quick way to get this functionality using Express on Node.JS</p>
<p><span id="more-3329"></span>Since you probably only want to do this in a production environment, I suggest you place this in <a title="Express configuration" href="http://expressjs.com/guide.html#configuration">that configure block</a>.</p>
<p>Before you add any middleware add the following route:</p>

<div class="wp_codebox"><table><tr id="p33292"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p3329code2"><pre class="javascript" style="font-family:monospace;">app.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'*'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>req<span style="color: #339933;">,</span> res<span style="color: #339933;">,</span> next<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>req.<span style="color: #660066;">headers</span>.<span style="color: #660066;">host</span>.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'www'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    res.<span style="color: #660066;">redirect</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'http://www.'</span> <span style="color: #339933;">+</span> req.<span style="color: #660066;">headers</span>.<span style="color: #660066;">host</span> <span style="color: #339933;">+</span> req.<span style="color: #660066;">url</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">301</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
    next<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That&#8217;s really all there is to it. Since most frameworks have similar routing options, you should be able to adapt this to other frameworks, such as Geddy.</p>
<p>BTW I&#8217;m planning to launch a Node.JS app in November as part of <a title="Launch an app month" href="http://news.ycombinator.com/item?id=3180321">Hacker News&#8217; Launch an App Month</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=2NGzGLZFBSI:-mlUE8BYT3I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=2NGzGLZFBSI:-mlUE8BYT3I:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=2NGzGLZFBSI:-mlUE8BYT3I:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=2NGzGLZFBSI:-mlUE8BYT3I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=2NGzGLZFBSI:-mlUE8BYT3I:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=2NGzGLZFBSI:-mlUE8BYT3I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=2NGzGLZFBSI:-mlUE8BYT3I:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=2NGzGLZFBSI:-mlUE8BYT3I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=2NGzGLZFBSI:-mlUE8BYT3I:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/nodejs-permanent-redirect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Updated PayPal AppEngine Servlet</title>
		<link>http://www.streamhead.com/updated-paypal-appengine-servlet/</link>
		<comments>http://www.streamhead.com/updated-paypal-appengine-servlet/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 14:00:24 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Java and JavaScript]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3322</guid>
		<description><![CDATA[If you want to integrate PayPal with your Google AppEngine application, there are a limited number of options available. My own open source project offers a servlet that can parse and log IPN messages. This will quickly get you up and running with PayPal Payments Standard. Since I launched the PayPal servlet, I&#8217;ve had many [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to integrate PayPal with your Google AppEngine application, there are a limited number of options available. My own open source project offers a servlet that can parse and log IPN messages. This will quickly get you up and running with <a title="PayPal payments standard guides" href="https://www.x.com/developers/paypal/development-and-integration-guides#wps">PayPal Payments Standard</a>.</p>
<p><span id="more-3322"></span><a title="Java AppEngine PayPal IPN servlet" href="http://www.streamhead.com/java-paypal-ipn-servlet/">Since I launched the PayPal servlet</a>, I&#8217;ve had many inquiries and I know of at least 2 production deployments of the code. It was about time that I started handling the project a little more professionally.</p>
<p>The first step in this process was completed last weekend: the project is now a Maven project and the Eclipse specific configuration has been removed. I have decided to make this part of my <a title="Powered by Reindeer, quick appengine development" href="http://www.streamhead.com/vaadin-app-engine-in-5-minutes/">Powered by Reindeer initiative</a>. Although it can be used completely independent and will remain so, I believe that there are going to be some nice synergies in the future that I&#8217;ll want to exploit.</p>
<p>My next step will be cleaning up the actual code. I&#8217;m not sure when I&#8217;ll get around to it, but this will involve changing the package names a little to be more in line with the Powered by Reindeer structure. If you think there&#8217;s a good reason to keep the old names, please let me know. Also let me know if you&#8217;d like to get a personal e-mail when the changes will take place.</p>
<p><a title="Java AppEngine PayPal IPN servlet" href="https://github.com/pbackx/PayPalIPNServlet">See the GitHub page for all details</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=RR946LVNV_g:c8IoAHn9oI4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=RR946LVNV_g:c8IoAHn9oI4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=RR946LVNV_g:c8IoAHn9oI4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=RR946LVNV_g:c8IoAHn9oI4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=RR946LVNV_g:c8IoAHn9oI4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=RR946LVNV_g:c8IoAHn9oI4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=RR946LVNV_g:c8IoAHn9oI4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=RR946LVNV_g:c8IoAHn9oI4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=RR946LVNV_g:c8IoAHn9oI4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/updated-paypal-appengine-servlet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>AZERTY Keyboard and jMonkeyEngine Quick Tip</title>
		<link>http://www.streamhead.com/azerty-jmonkeyengine/</link>
		<comments>http://www.streamhead.com/azerty-jmonkeyengine/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 14:00:26 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Java and JavaScript]]></category>
		<category><![CDATA[jMonkeyEngine]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3314</guid>
		<description><![CDATA[If you&#8217;ve ever created anything using jMonkeyEngine&#8217;s SimpleApplication and you use something other than the American standard QWERTY keyboard, you might have had the same frustration as me: Why isn&#8217;t there quick way to switch the keyboard layout? The SimpleApplication base class is supposed to make your life easier, yet there you are, completely stuck [...]]]></description>
			<content:encoded><![CDATA[<img width="300" height="250" src="http://www.streamhead.com/wp-content/uploads/2011/08/jMonkeEngine_showcase.png" class="attachment-post-thumbnail wp-post-image" alt="jMonkeEngine_showcase" title="jMonkeEngine_showcase" /><p>If you&#8217;ve ever created anything using jMonkeyEngine&#8217;s SimpleApplication and you use something other than the American standard QWERTY keyboard, you might have had the same frustration as me: Why isn&#8217;t there quick way to switch the keyboard layout? The SimpleApplication base class is supposed to make your life easier, yet there you are, completely stuck with that unnatural keyboard layout. Read on for a quick copy-and-paste solution.</p>
<p><span id="more-3314"></span>The keyboard mapping that SimpleApplication uses for its camera movement is defined in the FlyByCamera. The mapping is hardcoded and the mapping names don&#8217;t even use constant strings. Clearly, no one ever thought about international users. <a title="jMonkeyEngine.org" href="http://jmonkeyengine.org/">jMonkeyEngine</a> does so many things right, yet on this one, it really misses the ball.</p>
<p>Luckily, with a little searching, it&#8217;s fairly easy to redefine the correct mappings. It&#8217;s something I now do in all my experiments.</p>
<p>I just copy and paste the following at the start of every simpleInitApp:</p>

<div class="wp_codebox"><table><tr id="p33145"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p3314code5"><pre class="java" style="font-family:monospace;">inputManager.<span style="color: #006633;">deleteMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_Forward&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">deleteMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_Lower&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">deleteMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_StrafeLeft&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">deleteMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_Rise&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">addMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_Forward&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> KeyTrigger<span style="color: #009900;">&#40;</span>KeyInput.<span style="color: #006633;">KEY_Z</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">addMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_Lower&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> KeyTrigger<span style="color: #009900;">&#40;</span>KeyInput.<span style="color: #006633;">KEY_W</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">addMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_StrafeLeft&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> KeyTrigger<span style="color: #009900;">&#40;</span>KeyInput.<span style="color: #006633;">KEY_Q</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">addMapping</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FLYCAM_Rise&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> KeyTrigger<span style="color: #009900;">&#40;</span>KeyInput.<span style="color: #006633;">KEY_A</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inputManager.<span style="color: #006633;">addListener</span><span style="color: #009900;">&#40;</span>flyCam, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;FLYCAM_Forward&quot;</span>, <span style="color: #0000ff;">&quot;FLYCAM_Lower&quot;</span>, <span style="color: #0000ff;">&quot;FLYCAM_StrafeLeft&quot;</span>, <span style="color: #0000ff;">&quot;FLYCAM_Rise&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
flyCam.<span style="color: #006633;">setMoveSpeed</span><span style="color: #009900;">&#40;</span>10f<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>(Note that I&#8217;ve also sped up the movement to more easily move around)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=Rgalq4mWkPM:NGDB2ycqE4Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=Rgalq4mWkPM:NGDB2ycqE4Q:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=Rgalq4mWkPM:NGDB2ycqE4Q:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=Rgalq4mWkPM:NGDB2ycqE4Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=Rgalq4mWkPM:NGDB2ycqE4Q:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=Rgalq4mWkPM:NGDB2ycqE4Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=Rgalq4mWkPM:NGDB2ycqE4Q:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=Rgalq4mWkPM:NGDB2ycqE4Q:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=Rgalq4mWkPM:NGDB2ycqE4Q:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/azerty-jmonkeyengine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://www.streamhead.com/wp-content/uploads/2011/08/jMonkeEngine_showcase.png" />
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/08/jMonkeEngine_showcase.png" medium="image">
			<media:title type="html">jMonkeEngine_showcase</media:title>
		</media:content>
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/08/jMonkeEngine_showcase.png" medium="image">
			<media:title type="html">jMonkeEngine_showcase</media:title>
		</media:content>
	</item>
		<item>
		<title>Website Wireframes and Mock Tools Comparison</title>
		<link>http://www.streamhead.com/mock-tools/</link>
		<comments>http://www.streamhead.com/mock-tools/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 14:00:20 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3279</guid>
		<description><![CDATA[Whenever you&#8217;re proposing a web site or application to a client, showing him what it&#8217;s going to look like can work wonders. It avoids confusion and can fix doubts. But how do you show off a website when you haven&#8217;t written one line of code and HTML? Wireframe tools and website mocks are the answer. [...]]]></description>
			<content:encoded><![CDATA[<img width="300" height="250" src="http://www.streamhead.com/wp-content/uploads/2011/08/facebook_mockup.png" class="attachment-post-thumbnail wp-post-image" alt="Facebook mockup" title="facebook_mockup" /><p>Whenever you&#8217;re proposing a web site or application to a client, showing him what it&#8217;s going to look like can work wonders. It avoids confusion and can fix doubts. But how do you show off a website when you haven&#8217;t written one line of code and HTML? Wireframe tools and website mocks are the answer. This article compares a few of the many tools available.</p>
<p><span id="more-3279"></span>In this article I compare:</p>
<ul>
<li><a title="Balsamiq" href="http://balsamiq.com/">Balsamiq</a>. The de-facto standard for creating mocks.</li>
<li><a title="Rapid wireframing tool, for teams - WireframeSkechter" href="http://wireframesketcher.com/">WireframeSkechter</a>. A new kid on the block, based on Eclipse. The author generously donated a free license for this review.</li>
<li><a title="Website wireframes: Mockingbird" href="https://gomockingbird.com/">Mockingbird</a>. A completely web-based tool.</li>
</ul>
<p>All three of the tools offer a similar feature set and are all very capable. So if you don&#8217;t feel like reading on, just pick one, and I&#8217;m sure you&#8217;ll be happy.</p>
<p>Of course, if you look closely, there are many small differences that might suite you and your workflow better.</p>
<p><strong>Mockingbird</strong>&#8216;s visual style is cleaner and different than most other tools. And the way you can arrange components by snapping them to guidelines and other components is equaled by no other tool. It&#8217;s easy to quickly create a well-aligned and well-spaced layout.</p>
<p><strong>Balsamiq </strong> is the most widely known mocking tool. It is popular for a reason. With a solid standard set of components and many ways to extend its functionality through custom components and third party tools, you&#8217;ll certainly find what you need. I tested the desktop version, but since this is a Flex application, the online version is exactly the same.</p>
<p><strong>WireframeSketcher</strong> has a similar sketchy look as Balsamiq. Which is great way to communicate to your client that these are just temporary mockups. WireframeSketcher&#8217;s main selling point is the wiki-like syntax that allows you to deeply customize the standard components, such as the table. My main gripe is the small up and down arrows to navigate through the component library. I know this is a very minor annoyance, but the idea of mockups is to quickly sketch a layout and this held me back somewhat.</p>
<p>None of the three tools have an intuitive way of adding arrows. I like to attach yellow sticky notes to certain areas to explain different parts and have arrows point out the details. None of the tools made this easy.</p>
<p>The following spreadsheet gives an overview of some of the features of the different tools. You&#8217;ll notice that they are very close, so in the end it&#8217;s probably going to come down to personal preference.</p>
<p><iframe src="https://docs.google.com/spreadsheet/pub?hl=en_US&amp;hl=en_US&amp;key=0AimAxoLiivAfdDFzOWpYUDBBTGYxRWhqNlR0U2d6THc&amp;single=true&amp;gid=0&amp;range=A1%3AD19&amp;output=html&amp;widget=true" frameborder="0" width="530" height="530"></iframe></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=VjHfhfaMF6k:U2eWXOuIVsY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=VjHfhfaMF6k:U2eWXOuIVsY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=VjHfhfaMF6k:U2eWXOuIVsY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=VjHfhfaMF6k:U2eWXOuIVsY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=VjHfhfaMF6k:U2eWXOuIVsY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=VjHfhfaMF6k:U2eWXOuIVsY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=VjHfhfaMF6k:U2eWXOuIVsY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=VjHfhfaMF6k:U2eWXOuIVsY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=VjHfhfaMF6k:U2eWXOuIVsY:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/mock-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://www.streamhead.com/wp-content/uploads/2011/08/facebook_mockup.png" />
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/08/facebook_mockup.png" medium="image">
			<media:title type="html">facebook_mockup</media:title>
		</media:content>
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/08/facebook_mockup.png" medium="image">
			<media:title type="html">facebook_mockup</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP in Action, a Review</title>
		<link>http://www.streamhead.com/php-in-action-a-review/</link>
		<comments>http://www.streamhead.com/php-in-action-a-review/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 14:00:01 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3284</guid>
		<description><![CDATA[is all about using PHP. It is not about learning PHP. In the book, you&#8217;ll study practical ways of applying software patterns to real life situations. It is not a book for beginning PHP programmers, but it is a treasure trove for those looking for good ways to solve common problems in web application development. [...]]]></description>
			<content:encoded><![CDATA[<img width="300" height="250" src="http://www.streamhead.com/wp-content/uploads/2011/08/php_in_action.png" class="attachment-post-thumbnail wp-post-image" alt="PHP in Action, Objects, Design, Agility" title="PHP in Action" /><p><a href="http://www.amazon.com/PHP-Action-Objects-Design-Agility/dp/1932394753?SubscriptionId=AKIAIXG5C7XJL5DE6CZA&tag=streamhead-20" target="_blank" rel="nofollow" title="" >PHP in Action</a> is all about using PHP. It is not about learning PHP. In the book, you&#8217;ll study practical ways of applying software patterns to real life situations. It is not a book for beginning PHP programmers, but it is a treasure trove for those looking for good ways to solve common problems in web application development.</p>
<h2><span id="more-3284"></span>PHP</h2>
<p>You may or may not like to hear this, but PHP is the language of the web. Where JavaScript is the de facto choice for client side programming, PHP is ubiquitous on the servers of small businesses everywhere, but it is also used for many large web applications. Many other programming languages only come into play once a website is established and management decides something more &#8220;enterprisy&#8221; is needed.</p>
<p>The trouble with PHP is, that it makes it incredibly easy to shoot yourself in the foot. Global variables are frowned upon pretty much anywhere, PHP has a special keyword for them. Many popular PHP applications actually rely on them.</p>
<p>However, in the hands of a skilled PHP developer, the language is an incredible tool for rapid development. Dynamic programming and duck typing allow a freedom that any Java developer can only dream of. Add to this the availability of very cheap hosting and you&#8217;ve got a bootstrapper&#8217;s dream.</p>
<h2>PHP in Action</h2>
<p>This is where &#8220;<a href="http://www.amazon.com/PHP-Action-Objects-Design-Agility/dp/1932394753?SubscriptionId=AKIAIXG5C7XJL5DE6CZA&tag=streamhead-20" target="_blank" rel="nofollow" title="" >PHP in Action</a>&#8221; comes into the picture. It shows you how to apply modern software development and design techniques in PHP. In 4 parts you&#8217;ll learn:</p>
<ul>
<li>How you can create object oriented programs in PHP</li>
<li>How to properly and automatically test your application</li>
<li>How to create secure, extendible and bug-free web interfaces</li>
<li>And finally, how to get everything into and out of the database</li>
</ul>
<p>You&#8217;ll notice that there is no chapter on how to program PHP. You either need to know the PHP basics, or you&#8217;re going to need to fill the gaps by lots of Google. Nothing I would recommend to a starting programmer.</p>
<h2>Lead by Example</h2>
<p>Most of the chapters use small pieces of code from larger projects. Those examples work very well, because it clearly shows you why the presented patterns are useful and what pain points they solve. Starting from a badly designed program, the author gradually introduces the concepts and immediately applies them so you can see how the architecture of the application improves.</p>
<p>Depending on your knowledge of PHP and software patterns in general, you will need more or less time to truly get the advantage. In most cases you will want to experiment with them.</p>
<p>So take your time and work on some small hobby application during the read.</p>
<h2>Frameworks and Libraries</h2>
<p>Quite frequently, PHP libraries are used in the code examples. Most of them are only mentioned incidental, except for SimpleTest which is used throughout the chapters on testing. In most chapters, enough information is given to get started with the libraries immediately. However the database chapters were a bit too short in this regard. A few libraries are used (eg. Creole) and code fragments are shown, but the libraries&#8217; homepages and documentation are essential to really get started using them.</p>
<p>In general, the later chapters seemed to have been kept shorter and less in depth than the earlier ones. I&#8217;m not sure if this was intended, but it didn&#8217;t bother me, except for the chapter 14 on composite views and templating. In my opinion, this was the only chapter where the examples were too incomplete and the overview was missing. It was very unclear how the different parts fit together to form a templated application.</p>
<p>But that is my only criticism with the book.</p>
<h2>Conclusion</h2>
<p>If you know a little PHP or you have a good grip of another language and are feeling adventurous, <a href="http://www.amazon.com/PHP-Action-Objects-Design-Agility/dp/1932394753?SubscriptionId=AKIAIXG5C7XJL5DE6CZA&tag=streamhead-20" target="_blank" rel="nofollow" title="" >PHP in Action</a> is the book for you. Clear and concise examples show how to apply modern software development techniques and patterns.</p>
<p>&nbsp;</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=NEAlCxSql1Y:FRNHI0fnzkY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=NEAlCxSql1Y:FRNHI0fnzkY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=NEAlCxSql1Y:FRNHI0fnzkY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=NEAlCxSql1Y:FRNHI0fnzkY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=NEAlCxSql1Y:FRNHI0fnzkY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=NEAlCxSql1Y:FRNHI0fnzkY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=NEAlCxSql1Y:FRNHI0fnzkY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=NEAlCxSql1Y:FRNHI0fnzkY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=NEAlCxSql1Y:FRNHI0fnzkY:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/php-in-action-a-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://www.streamhead.com/wp-content/uploads/2011/08/php_in_action.png" />
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/08/php_in_action.png" medium="image">
			<media:title type="html">PHP in Action</media:title>
		</media:content>
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/08/php_in_action.png" medium="image">
			<media:title type="html">PHP in Action</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Web Hosting Options Flowchart</title>
		<link>http://www.streamhead.com/java-web-hosting-options-flowchart/</link>
		<comments>http://www.streamhead.com/java-web-hosting-options-flowchart/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 14:00:53 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Java and JavaScript]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3260</guid>
		<description><![CDATA[One question I get asked a lot, is where and how to host your Java web application. It&#8217;s all fine to create it inside Eclipse with an embedded server, but how do you get it to the people? For a long time, there was no answer for enthusiast programmers. There were only expensive and way [...]]]></description>
			<content:encoded><![CDATA[<p>One question I get asked a lot, is where and how to host your Java web application. It&#8217;s all fine to create it inside Eclipse with an embedded server, but how do you get it to the people? For a long time, there was no answer for enthusiast programmers. There were only expensive and way oversized options. Things have changed lately, but it&#8217;s still not an easy choice.</p>
<p>Therefore I have created a small flowchart that will try to guide you in the maze.</p>
<p><span id="more-3260"></span></p>
<p><img class="alignnone size-full wp-image-3264" title="java_hosting_flowchart" src="http://www.streamhead.com/wp-content/uploads/2011/06/java_hosting_flowchart.png" alt="Java Web Application Hosting Options" width="515" height="1399" /></p>
<p>Feel free to submit additions, corrections, comments. I&#8217;ll keep updating the flowchart.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=WxYDTTTTiaI:__Mde6YxGSo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=WxYDTTTTiaI:__Mde6YxGSo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=WxYDTTTTiaI:__Mde6YxGSo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=WxYDTTTTiaI:__Mde6YxGSo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=WxYDTTTTiaI:__Mde6YxGSo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=WxYDTTTTiaI:__Mde6YxGSo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=WxYDTTTTiaI:__Mde6YxGSo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=WxYDTTTTiaI:__Mde6YxGSo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=WxYDTTTTiaI:__Mde6YxGSo:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/java-web-hosting-options-flowchart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://www.streamhead.com/wp-content/uploads/2011/06/java_hosting_flowchart-300x250.png" />
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/06/java_hosting_flowchart.png" medium="image">
			<media:title type="html">java_hosting_flowchart</media:title>
			<media:thumbnail url="http://www.streamhead.com/wp-content/uploads/2011/06/java_hosting_flowchart-300x250.png" />
		</media:content>
	</item>
		<item>
		<title>A Google Appengine Staging Server Howto</title>
		<link>http://www.streamhead.com/google-appengine-staging-server/</link>
		<comments>http://www.streamhead.com/google-appengine-staging-server/#comments</comments>
		<pubDate>Tue, 17 May 2011 14:00:59 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Java and JavaScript]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3196</guid>
		<description><![CDATA[Out of the box, Google&#8217;s App Engine supports versioned deployments. You can switch back and forth between revisions very easily, which is a great feature for properly testing an application before going live. There is one major problem: All versions of the application share the same datastore. So if you&#8217;re migrating your data you run [...]]]></description>
			<content:encoded><![CDATA[<p>Out of the box, Google&#8217;s App Engine supports versioned deployments. You can switch back and forth between revisions very easily, which is a great feature for properly testing an application before going live. There is one major problem: All versions of the application share the same datastore. So if you&#8217;re migrating your data you run a serious risk of influencing your current production application. Hence the need for <strong>a proper staging environment</strong>.</p>
<p><span id="more-3196"></span>It&#8217;s no secret, I am a fan of Google&#8217;s App Engine. <a title="Google AppEngine in Practice" href="http://www.streamhead.com/google-appengine-practice/">Once you get used to its peculiarities, it has a number of major advantageous</a>. Since I started incorporating some of the continuous integration/lean startup ideas in <a title="Launching my FCTR invoicing/bookkeeping project" href="http://www.streamhead.com/launching-my-first-vaadin-appengine-project/">my own project</a> I&#8217;ve run into the shared datastore issue and the need for a properly isolated staging environment has become apparent.</p>
<p>Here&#8217;s how I did it.</p>
<h2>Setting up the Staging Application</h2>
<p>It&#8217;s possible to use namespaces to create an isolated datastore, however I didn&#8217;t want to create additional code for testing. So I took another approach, which I believe is a lot easier and less error-prone:</p>
<ol>
<li>In the appengine control panel, create a second application. You have 10 free ones so that shouldn&#8217;t be a problem. I added the &#8220;-staging&#8221; suffix to the name of the application under test, so I won&#8217;t mistake one for the other.</li>
<li>If you want to start from a copy of the existing datastore, you can <a title="Uploading and Downloading Data" href="http://code.google.com/appengine/docs/python/tools/uploadingdata.html">export the entire datastore using the Python development kit</a>. Even if you&#8217;re using the Java development kit, it&#8217;s worth setting this up. It allows you to make backups of your datastore, which might come in handy when something is really messed up.</li>
<li>Next, import the database into your staging application using the same tool.</li>
<li>And finally, deploy your application to the staging application. If you&#8217;re using Eclipse, just change the application id, if not, you can find the property in the appengine-web.xml.</li>
</ol>
<p>A small note on using production data in your tests: Be very careful about it. You may want to anonymize some of the data and remove anything that could be remotely confidential.</p>
<p>That should be it. There really wasn&#8217;t much to it, but you now should have a fully functioning copy of your production application. Surf around a little to make sure everything is working swiftly.</p>
<p>When you&#8217;re happy, lets automate it.</p>
<h2>Automating Deployments</h2>
<p><a title="Alternatives for Maven, Building with less Frustration" href="http://www.streamhead.com/maven-alternatives/">I was about to throw out Maven</a>, but I&#8217;ve now created a setup that I&#8217;m pretty happy with. So Maven is here to stay for now. As are the Maven Eclipse plugin and the <a title="maven-gae-plugin" href="http://code.google.com/p/maven-gae-plugin/">GAE plugin for Maven</a>.</p>
<p>It&#8217;s thanks to the maven-gae-plugin that I could automate the staging and production deployments. Which has given me a very reproducible build and deployment set up.</p>
<p>To seamlessly create a build for both the staging and production server, I&#8217;m using Maven profiles and its ability to <a title="Maven Resources plugin - Filtering" href="http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html">filter resources while copying them</a>.</p>
<p>In the appengine-web.xml I added a gae.application variable:</p>

<div class="wp_codebox"><table><tr id="p319611"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p3196code11"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;appengine-web-app</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://appengine.google.com/ns/1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${gae.application}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...</pre></td></tr></table></div>

<p>Next up I enabled filtering of the appengine-web.xml (all of the next few bits go into the pom.xml):</p>

<div class="wp_codebox"><table><tr id="p319612"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p3196code12"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-war-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;webResources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resource<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>src/main/webapp<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filtering<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filtering<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>**/appengine-web.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resource<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/webResources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>In the properties section, I added the default application, which is the staging one. This gives me the assurance that I&#8217;ll always be deploying to the staging environment, unless I really want to go to production:</p>

<div class="wp_codebox"><table><tr id="p319613"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p3196code13"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gae.application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>myapp-staging<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gae.application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>And for the production deployment I created a profile:</p>

<div class="wp_codebox"><table><tr id="p319614"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p3196code14"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>production<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gae.application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>myapp<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gae.application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>With this configuration, I can easily run the local development server:</p>
<pre>> mvn gae:run</pre>
<p>Deploy to the staging server:</p>
<pre>> mvn gae:deploy</pre>
<p>And when I&#8217;m happy, deploy it to the production server:</p>
<pre>> mvn gae:deploy -Pproduction</pre>
<p>In addition to the name of the application, you can also configure other properties that differ between a test setup and a production one. For instance, I use the PayPal development servers locally and on the staging server, but the real PayPal site in production.</p>
<h2>Conclusion</h2>
<p>With a pretty simple Maven configuration, it&#8217;s possible to create a very reproducible build and deployment environment. Add a continuous integration server and you&#8217;re on your way to the perfect lean setup.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=R96wko434R0:XNzgEYLhl5s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=R96wko434R0:XNzgEYLhl5s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=R96wko434R0:XNzgEYLhl5s:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=R96wko434R0:XNzgEYLhl5s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=R96wko434R0:XNzgEYLhl5s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=R96wko434R0:XNzgEYLhl5s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=R96wko434R0:XNzgEYLhl5s:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=R96wko434R0:XNzgEYLhl5s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=R96wko434R0:XNzgEYLhl5s:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/google-appengine-staging-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>How to Run Your WordPress.org Blog Locally for Experimentation and Fun</title>
		<link>http://www.streamhead.com/wordpress-locally/</link>
		<comments>http://www.streamhead.com/wordpress-locally/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 14:00:55 +0000</pubDate>
		<dc:creator>Peter Backx</dc:creator>
				<category><![CDATA[Java and JavaScript]]></category>

		<guid isPermaLink="false">http://www.streamhead.com/?p=3164</guid>
		<description><![CDATA[If you have a WordPress.org blog and want to try a new plugin or a new look, you have two options: You could just install it on your running production site and risk crashing it. Or you could first experiment with it on a different test installation. Ideally this test system would resemble the real [...]]]></description>
			<content:encoded><![CDATA[<img width="300" height="250" src="http://www.streamhead.com/wp-content/uploads/2011/04/wordpress-logo-stacked-rgb.png" class="attachment-post-thumbnail wp-post-image" alt="wordpress-logo-stacked-rgb" title="wordpress-logo-stacked-rgb" /><p>If you have a WordPress.org blog and want to try a new plugin or a new look, you have two options: You could just install it on your running production site and risk crashing it. Or you could first experiment with it on a different test installation. Ideally this test system would resemble the real site as closely as possible. I think you can guess which one is the right way and which is the one most people go for. This article show how to copy your existing blog to a local computer and run it there, so you don&#8217;t have to fear trying out something new.</p>
<p><span id="more-3164"></span>This tutorial requires some technical knowledge. How to set up a LAMP/WAMP stack, FTP files and use phpmyadmin. Nothing very complicated, but if you don&#8217;t feel comfortable doing it, I&#8217;d gladly help you out and create a fully working VirtualBox image of your blog for $50 (I&#8217;ll also support you in setting up VirtualBox).</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="hosted_button_id" type="hidden" value="86FU84U8WW2HC" />
<input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/BE/i/btn/btn_buynowCC_LG.gif" type="image" />
<img src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" border="0" alt="" width="1" height="1" /><br />
</form>
<p>(<a title="Why buy from Streamhead?" href="http://www.streamhead.com/about/why-buy-from-streamhead/">why buy from Streamhead?</a>)</p>
<h2>Step 0. Prerequisites</h2>
<p>This tutorial won&#8217;t work for WordPress.com hosted blogs, only for self-hosted WordPress.org blogs. You will need to have an FTP account that can access your WordPress installation files. Every host offers this, so check your hosting details and keep the FTP url, login and password ready.</p>
<p>You will also need to export your database. The easiest way is via phpMyAdmin. I haven&#8217;t seen a host that doesn&#8217;t offer this super-useful application. A link to it is usually located in the control panel of your hosting account.</p>
<h2>Step 1. Operating environment</h2>
<p>Depending on your preferences, there are a wide range of operating systems and environments you can work with.</p>
<ul>
<li>If you&#8217;re used to Windows and you like to keep it simple. You can install everything on Windows.</li>
<li>If you want to create something portable, I suggest running some kind of virtualization software. <a title="VirtualBox Keeps Your Development Environment Tidy" href="http://www.streamhead.com/virtualbox/" target="_blank">I&#8217;m a fan of VirtualBox</a>.</li>
</ul>
<p>Basically, pretty much any operating system will do, but I like to create a virtual <a title="Ubuntu" href="http://www.ubuntu.com/" target="_blank">Ubuntu system</a> in VirtualBox. It&#8217;s a great way to keep the server software that you&#8217;ll install in step 2 away from your &#8220;normal&#8221; operating environment. Shut down the virtual machine and you don&#8217;t need to worry about system processes that keep using memory and CPU that you forgot to shut down.</p>
<h2>Step 2. LAMP</h2>
<p>While there are other ways to run WordPress, the easiest way is to install the Apache web server, MySQL database and PHP language. It&#8217;s the same environment that your blog host uses, so this is the best way to reproduce identical conditions.</p>
<ul>
<li>If you&#8217;re on Windows, you can go for <a title="WAMP, an acronym that actually makes developers' lives easier" href="http://www.streamhead.com/wamp-acronym-developers-lives-easier/" target="_blank">one of the many WAMP distributions</a>.</li>
<li>For Ubuntu there is an <a title="Ubuntu Server Guide" href="https://help.ubuntu.com/10.10/serverguide/C/index.html" target="_blank">in depth guide to setting up a server</a>. Keep in mind that you don&#8217;t need to go through the whole guide. You only need to install Apache2, MySQL and PHP5. I also suggest to add phpMyAdmin while you&#8217;re installing. It isn&#8217;t strictly necessary but will make copying the database easier.</li>
<li>If you&#8217;re on Mac, <a title="MAMP, Mac, Apache, MySQL, PHP" href="http://www.mamp.info/en/index.html" target="_blank">there&#8217;s MAMP</a>.</li>
</ul>
<h2>Step 3. Copy WWW directory</h2>
<p>Now it&#8217;s time to do the actual work. First you need to copy all the blog files locally:</p>
<ul>
<li>Figure out where the local Apache server stores its files. On Ubuntu this will be in /var/www. Many WAMP distributions offer shortcuts to this directory.</li>
<li>Next open an FTP client. I like <a title="21 programs to have on your Windows PC" href="http://www.streamhead.com/21-programs-pc/" target="_blank">FileZilla</a>, but feel free to pick the one you like.</li>
<li>Connect to your blog&#8217;s FTP site and navigate to the WWW directory. Usually it&#8217;s called &#8220;www&#8221;, sometimes &#8220;public_html&#8221; or something similar. There should be 3 directories in there that start with wp (wp-admin, wp-content and wp-includes) plus a bunch of .php files that also start with wp and then a number of miscellaneous files.</li>
<li>Download this entire directory into your local www directory. This might take some time, especially if you have been blogging for a while, have many plugins/themes and/or have uploaded a lot of files.</li>
</ul>
<p>You can already perform steps 4 to 7 while the download continues.</p>
<h2>Step 4. The Database Connection</h2>
<p>In the WWW directory, open the file &#8220;wp-config.php&#8221;. You will see a number of lines that start with &#8220;define&#8221;. There&#8217;s one that defines the name of your database, it&#8217;s &#8220;DB_NAME&#8221;. Write down the name after that. By default it&#8217;s going to be &#8220;wrdp&#8221;, but this can vary. Also write down the values for DB_USER and DB_PASSWORD. You may have entered those at some point but might have forgotten them. Or they could be autogenerated when WordPress was installed.</p>
<h2>Step 5. Export the database</h2>
<p>Fire up phpMyAdmin on your remote host.</p>
<ul>
<li>In the right part of the screen, you&#8217;ll see a number of tabs.</li>
<li>One of those is &#8220;Export&#8221;. Click that one.</li>
<li>You&#8217;ll see a screen divided into two sections: &#8220;Export&#8221; and &#8220;Options&#8221;.</li>
<li>In the &#8220;Export&#8221; section select the database name that you wrote down in step 4.</li>
<li>You don&#8217;t need to change anything in the &#8220;Options&#8221; section.</li>
<li>If you have a large database, select &#8220;gzipped&#8221; compression at the bottom of the screen. This can reduced the file size by a lot (mine was only 30% of the original, uncompressed file)</li>
<li>If you like, you can pick a nice name for the download.</li>
<li>Click &#8220;go&#8221; and remember where you save the file.</li>
</ul>
<h2>Step 6. Import the Database</h2>
<p>Now we are going to import this file into your local database.</p>
<ul>
<li>Fire up phpMyAdmin locally. Again, your AMP distributions will come with a shortcut to it. On Ubuntu you&#8217;ll find it at <a title="Local phpMyAdmin" href="http://localhost/phpmyadmin/" target="_blank">http://localhost/phpmyadmin/</a> by default.</li>
<li>This time pick the &#8220;Import&#8221; tab. It&#8217;s right next to the &#8220;Export&#8221; one.</li>
<li>Browse and select the file you just saved.</li>
<li>Press &#8220;go&#8221;.</li>
</ul>
<h2>Step 7. Set Up the Database User</h2>
<p>Now we need to configure the WordPress database user. Remember you wrote down the name and password in step 4.</p>
<ul>
<li>In the left section of phpMyAdmin, where it shows the databases, you should now see your imported WordPress database.</li>
<li>Click on it and it will show the tables in that database.</li>
<li>Now click on the &#8220;Privileges&#8221; tab.</li>
<li>Enter the username and password.</li>
<li>As host enter * or localhost.</li>
<li>Check all privileges (this will give global privileges, you could also give the user only access to the WordPress database. Since this is a local test system I&#8217;m not too worried about strict security, but keep this in mind)</li>
<li>Click &#8220;go&#8221; to create the user.</li>
</ul>
<h2>Step 8. First Test</h2>
<p>Surf to <a title="Local WordPress install" href="http://localhost" target="_blank">http://localhost</a></p>
<p>You should see the blog appear, but you might notice it downloads all images from your original blog site. All links will also still point to the Internet, not to the local site. You won&#8217;t be able to log into the administration.</p>
<h2>Step 9. Converting to Localhost</h2>
<p>You didn&#8217;t leave phpMyAdmin, did you?</p>
<ul>
<li>In the left column, click on your blog database (if it isn&#8217;t already showing)</li>
<li>Browse the &#8220;wp_options&#8221; table (it&#8217;s the first tiny actions icon)</li>
<li>Find the two options with option_name &#8220;siteurl&#8221; and &#8220;home&#8221;. There are many ways to do this, phpMyAdmin has a search function or you could change the SQL query if you know what you&#8217;re doing.</li>
<li>Change both options (with the little pen icon) so that their &#8220;option_value&#8221; reads &#8220;http://localhost&#8221;</li>
</ul>
<h2>Step 10. You&#8217;re Done</h2>
<p>That&#8217;s it. You now have a fully functioning local copy of your WordPress.org blog.</p>
<h2>Common Issues</h2>
<h3>When importing the database you receive an error that the file is too large.</h3>
<p>In many cases, it might be beneficial to first <a title="Optimize WordPress for shared hosting" href="http://www.streamhead.com/wordpress-shared-hosting/" target="_blank">clean up your database</a>. Also make sure you enable gzip compression. If none of those help, you will need to <a title="PHP File Upload Configuration" href="http://www.radinks.com/upload/config.php" target="_blank">change the default PHP file upload limit</a>.</p>
<h3>Categories or article links don&#8217;t work</h3>
<p>Depending on your permalink structure, you need to have the &#8220;mod_rewrite&#8221; Apache module enabled. I&#8217;m not sure why, but this isn&#8217;t always on by default. There are numerous articles about it if you Google. For instance <a title="Enable mod_rewrite on Apache 2 for Ubuntu" href="http://www.ghacks.net/2009/12/05/enable-mod_rewrite-in-a-ubuntu-server/" target="_blank">here&#8217;s a howto for Ubuntu</a>.</p>
<h3>Can&#8217;t add/configure plugins and themes and other permission issues.</h3>
<p>Again, depending on how your installation is configured, the Apache/PHP process may not have permissions to change or add files in your WWW directory. If you don&#8217;t care about security, I suggest a &#8220;chmod -R 777 *&#8221; in your WWW directory. If you do care, find the group that the Apache process runs in and give that group write access to the entire WWW directory.</p>
<h3>Something else</h3>
<p>I haven&#8217;t run into this issue, but I can imagine there are plugins that won&#8217;t like to be moved to a different server. If you see strange issues, try to disable your plugins and enable them one by one. If you find the culprit, maybe you need to change its options in the wp_options database table.</p>
<h2>Conclusion</h2>
<p>Having a full copy of your blog on your own computer is a great resource to experiment with new themes or plugins. Although it might look daunting, once you&#8217;ve done this procedure, you won&#8217;t know why you didn&#8217;t try this earlier.</p>
<p>If you&#8217;re not very technical, or don&#8217;t feel like going through all the steps, I offer a $50 service for creating a VirtualBox Ubuntu image. Feel free to <a title="Contact me for more information" href="http://www.streamhead.com/contact/" target="_blank">contact me for more information</a>, or you can go straight to PayPal (VirtualBox setup is included).</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="hosted_button_id" type="hidden" value="86FU84U8WW2HC" />
<input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/BE/i/btn/btn_buynowCC_LG.gif" type="image" />
<img src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" border="0" alt="" width="1" height="1" /> </form>
<p>(<a title="Why buy from Streamhead?" href="../about/why-buy-from-streamhead/">why buy from Streamhead?</a>)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/streamhead?a=inlhQ882WWQ:qul8aDxfLPc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/streamhead?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=inlhQ882WWQ:qul8aDxfLPc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/streamhead?i=inlhQ882WWQ:qul8aDxfLPc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=inlhQ882WWQ:qul8aDxfLPc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/streamhead?i=inlhQ882WWQ:qul8aDxfLPc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=inlhQ882WWQ:qul8aDxfLPc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/streamhead?i=inlhQ882WWQ:qul8aDxfLPc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/streamhead?a=inlhQ882WWQ:qul8aDxfLPc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/streamhead?i=inlhQ882WWQ:qul8aDxfLPc:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.streamhead.com/wordpress-locally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://www.streamhead.com/wp-content/uploads/2011/04/wordpress-logo-stacked-rgb.png" />
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/04/wordpress-logo-stacked-rgb.png" medium="image">
			<media:title type="html">wordpress-logo-stacked-rgb</media:title>
		</media:content>
		<media:content url="http://www.streamhead.com/wp-content/uploads/2011/04/wordpress-logo-stacked-rgb.png" medium="image">
			<media:title type="html">wordpress-logo-stacked-rgb</media:title>
		</media:content>
		<media:content url="http://www.streamhead.com//www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" medium="image" />
		<media:content url="http://www.streamhead.com//www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" medium="image" />
	</item>
	</channel>
</rss><!-- Dynamic page generated in 1.620 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-02-03 18:40:20 --><!-- Compression = gzip -->

