<?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>Substance of Code</title>
	<atom:link href="http://www.substanceofcode.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.substanceofcode.com</link>
	<description>Software Artisan Tommi Laukkanen</description>
	<lastBuildDate>Mon, 30 Aug 2010 21:15:54 +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>TaskFlow &#8211; Simple GTD app for Nokia N900</title>
		<link>http://www.substanceofcode.com/2010/08/31/taskflow-simple-gtd-app-for-nokia-n900/</link>
		<comments>http://www.substanceofcode.com/2010/08/31/taskflow-simple-gtd-app-for-nokia-n900/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 21:15:54 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Runtime]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=761</guid>
		<description><![CDATA[Ever since I switched from Nokia E71 to Nokia N900 I started to miss my Mobile Task Manager app which was really handy Getting Things Done tool on the Java ME capable Symbian device. Now that Qt people from Nokia &#8230; <a href="http://www.substanceofcode.com/2010/08/31/taskflow-simple-gtd-app-for-nokia-n900/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever since I switched from Nokia E71 to Nokia N900 I started to miss my <a href="http://www.substanceofcode.com/software/mobile-task-manager/">Mobile Task Manager</a> app which was really handy <a href="http://en.wikipedia.org/wiki/Getting_Things_Done" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Getting_Things_Done?referer=');">Getting Things Done</a> tool on the Java ME capable Symbian device.</p>
<p>Now that Qt people from Nokia released a preview of the Qt Web Runtime for N900 I was able to create a new simple task manager tool for my new phone in matter of hours. I like both <a href="http://en.wikipedia.org/wiki/KISS_principle" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/KISS_principle?referer=');">KISS princible</a> and GTD organizational method so I made the app as simple as possible: There are only four &#8220;folders&#8221; for tasks &#8211; Next, Someday, Archive and Shop. I tend to store my active tasks on the <em>Next</em> folder. Tasks that doesn&#8217;t have high priority go into <em>Someday</em> folder. Old tasks or tasks that are low priority go into <em>Archive. </em>Just because I used the Mobile Task Manager as a shopping list too I made a separate folder for listing the groceries.</p>
<p><a title="TaskFlow - Simple GTD app for Nokia N900 by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4942378585/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4942378585/?referer=');"><img src="http://farm5.static.flickr.com/4081/4942378585_edda8ce4ed_z.jpg" alt="TaskFlow - Simple GTD app for Nokia N900" width="640" height="384" /></a></p>
<p>On the technical side I was now able to use HTML5 client-side storage to persist the tasks. I wrote another <a href="http://www.substanceofcode.com/2010/08/30/storing-objects-to-html5-client-side-storage/">blog post</a> on that subject just to show how easy it is.</p>
<p>UI was easy to do and now I also took advantage of both portrait and landscape view modes. In landscape mode the toolbar is on the right side of the screen so that there are as much vertical space as possible for the tasks and in the portrait mode the toolbar is in the bottom so it is pretty easy to use with one hand for example when collecting items from shopping list.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Rx8mbpDhA9Q?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/Rx8mbpDhA9Q?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>You can download the widget here: <a href="http://bit.ly/taskflow-wgt" onclick="pageTracker._trackPageview('/outgoing/bit.ly/taskflow-wgt?referer=');">TaskFlow.wgt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/31/taskflow-simple-gtd-app-for-nokia-n900/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing Objects to HTML5 Client-side Storage</title>
		<link>http://www.substanceofcode.com/2010/08/30/storing-objects-to-html5-client-side-storage/</link>
		<comments>http://www.substanceofcode.com/2010/08/30/storing-objects-to-html5-client-side-storage/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 17:58:03 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web Runtime]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=756</guid>
		<description><![CDATA[Here is a handy tip on how to store your JavaScript objects into HTML5 client-side storage which is basically a simple key/value hashtable. You can easily store objects into a storage in JSON format. Code that I&#8217;m using for storing &#8230; <a href="http://www.substanceofcode.com/2010/08/30/storing-objects-to-html5-client-side-storage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a handy tip on how to store your JavaScript objects into <a href="http://dev.w3.org/html5/webstorage/" onclick="pageTracker._trackPageview('/outgoing/dev.w3.org/html5/webstorage/?referer=');">HTML5 client-side storage</a> which is basically a simple key/value hashtable. You can easily store objects into a storage in <a href="http://www.json.org/" onclick="pageTracker._trackPageview('/outgoing/www.json.org/?referer=');">JSON</a> format.</p>
<p><a title="W3C Development with TextMate and Chrome by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4941960399/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4941960399/?referer=');"><img src="http://farm5.static.flickr.com/4082/4941960399_20fd9a852c_z.jpg" alt="W3C Development with TextMate and Chrome" width="640" height="384" /></a></p>
<p>Code that I&#8217;m using for storing the &#8220;Task&#8221; objects in my GTD app:</p>
<pre class="brush:javascript">var jsonTasks = JSON.stringify( tasks );
localStorage.tasks = jsonTasks;</pre>
<p>That&#8217;s it. That is quite easy and can&#8217;t really think of many languages where you can persist objects with only few lines of code.</p>
<p>Code that I&#8217;m using for retrieving objects from storage:</p>
<pre class="brush:javascript">tasks = JSON.parse( localStorage.tasks );</pre>
<p>I hope you find this helpful. It works great on <a href="http://labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/" onclick="pageTracker._trackPageview('/outgoing/labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/?referer=');">Qt Web Runtime</a> running on my Nokia N900.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/30/storing-objects-to-html5-client-side-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TwimGo Teaser &#8211; Maemo/MeeGo Twitter Client</title>
		<link>http://www.substanceofcode.com/2010/08/22/twimgo-teaser-maemomeego-twitter-client/</link>
		<comments>http://www.substanceofcode.com/2010/08/22/twimgo-teaser-maemomeego-twitter-client/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 20:30:39 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[meego]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[teaser]]></category>
		<category><![CDATA[twimgo]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=751</guid>
		<description><![CDATA[What if your Twitter client would look like this? I&#8217;ve seen that only few iPhone apps take advantage of portrait view. I made it so that you can see more tweet details in the portrait view and even apply some &#8230; <a href="http://www.substanceofcode.com/2010/08/22/twimgo-teaser-maemomeego-twitter-client/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>What if your Twitter client would look like this? I&#8217;ve seen that only few iPhone apps take advantage of portrait view. I made it so that you can see more tweet details in the portrait view and even apply some actions like retweet or reply.</p>
<p>What do you think? Would you use a client like this? What features or user experience you&#8217;d like to see in the app?</p>
<p>TwimGo in landscape mode (selected tweet details shown on right). Sorry about the twisted Finnish date format :)</p>
<p><a href="http://www.flickr.com/photos/tlaukkanen/4917543894/" title="TwimGo in landscape mode by tlaukkanen, on Flickr" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4917543894/?referer=');"><img src="http://farm5.static.flickr.com/4100/4917543894_8d5a004f2a_z.jpg" width="640" height="384" alt="TwimGo in landscape mode" /></a></p>
<p>TwimGo in portrait mode &#8211; clear timeline view:</p>
<p><a href="http://www.flickr.com/photos/tlaukkanen/4916948597/" title="TwimGo in portrait mode by tlaukkanen, on Flickr" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4916948597/?referer=');"><img src="http://farm5.static.flickr.com/4075/4916948597_b7cb9d3fe3_z.jpg" width="384" height="640" alt="TwimGo in portrait mode" /></a></p>
<p>I have to say that I like it a lot :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/22/twimgo-teaser-maemomeego-twitter-client/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Labyrinth Game with W3C Widget, Accelerometer API and Nokia N900</title>
		<link>http://www.substanceofcode.com/2010/08/21/labyrinth-game-with-w3c-widget-accelerometer-api-and-nokia-n900/</link>
		<comments>http://www.substanceofcode.com/2010/08/21/labyrinth-game-with-w3c-widget-accelerometer-api-and-nokia-n900/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 18:03:29 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web Runtime]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[labyrinth]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=744</guid>
		<description><![CDATA[I&#8217;ve been crafting the W3C Widgets for Qt Web Runtime (WRT) from the day Qt guys released the version for my Nokia N900. I haven&#8217;t been so productive on any other platform. This time I crafted a small game of &#8230; <a href="http://www.substanceofcode.com/2010/08/21/labyrinth-game-with-w3c-widget-accelerometer-api-and-nokia-n900/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been crafting the W3C Widgets for <a href="http://labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/" onclick="pageTracker._trackPageview('/outgoing/labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/?referer=');">Qt Web Runtime</a> (WRT) from the day Qt guys released the version for my Nokia N900. I haven&#8217;t been so productive on any other platform.</p>
<p>This time I crafted a small game of <a href="http://en.wikipedia.org/wiki/Labyrinth_(game)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Labyrinth_game?referer=');">Labyrinth</a>. The idea of game should be pretty familiar to everyone. You&#8217;ll need to guide the metal ball to goal by tilting the game board. I made it so that on each level there is one hole more compared to previous level. Levels are created randomly.</p>
<p><a title="My Labyrinth game for Nokia N900 by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4913005749/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4913005749/?referer=');"><img src="http://farm5.static.flickr.com/4135/4913005749_0567fe6dfc_z.jpg" alt="My Labyrinth game for Nokia N900" width="640" height="384" /></a></p>
<p>On the technical side it was easy to use device sensor in JavaScript to track the tilt angles:</p>
<pre class="brush:javascript">// Ball's acceleration
var ballAccX = 0.0;
var ballAccY = 0.0;

// Initialize sensors
wrtSensors = nokia.device.load("sensors");
wrtSensors.startChannel(callback, "AccelerometerAxis", errorCallback);

// Callback function for sensors
// The 2.5 is a magic number that felt good :)
function callback(data) {
	ballAccX = parseFloat(data.axisX) / 2.5;
	ballAccY = parseFloat(data.axisY) / 2.5;
} 

function errorCallback(err) {
}</pre>
<p>The animation and simple ball physics are done in JavaScript timer:</p>
<pre class="brush:javascript">// Initialize timer to be run on every 50ms
animate = setInterval("animateBall()", 50);

// Timer function contains most of game logic like
// checking if ball have reached the goal or hole.
// Ball movement and physics are also calculated here
function animateBall() {
	if(gameover==false &amp;&amp; goal==false) {
		ballVelX = ballVelX - ballAccX;
		ballX = ballX + ballVelX;
		ballVelY = ballVelY - ballAccY;
		ballY = ballY + ballVelY;	

		checkLimits();
		checkGoal();		

		// Move the ball DIV
		$("#ball").css("left", ballX);
		$("#ball").css("top", ballY);
	} else {
		if(goal) {
			$("#gameover").text("Creating next level!");
			$("#gameover").show();
			clearInterval(animate);
			level++;
			setTimeout("reset()", 1500);
		} else {
			$("#gameover").text("GAME OVER!");
			$("#gameover").show();
			level = 1;
			clearInterval(animate);
		}
	}
}</pre>
<p>Here is a small video of what it looks like in action on my Nokia N900:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="505" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/kEPP0bbSarA?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="505" src="http://www.youtube.com/v/kEPP0bbSarA?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>There are still few known issues in the game:</p>
<ul>
<li>It can create a level where goal is unreachable.</li>
<li>Another issue I&#8217;m having with the game is that I haven&#8217;t found out how the <strong>backlight</strong> could be forced to stay on. I wrote a <a href="http://developer.qt.nokia.com/forums/viewthread/534/" onclick="pageTracker._trackPageview('/outgoing/developer.qt.nokia.com/forums/viewthread/534/?referer=');">question</a> on Qt Web Runtime forum but haven&#8217;t received any answers. If you know how to do it, please <a href="http://developer.qt.nokia.com/forums/viewthread/534/" onclick="pageTracker._trackPageview('/outgoing/developer.qt.nokia.com/forums/viewthread/534/?referer=');">respond</a> to my thread.</li>
<li>It would be nice to have <strong>fullscreen</strong> mode in games like this. If you know how to create fullscreen widget, please <a href="http://developer.qt.nokia.com/forums/viewthread/380/" onclick="pageTracker._trackPageview('/outgoing/developer.qt.nokia.com/forums/viewthread/380/?referer=');">respond to this thread</a> in Qt Forum.</li>
</ul>
<p>Finally, if you&#8217;d like to try it out yourself you can download the widget (ChromeBall.wgt) <a href="http://bit.ly/labyrinth-n900" onclick="pageTracker._trackPageview('/outgoing/bit.ly/labyrinth-n900?referer=');">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/21/labyrinth-game-with-w3c-widget-accelerometer-api-and-nokia-n900/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Check Screen Orientation with jQuery in W3C Widget</title>
		<link>http://www.substanceofcode.com/2010/08/13/check-screen-orientation-with-jquery-in-w3c-widget/</link>
		<comments>http://www.substanceofcode.com/2010/08/13/check-screen-orientation-with-jquery-in-w3c-widget/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 17:55:28 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web Runtime]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=733</guid>
		<description><![CDATA[Here is a small tip for your W3C Widget on how you can identify when screen orientation have changed. It&#8217;s simple to use additional JavaScript libraries in widgets so it makes sense to use something like jQuery in your widgets. &#8230; <a href="http://www.substanceofcode.com/2010/08/13/check-screen-orientation-with-jquery-in-w3c-widget/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a small tip for your W3C Widget on how you can identify when screen orientation have changed.</p>
<p><a title="Screen rotation tutorial by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4885650601/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4885650601/?referer=');"><img src="http://farm5.static.flickr.com/4143/4885650601_5c2f17d348_z.jpg" alt="Screen rotation tutorial" width="640" height="480" /></a></p>
<p>It&#8217;s simple to use additional JavaScript libraries in widgets so it makes sense to use something like jQuery in your widgets. You can do so by downloading the latest jQuery library from their site and adding that to your ZIP file as separate js file.</p>
<p>With jQuery you can add an event handler for the screen resize event. In the event you can easily check the window dimensions and with those you can define the screen orientation. This makes it easy to change the overall UI to match the landscape and portrait views. Like in some apps you may want to have your toolbar in left side in landscape view and on the bottom when on portrait view.</p>
<p>Here is the code how this can be done with jQuery:</p>
<pre class="brush:html">&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
 &lt;head&gt;
  &lt;title&gt;Rotation Test&lt;/title&gt;
  &lt;link type="text/css" href="css/style.css" rel="stylesheet"&gt;&lt;/style&gt;
  &lt;script src="js/jquery-1.4.2.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;

  $(window).resize( function(){
    var height = $(window).height();
    var width = $(window).width();

    if(width&gt;height) {
      // Landscape
      $("#mode").text("LANDSCAPE");
    } else {
      // Portrait
      $("#mode").text("PORTRAIT");
    }

   });
  &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
   &lt;div id="mode"&gt;LANDSCAPE&lt;/div&gt;
 &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>You can download the whole widget here: <a href="http://www.substanceofcode.com/downloads/widgets/Rotate.wgt">Rotate.wgt</a></p>
<p>Here is a sample how widget works in action on Nokia N900:<br />
<object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/ByIo0RSBVpw?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ByIo0RSBVpw?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/13/check-screen-orientation-with-jquery-in-w3c-widget/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Create Simple W3C Widget</title>
		<link>http://www.substanceofcode.com/2010/08/10/how-to-create-simple-w3c-widget/</link>
		<comments>http://www.substanceofcode.com/2010/08/10/how-to-create-simple-w3c-widget/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 19:20:51 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=719</guid>
		<description><![CDATA[Here are instructions how you can create a simple W3C widget that runs on Qt Web Runtime (WRT) e.g. on Nokia N900. Widgets are just ZIP packages containing at least two files: Configuration file (config.xml) and resource files (index.html and &#8230; <a href="http://www.substanceofcode.com/2010/08/10/how-to-create-simple-w3c-widget/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are instructions how you can create a simple W3C widget that runs on Qt Web Runtime (WRT) e.g. on Nokia N900.</p>
<p>Widgets are just ZIP packages containing at least two files: Configuration file (config.xml) and resource files (index.html and other HTML, CSS, JavaScript and image files).</p>
<ul>
<li>widget.wgt &#8211; <span style="color: #999999;"><em><span style="color: #999999;">zip archive renamed to *.wgt, containing:</span><br />
</em></span></p>
<ul>
<li>config.xml <em>- <span style="color: #999999;">configurations</span></em></li>
<li>index.html <em>- <span style="color: #999999;">content</span></em></li>
</ul>
</li>
</ul>
<p><span style="color: #000000;">Configuration file contains information about the widget like name, version, author, icon etc. Example of simple config.xml file:</span></p>
<pre class="brush:xml">&lt;?xml version="1.0" ?&gt;
&lt;widget xmlns="http://www.w3.org/ns/widgets" id="http://www.substanceofcode.com/hellowidget" version="0.1.0"&gt;
  &lt;!-- Name of the widget --&gt;
  &lt;name&gt;Hello World&lt;/name&gt;
  &lt;!-- Description is shown when installing widget --&gt;
  &lt;description&gt;Simple hello world widget&lt;/description&gt;
  &lt;!-- Start page for widget --&gt;
  &lt;content src="index.html" /&gt;
  &lt;!-- Default icon for widget --&gt;
  &lt;icon src="icon.png" /&gt;
  &lt;!-- Widget author --&gt;
  &lt;author&gt;Tommi Laukkanen&lt;/author&gt;
&lt;/widget&gt;
</pre>
<p>Content is good old HTML, CSS, JavaScript etc. files. For example simple HTML page like this:</p>
<pre class="brush:html">&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Hello!&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello W3C Widget World!&lt;/h1&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre>
<p>When these two files are packaged into a ZIP archive and renamed to Hello.wgt you can install it on your Nokia N900 just by clicking the file in file browser. When you run the app it&#8217;ll look something like this:</p>
<div class="wp-caption alignnone" style="width: 650px"><a title="Hello World W3C Widget by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4879451450/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4879451450/?referer=');"><img title="Widget running on Nokia N900 with Qt Web Runtime" src="http://farm5.static.flickr.com/4095/4879451450_2408a52832_z.jpg" alt="Hello World W3C Widget" width="640" height="384" /></a><p class="wp-caption-text">Widget running on Nokia N900 with Qt Web Runtime</p></div>
<p>I hope that you find this tutorial helpful and start crafting your own widgets!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/10/how-to-create-simple-w3c-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Othello Widget for your Nokia N900</title>
		<link>http://www.substanceofcode.com/2010/08/07/othello-widget-for-your-nokia-n900/</link>
		<comments>http://www.substanceofcode.com/2010/08/07/othello-widget-for-your-nokia-n900/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 15:00:42 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Runtime]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=715</guid>
		<description><![CDATA[Now you can download the Othello game for your Nokia N900. It requires the Qt Web Runtime which can be installed at time of writing from Maemo Extras-devel repository as mentioned in Qt WRT forum. After you have installed the &#8230; <a href="http://www.substanceofcode.com/2010/08/07/othello-widget-for-your-nokia-n900/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Now you can download the Othello game for your Nokia N900. It requires the <a href="http://labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/" onclick="pageTracker._trackPageview('/outgoing/labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/?referer=');">Qt Web Runtime</a> which can be installed at time of writing from Maemo <a href="http://wiki.maemo.org/Extras-devel" onclick="pageTracker._trackPageview('/outgoing/wiki.maemo.org/Extras-devel?referer=');">Extras-devel</a> repository as mentioned in <a href="http://developer.qt.nokia.com/forums/viewthread/307/" onclick="pageTracker._trackPageview('/outgoing/developer.qt.nokia.com/forums/viewthread/307/?referer=');">Qt WRT forum</a>.</p>
<p>After you have installed the WRT on your N900 then you can point your N900 browser to <a href="http://bit.ly/n900-othello-wgt" onclick="pageTracker._trackPageview('/outgoing/bit.ly/n900-othello-wgt?referer=');">http://bit.ly/n900-othello-wgt</a></p>
<p>Happy gaming! Let me know how well the application works on your device and does the computer AI ever beat you :)</p>
<p><a title="Screenshot of Othello on my Nokia N900 by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4865447539/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4865447539/?referer=');"><img src="http://farm5.static.flickr.com/4137/4865447539_c056348e43_z.jpg" alt="Screenshot of Othello on my Nokia N900" width="640" height="384" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/07/othello-widget-for-your-nokia-n900/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing W3C Widgets for Nokia N900</title>
		<link>http://www.substanceofcode.com/2010/08/06/developing-w3c-widgets-for-nokia-n900/</link>
		<comments>http://www.substanceofcode.com/2010/08/06/developing-w3c-widgets-for-nokia-n900/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 07:25:12 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=703</guid>
		<description><![CDATA[Ever since I got my Nokia N900 several months ago I wanted to craft great apps for it. There haven&#8217;t been that many development options if I&#8217;d like to do the development on my Mac. Good options was Python (PyMaemo) &#8230; <a href="http://www.substanceofcode.com/2010/08/06/developing-w3c-widgets-for-nokia-n900/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever since I got my Nokia N900 several months ago I wanted to craft great apps for it. There haven&#8217;t been that many development options if I&#8217;d like to do the development on my Mac. Good options was Python (<a href="http://wiki.maemo.org/PyMaemo" onclick="pageTracker._trackPageview('/outgoing/wiki.maemo.org/PyMaemo?referer=');">PyMaemo</a>) which you can use to create apps that behave like native apps. Second and very good option is to develop apps with new <a href="http://www.forum.nokia.com/Develop/Qt/Tools/" onclick="pageTracker._trackPageview('/outgoing/www.forum.nokia.com/Develop/Qt/Tools/?referer=');">Nokia Qt SDK</a> as it also has IDE (Qt Creator) and N900 emulator which runs nicely on Mac too.</p>
<p>Few weeks ago I discovered that <a href="http://labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/" onclick="pageTracker._trackPageview('/outgoing/labs.trolltech.com/blogs/2010/07/19/the-qt-web-runtime-journey-begins/?referer=');">Qt released a technology preview of Qt Web Runtime</a> (Qt WRT) for N900 and after crafting few hello worlds and simple apps for that I can say that this is by far the easiest and fastest way to get your apps up and running on N900 (or any future phone which supports Qt Web Framework).</p>
<p><a href="http://www.flickr.com/photos/tlaukkanen/4860971146/" title="Created game of Othello for my Nokia N900 by tlaukkanen, on Flickr" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4860971146/?referer=');"><img src="http://farm5.static.flickr.com/4079/4860971146_b83b18b848_z.jpg" width="640" height="480" alt="Created game of Othello for my Nokia N900" /></a></p>
<p>Here is a sample video of my first widget, game of Othello aka Reversi, running on my Nokia N900. In the video you can see how well the widgets are integrated into the platform so they have the same feeling as native apps starting from the installer:</p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/qIaamjdrHy8&amp;hl=en_US&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qIaamjdrHy8&amp;hl=en_US&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p>Runtime supports W3C Widgets which are basically ZIP archives containing HTML, CSS, JavaScript files and single configuration file <em>config.xml</em> where you define e.g. widget name, icon and version. You&#8217;ll only need to rename the *.zip package to *.wgt and open the widget file in your device and it is installed on the device like a native app with icons and all. Compared to J2ME app development widget development is really rapid and agile.</p>
<p>Qt Web Runtime also has support for native APIs like camera, contacts, messages, etc. so widgets act like 1st class citizens on the device. You don&#8217;t have any nasty security popups which are the most annoying thing in Java ME apps.</p>
<p>I&#8217;ll post the downloadable widget in the later posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/08/06/developing-w3c-widgets-for-nokia-n900/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twim 1.18 &#8211; Countdown to Twitter&#8217;s OAuth Switch</title>
		<link>http://www.substanceofcode.com/2010/07/27/twim-1-18-countdown-to-twitters-oauth-switch/</link>
		<comments>http://www.substanceofcode.com/2010/07/27/twim-1-18-countdown-to-twitters-oauth-switch/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 20:00:36 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=689</guid>
		<description><![CDATA[Twitter is going to disable the basic authentication method from their API. This means that the old versions of Twim will stop working. Most likely there are quite a few client apps out there which will stop working when that &#8230; <a href="http://www.substanceofcode.com/2010/07/27/twim-1-18-countdown-to-twitters-oauth-switch/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Twitter is going to disable the basic authentication method from their API. This means that the old versions of <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">Twim</a> will stop working. Most likely there are quite a few client apps out there which will stop working when that happens. Check the countdown site for remaining days: <a href="http://www.countdowntooauth.com/" onclick="pageTracker._trackPageview('/outgoing/www.countdowntooauth.com/?referer=');">countdowntooauth.com</a></p>
<p>In the future Twitter will support OAuth authentication and luckily there is also xAuth support too which is simplified version of OAuth. xAuth works great for non-desktop apps like <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">Twim</a>. I just implemented xAuth support to Twim.</p>
<p><a href="http://www.substanceofcode.com/wp-content/uploads/2010/07/Twim-v1.18.png" rel="lightbox[689]"><img class="alignnone size-full wp-image-697" title="Twim v1.18" src="http://www.substanceofcode.com/wp-content/uploads/2010/07/Twim-v1.18.png" alt="" width="237" height="316" /></a></p>
<p>When you post a new status from Twim you&#8217;ll see that the status was posted from <strong>TwimGo</strong> app. This is because there was already another app register with Twim name. I might do a MeeGo version of the app so then the new name matches the platform well :)</p>
<p>This version also has support for Twitter Lists.</p>
<p>You can download the latest version of Twim from these links:</p>
<ul>
<li><a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">Twim page</a> or directly from</li>
<li><a href="http://bit.ly/twim-jar" onclick="pageTracker._trackPageview('/outgoing/bit.ly/twim-jar?referer=');">http://bit.ly/twim-jar</a></li>
<li><a href="http://bit.ly/twim-jad" onclick="pageTracker._trackPageview('/outgoing/bit.ly/twim-jad?referer=');">http://bit.ly/twim-jad</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/07/27/twim-1-18-countdown-to-twitters-oauth-switch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twim with Posterous and Themes Support</title>
		<link>http://www.substanceofcode.com/2010/03/06/twim-with-posterous-and-themes-support/</link>
		<comments>http://www.substanceofcode.com/2010/03/06/twim-with-posterous-and-themes-support/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 11:29:45 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[posterous]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[twim]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=683</guid>
		<description><![CDATA[I&#8217;ve been coding few new features to Twim like Posterous integration. Now you can post your photos to Posterous and it publishes the status with link on your Twitter feed. Check out for example my Posterous site so you&#8217;ll see &#8230; <a href="http://www.substanceofcode.com/2010/03/06/twim-with-posterous-and-themes-support/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been coding few new features to <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">Twim</a> like <a href="http://posterous.com" onclick="pageTracker._trackPageview('/outgoing/posterous.com?referer=');">Posterous</a> integration. Now you can post your photos to Posterous and it publishes the status with link on your Twitter feed. Check out for example my Posterous <a href="http://tlaukkanen.posterous.com/" onclick="pageTracker._trackPageview('/outgoing/tlaukkanen.posterous.com/?referer=');">site</a> so you&#8217;ll see how easy it is to create awesome looking blog with their service.</p>
<p>New version also includes small themes feature so you can select from three themes: Default, Gray and Night. Gray theme is more traditional list style view to your Twitter feeds as shown here:</p>
<p><a title="IMG_6929 by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4410850288/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/tlaukkanen/4410850288/?referer=');"><img src="http://farm5.static.flickr.com/4065/4410850288_682f77c312.jpg" alt="IMG_6929" width="500" height="375" /></a></p>
<p>Download new version from <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">here</a> or use these shortcuts:</p>
<ul>
<li><a href="http://bit.ly/twim-jar" onclick="pageTracker._trackPageview('/outgoing/bit.ly/twim-jar?referer=');">http://bit.ly/twim-jar</a></li>
<li><a href="http://bit.ly/twim-jad" onclick="pageTracker._trackPageview('/outgoing/bit.ly/twim-jad?referer=');">http://bit.ly/twim-jad</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/03/06/twim-with-posterous-and-themes-support/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
