<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Webkit Developments</title>
	<atom:link href="http://davebalmer.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davebalmer.wordpress.com</link>
	<description>JavaScript for fun and profit with Dave Balmer</description>
	<lastBuildDate>Sat, 01 Jun 2013 05:04:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='davebalmer.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6bf3773adfb3646584a190bba2fac223?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Webkit Developments</title>
		<link>http://davebalmer.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://davebalmer.wordpress.com/osd.xml" title="Webkit Developments" />
	<atom:link rel='hub' href='http://davebalmer.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Leaving webOS, but not the Web</title>
		<link>http://davebalmer.wordpress.com/2012/06/17/leaving-webos-but-not-the-web/</link>
		<comments>http://davebalmer.wordpress.com/2012/06/17/leaving-webos-but-not-the-web/#comments</comments>
		<pubDate>Sun, 17 Jun 2012 09:22:07 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[webOS]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile space]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=141</guid>
		<description><![CDATA[While at Palm and HP, I made it my mission to evangelize HTML5 app development both inside and outside our company. The very core of the webOS value proposition was the web. In webOS, mobile websites, native and web-based apps lived together in a &#8220;zen-like&#8221; harmony. At least, that was the theory. In my two [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=141&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>While at Palm and HP, I made it my mission to evangelize HTML5 app development both inside and outside our company. The very core of the webOS value proposition was the web. In webOS, mobile websites, native and web-based apps lived together in a &#8220;zen-like&#8221; harmony.</p>
<p><strong>At least, that was the theory.</strong> In my two years there, I watched webOS slip from a leader in mobile web to a distant follower. I won&#8217;t elaborate much on the internal hows and whys (frankly, I doubt I even have the full story anyway), but the simple fact was I had a dramatic drop in confidence in our ability to stay relevant. All the drama in the news didn&#8217;t help, and neither did the mighty layoff hammer which eventually swung down on myself and more than half of the remaining staff.</p>
<p>I&#8217;ve had a couple months to relax, decompress, and recover from the rough ride. It&#8217;s given me time to reboot and explore the mobile space from a fresh perspective. A few things have stayed the same (I still think Android is doing it very wrong and iOS isn&#8217;t doing it very right), but a few new things presented themselves. Namely, there is another fish in the sea which has a much better shot of pushing out amazing, web-friendly devices&#8230;</p>
<p><strong>Monday is my first day at RIM.</strong> You know, the BlackBerry folks. Like Palm, RIM has received some negative press of late. Some layoffs and restructuring are looming, and some of the tech media are skeptical of RIM&#8217;s future. While some of that sounds familiar, <strong>here are just a few important differences to me</strong>:</p>
<p>1. While webOS fell behind the market leaders in HTML5 support, RIM has pushed forward. In fact, the early BlackBerry 10 (BB10) browser looks to be top dog. Today, <strong>HTML5 Test gives it a whopping score of 447</strong>. This is a higher score than iOS 5 (324), higher still than Android 4 (273), and even slightly higher than the top <em>desktop</em> browser score (Chrome Canary with 442). Source: <a title="The HTML5 Test" href="http://html5test.com/results/mobile.html" target="_blank">http://html5test.com/results/mobile.html</a></p>
<p>2. RIM gets that web developers can and should be <strong>equal citizens</strong> with native developers. For the past two years, they&#8217;ve been steadily moving towards complete system access parity between c/c++, Adobe Air, and Java (Android flavor). In other words, they support more tools for developers to make great apps than anyone else in the mobile space today.</p>
<p>3. As a user, <strong>BB10 itself is damn awesome</strong>. It has some of goodies I liked from webOS, iOS and even Win7; but all streamlined and more functional. Plus, there are even more unique features and slick interactions which help put it way over the top in my book&#8230;. <em>and it&#8217;s not even released yet</em>. I haven&#8217;t been this excited about a mobile platform in a long while, and judging from meeting a ton of other excited developers at a BlackBerry 10 Jam, I&#8217;m not the only one.</p>
<p>I&#8217;m joining the BlackBerry Developer Evangelist team, with pretty much the same mission: get web developers into making great mobile HTML5 stuff (apps or otherwise). Now that I think about it, there is one other similarity to my job at Palm: great people. Everyone I&#8217;ve met at RIM so far has been top notch. And while I&#8217;ll miss working with my former webOS Developer Relations teammates (except for <a title="Joshua Granick" href="http://www.joshuagranick.com/blog/" target="_blank">Joshua Granick</a>, who moved to RIM as well), I&#8217;ll still see you all at HTML5 conferences, mobile meetups and, of course, BlackBerry developer events (<em>c&#8217;mon, we all know you&#8217;re going to come and take a peek at BB10</em>).</p>
<p>In short: farewell webOS Nation, and hello CrackBerry!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=141&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2012/06/17/leaving-webos-but-not-the-web/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>
	</item>
		<item>
		<title>Urgent Call to Inaction from the W3C</title>
		<link>http://davebalmer.wordpress.com/2012/02/09/urgent-call-to-inaction-from-the-w3c/</link>
		<comments>http://davebalmer.wordpress.com/2012/02/09/urgent-call-to-inaction-from-the-w3c/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 11:39:56 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=130</guid>
		<description><![CDATA[Rarely do I find a need to call out the W3C folks (or anyone, for that matter), but the recent post by Daniel Glazman (@glazou), co-chair of the W3C CSS working group, pushed me over the edge. In his article, he calls for everyone to, get this, stop using -webkit in their sites. He equates [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=130&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Rarely do I find a need to call out the W3C folks (or anyone, for that matter), but the recent post by Daniel Glazman (@glazou), co-chair of the W3C CSS working group, pushed me over the edge.</p>
<p>In his article, he calls for everyone to, get this, <em>stop using -webkit in their sites</em>. He equates webkit, now a popular engine for most new mobile browsers, to IE6. Moreover, he calls it a &#8220;threat to the open web&#8221;.</p>
<p><em>Seriously?</em></p>
<p>This from the group responsible for years of delays in approving standards? Remember, these are the fine folks who for the past three years have cautioned web developers from using HTML5 (a term used a bit liberally to also include new CSS3, video, local storage, web sockets and other goodies) because they&#8217;re still working on drafts for it. Take the canvas tag, a webkit mainstay since 2005, which is still a W3C &#8220;working draft&#8221; &#8212; seven years later.</p>
<p>The only reason web developers are using these hot webkit (and gecko and now even internet explorer) features in the first place is we&#8217;re tired of waiting for this standards body to get off their collective ass and actually approve something.</p>
<p>Webkit is the new IE6? Really? If a vendor were to make a browser that only complied with approved W3C standards, you&#8217;d pretty much <em>have</em> IE6. So really, W3C itself is &#8220;the new IE6&#8243;.</p>
<p>For a representative of a non-profit organization to jump up and call for us to set our websites back 3-5 years is ridiculous. This is not a call to action, but a call for our inaction; to limit progress and the pursuit of competitive advantage in the name of some socialistic ideal created by a group who is even more monolithic in pace than in size. We&#8217;re talking a glacial, almost purposeful aim to slow innovation and plant a giant &#8220;STOP&#8221; sign in the evolution of the web.</p>
<p>In its glory, his article: <a title="CALL FOR ACTION: THE OPEN WEB NEEDS YOU *NOW*" href="http://www.glazman.org/weblog/dotclear/index.php?post/2012/02/09/CALL-FOR-ACTION%3A-THE-OPEN-WEB-NEEDS-YOU-NOW" target="_blank">CALL FOR ACTION: THE OPEN WEB NEEDS YOU *NOW*</a></p>
<p>Contrast this with the W3C&#8217;s hesitation to green light, well, pretty much anything cool to come along in web development in the past five years.</p>
<p>To Daniel Glazman, I propose you spend more time working with your group to approve specs and less time bickering and whining about webkit. The whole &#8220;problem&#8221; of browser vendors moving on without you starts with how the W3C works, and not with the vendors themselves. To try and shift the blame and rally people to a cause they don&#8217;t fully understand is irresponsible and reprehensible. I believe the industry term for his call to action is &#8220;a load of crap&#8221;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/130/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=130&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2012/02/09/urgent-call-to-inaction-from-the-w3c/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript Library vs. App Framework</title>
		<link>http://davebalmer.wordpress.com/2011/05/08/javascript_library_app_framework_microjs/</link>
		<comments>http://davebalmer.wordpress.com/2011/05/08/javascript_library_app_framework_microjs/#comments</comments>
		<pubDate>Mon, 09 May 2011 05:22:47 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Jo]]></category>
		<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=119</guid>
		<description><![CDATA[Really? There&#8217;s a fresh debate raging in the JavaScript community. The battle lines are drawn between those who like all-in-one solutions for app development, and those who prefer to assemble the pieces themselves. Really, the fight is more between those who make these things, not those who use them. A site for the little libraries [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=119&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2>Really?</h2>
<p>There&#8217;s a fresh debate raging in the JavaScript community. The battle lines are drawn between those who like all-in-one solutions for app development, and those who prefer to assemble the pieces themselves. Really, the fight is more between those who <strong>make</strong> these things, not those who use them.</p>
<p><a href="http://davebalmer.files.wordpress.com/2011/05/images.jpeg"><img class="size-full wp-image-123 aligncenter" title="Frameworks vs. Libraries" src="http://davebalmer.files.wordpress.com/2011/05/images.jpeg?w=460" alt=""   /></a></p>
<h1><span id="more-119"></span></h1>
<h2>A site for the little libraries</h2>
<p>The recent ugliness was sparked by <a href="http://microjs.com">microjs.com</a>, a small project which aims to list some of the more useful tiny (5K or less) code libraries out in the wild.</p>
<p>Then the flames started spewing over Twitter. The brunt of the griping was focused on @thomasfuchs (of script.aculo.us and zepto.js fame) and @ded (ender.js and about 100 other handy things). Arguments generally centered around the size limit (5K): &#8220;that&#8217;s so arbitrary, why can&#8217;t my lib get listed too&#8221; (generally followed by much wailing and gnashing of teeth).</p>
<p>Short answer: it&#8217;s their list. Hand picked from their own survey of useful-yet-small projects out there and from selecting submissions from library creators. I&#8217;m going to repeat that first part: <strong>it&#8217;s their list</strong>. It got attention, and those small-yet-useful libraries in there are going to get some exposure. Those of us with libraries or frameworks which are larger and lean towards providing a bigger bundle of useful things should chill (don&#8217;t make me name names, cause wow).</p>
<p>I have a couple things up on GitHub: <a href="http://github.com/davebalmer/jo">Jo</a> (~15K gzipped) and <a href="http://github.com/davebalmer/turtlewax">TurtleWax</a> (~0.7K gzipped). Guess which one got on the list? Yeah, the tiny, single-purpose library. Did I try to get Jo in there, even though it&#8217;s arguably the smallest of the mobile app frameworks out there? Hell no, it&#8217;s 10K over the limit.</p>
<h2>Both sides argue simplicity is a big part of their approach</h2>
<p>There are just differing ideas of &#8220;simple&#8221;.</p>
<p>Some developers prefer building things from scratch. I do, too; that&#8217;s why I often make my own libs, even for in-house projects. Most of these folks prefer the simplicity of a blank canvas on which to work, and will only occasionally use something small and useful written by someone else. They generally don&#8217;t want to have to learn a large framework, because it&#8217;s an added layer of complexity which could make their apps bigger, sluggish, and potentially more buggy than if they did it all themselves.</p>
<p>Other developers prefer to code less, or at least spend less time fiddling with things that in many cases should already be built into browser engines. The drive here is also simplicity, but from a time-to-market standpoint. The idea is, pick a framework which seems to do as much or more than you need, test it out a little, then ride that horse from then on. If there&#8217;s a bug in the framework, work around it; or better, fix it and contribute back to the project.</p>
<h2>My lib is smaller than your lib</h2>
<p>Does size matter? Actually, it kind of does. Generally, the smaller the file size, the easier the lib is to learn, and the less load time your app is going to have if you use it. Plus, the idea is your app will have just what you need to get the job done, and little else.</p>
<p>This idea can even spill over to the framework side of the equation. One of the hard requirements I have for Jo is to keep it under ~20K gzipped. Is that arbitrary? You bet. The thing is, setting a limit like that makes me a better product manager and a better coder. I&#8217;m mercilessly against feature creep and I work hard to keep cruft out of my codebase. Who benefits? The developers who use it (bless their coding fingers).</p>
<h2>The best approach&#8230;</h2>
<p>&#8230;is <strong>your</strong> approach. Look very closely at what&#8217;s out there, and go with what suits you and your project best. Every single lib out there will have bugs, or something extra you didn&#8217;t expect, or something that might take some getting used to. It&#8217;s all about finding things that are natural to your way of doing things.</p>
<p>Hell, there&#8217;s no reason you can&#8217;t dip from all ends of the code pool. You might even dig something frameworkish like Jo or Sencha Touch, and still have a yearning for some special feature or two. And hey, one of the little libraries listed in <a href="http://microjs.com">microjs</a> might fill that void.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=119&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2011/05/08/javascript_library_app_framework_microjs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>

		<media:content url="http://davebalmer.files.wordpress.com/2011/05/images.jpeg" medium="image">
			<media:title type="html">Frameworks vs. Libraries</media:title>
		</media:content>
	</item>
		<item>
		<title>Source code docs: down with javadoc, up with markdown!</title>
		<link>http://davebalmer.wordpress.com/2011/03/29/source-code-documentation-javadoc-vs-markdown/</link>
		<comments>http://davebalmer.wordpress.com/2011/03/29/source-code-documentation-javadoc-vs-markdown/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 06:35:32 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Jo]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[javadoc]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jsdoc]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[ruby-doc]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=101</guid>
		<description><![CDATA[Good documentation doesn&#8217;t come easy Documenting source code is rarely something a coder likes to do. I&#8217;m just as guilty as anyone else. I know it&#8217;s a &#8220;good thing&#8221;, but my natural inclination is to code first and document later. Sometimes later comes so late that it&#8217;s a chore to get it done. I&#8217;ve been [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=101&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2>Good documentation doesn&#8217;t come easy</h2>
<p>Documenting source code is rarely something a coder likes to do. I&#8217;m just as guilty as anyone else. I know it&#8217;s a &#8220;good thing&#8221;, but my natural inclination is to code first and document later. Sometimes later comes so late that it&#8217;s a chore to get it done. I&#8217;ve been forcing myself to document as I go, and it usually works out pretty well in the end.</p>
<h2>I&#8217;m a control freak</h2>
<p>What&#8217;s made this process easier for me is to <b>completely dump the notion of auto-generated documentation</b> (I&#8217;m looking at you, javadoc, jsdoc, yuidoc, ruby-doc and the like). Instead, I favor writing the documentation for a given piece of code with markdown.</p>
<h1><span id="more-101"></span></h1>
<p>It&#8217;s a tradeoff between automation and control, and when it comes to documentation, I prefer the control.</p>
<p>I can start by documenting only that which is important. That satisfies the &#8220;write this down before I forget&#8221; part of documentation, and frees me up to improve it in later drafts. Yes, drafts (like a real piece of writing). I don&#8217;t have any &#8220;empty stubs&#8221; made for me, so at any given moment my documentation is fairly complete without extra noise.</p>
<p>Later, sometimes much later, I can add more to the documentation, including example code and other goodies. This way the documentation matures along with the code, which can be pretty cool.</p>
<p>This is not a new idea by any means. Most perl developers have used pod, which has a very similar approach but with a slightly less human-readable plaintext markup (I&#8217;m a CPAN contributor from way back, I&#8217;m allowed to dis pod a little). In fact, this style of code documentation goes way-way back. Before source code documentation compilers existed; back when you actually read the documentation as you read the code.</p>
<p>Along my source code documentation journey, I checked out &#8220;natural docs&#8221;, which looked very appealing. I was disappointed that while flexible, it went down the path of regimented source documentation. Also, I found that I preferred the simplicity of a plaintext formatting language like markdown, without having to worry about adding section types and such to the documentation compiler.</p>
<p>So, what then?</p>
<h2>Enter jodoc</h2>
<p>Last Spring, I wrote a simple set of perl scripts which takes embedded markdown docs (along with raw HTML pages and other markdown documents) and turns them into a pretty useful set of HTML documentation. This tool is called &#8220;jodoc&#8221;, and was written to support my HTML framework (<a href="http://joapp.com/">Jo</a>). I&#8217;ve been using this plaintext approach to source doc writing ever since, and I love it.</p>
<p>Basically, it takes something like this (found in my source code):</p>
<p><a href="http://davebalmer.files.wordpress.com/2011/03/joyql-source.jpg"><img src="http://davebalmer.files.wordpress.com/2011/03/joyql-source.jpg?w=283&#038;h=300" alt="" title="joYQL markdown documentation from source" width="283" height="300" class="alignnone size-medium wp-image-106" /></a></p>
<p>And spits out HTML which looks like this:</p>
<p><a href="http://joapp.com/docs/#joYQL"><img src="http://davebalmer.files.wordpress.com/2011/03/jo-html5-mobile-app-framework-documentaion.jpg?w=275&#038;h=300" alt="" title="jodoc example: joYQL" width="275" height="300" class="alignnone size-medium wp-image-104" /></a></p>
<h2>A couple examples</h2>
<p>The first is the documentation for Jo itself, turned into one easily-searchable, cross-linked and PDFable single page of HTML: <a href="http://joapp.com/docs/">http://joapp.com/docs/</a>.</p>
<p>The second is the documentation for PhoneGap, which is split into easily-grokkable and book-markable sections (with some nice CSS at work as well): <a href="http://docs.phonegap.com/">http://docs.phonegap.com/</a>.</p>
<h2>The concept is simple</h2>
<p>jodoc looks for markdown documentation in your code (it can be in one continuous block, or split into sequential pieces, your call). Then it assembles it into the structure you want, puts it into a single file, or adds a customizable table of contents (also defined with markdown) and splits your documentation into separate HTML files. For a final touch, it takes anything you&#8217;ve marked (using markdown, of course) as a main header (i.e. H1) and turns it into a fully-linked and indexed keyword. This means when you casually discuss a class or some term you&#8217;ve documented elsewhere, jodoc will make a link for you (think &#8220;wiki&#8221;, but without TheCaps).</p>
<p>It&#8217;s a simple idea, and folds nicely with doc files which live outside your code (either markdown or HTML, currently). We&#8217;re already working on some neat extensions, but since it&#8217;s open source, we&#8217;d love to see more contributions.</p>
<h2>Give it a try</h2>
<p>Dan Freedman, a friend and fellow HP engineer, took my crude perl script and banged it into shape. The result of which can be seen on GitHub, along with a new node.js version that&#8217;s already underway (go Dan!).</p>
<p>Perl: <a href="https://github.com/davebalmer/joDoc">https://github.com/davebalmer/joDoc</a></p>
<p>Node.js: <a href="https://github.com/azakus/jodoc-js">https://github.com/azakus/jodoc-js</a></p>
<p>If you&#8217;re dead-set on javadoc-style documentation, that&#8217;s fine. I&#8217;d invite you to give this sort of approach a try. Really: a serious try on your next hunk of code. You might find that you&#8217;re actually doing less work and getting better documentation for the effort.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=101&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2011/03/29/source-code-documentation-javadoc-vs-markdown/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>

		<media:content url="http://davebalmer.files.wordpress.com/2011/03/joyql-source.jpg?w=283" medium="image">
			<media:title type="html">joYQL markdown documentation from source</media:title>
		</media:content>

		<media:content url="http://davebalmer.files.wordpress.com/2011/03/jo-html5-mobile-app-framework-documentaion.jpg?w=275" medium="image">
			<media:title type="html">jodoc example: joYQL</media:title>
		</media:content>
	</item>
		<item>
		<title>Turtle Wax: LOGO-style graphics re-imagined for JavaScript and HTML5 Canvas</title>
		<link>http://davebalmer.wordpress.com/2011/01/03/turtle-wax-logo-style-graphics-re-imagined-for-javascript-and-html5-canvas/</link>
		<comments>http://davebalmer.wordpress.com/2011/01/03/turtle-wax-logo-style-graphics-re-imagined-for-javascript-and-html5-canvas/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 21:28:10 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[LOGO]]></category>
		<category><![CDATA[Turtle]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=89</guid>
		<description><![CDATA[I was feeling nostalgic over the holidays, and extolling the virtues of one of the first languages I enjoyed as a kid: LOGO. Then I dug back into the syntax of LOGO. Compared to modern programming languages, words like &#8220;terse&#8221; and &#8220;arcane&#8221; spring to mind. I decided I wasn&#8217;t that nostalgic after all, but I [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=89&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I was feeling nostalgic over the holidays, and extolling the virtues of one of the first languages I enjoyed as a kid: <a href="http://en.wikipedia.org/wiki/Logo_(programming_language)">LOGO</a>. Then I dug back into the syntax of LOGO. Compared to modern programming languages, words like &#8220;terse&#8221; and &#8220;arcane&#8221; spring to mind.</p>
<p>I decided I wasn&#8217;t that nostalgic after all, but I did want to bring some of the cool graphics capabilities of that venerable language to JavaScript. Instead of making a LOGO interpreter in JavaScript (it&#8217;s been done), I made a small API to achieve turtle graphics in a more familiar setting.</p>
<p>Check out a couple code demos (view source):</p>
<ul>
<li><a href="http://www.grrok.com/turtle/">Spirograph-inspired designs</a></li>
<li><a href="http://www.grrok.com/turtle/fractal.html">Fractal trees translated from a LOGO example</a></li>
</ul>
<p><a href="http://www.grrok.com/turtle/"><img src="http://davebalmer.files.wordpress.com/2011/01/spiro.png?w=300&#038;h=187" alt="" title="Spirograph-influenced designs" width="300" height="187" class="size-medium wp-image-92" /></a></p>
<p><a href="http://www.grrok.com/turtle/fractal.html"><img src="http://davebalmer.files.wordpress.com/2011/01/fractals.png?w=300&#038;h=221" alt="" title="Fractal trees" width="300" height="221" class="size-medium wp-image-93" /></a></p>
<p>The API attaches itself to a canvas tag, and supports chaining. I also decided to add some convenient methods for more traditional cartesian and polar coordinate systems.</p>
<p>More info can be found at the <a href="http://github.com/davebalmer/turtlewax">project page on GitHub</a>. The open source project is in its early stages, but it&#8217;s already fun and potentially useful. Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=89&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2011/01/03/turtle-wax-logo-style-graphics-re-imagined-for-javascript-and-html5-canvas/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>

		<media:content url="http://davebalmer.files.wordpress.com/2011/01/spiro.png?w=300" medium="image">
			<media:title type="html">Spirograph-influenced designs</media:title>
		</media:content>

		<media:content url="http://davebalmer.files.wordpress.com/2011/01/fractals.png?w=300" medium="image">
			<media:title type="html">Fractal trees</media:title>
		</media:content>
	</item>
		<item>
		<title>Adventures with Microsoft&#8217;s IE9 Preview</title>
		<link>http://davebalmer.wordpress.com/2010/10/30/adventures-with-microsofts-ie9-preview/</link>
		<comments>http://davebalmer.wordpress.com/2010/10/30/adventures-with-microsofts-ie9-preview/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 10:46:16 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=83</guid>
		<description><![CDATA[Ok, I&#8217;ve been keeping an eye on this, and with the recent preview 6, there are still some big missing pieces in their CSS3 support: CSS3 gradients Flexible box model Text shadow Plus, on the JavaScript side, I have yet to be able to get any CSS transforms working, though the way to detect them [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=83&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Ok, I&#8217;ve been keeping an eye on this, and with the recent preview 6, there are still some big missing pieces in their CSS3 support:</p>
<ul>
<li>CSS3 gradients</li>
<li>Flexible box model</li>
<li>Text shadow</li>
</ul>
<p>Plus, on the JavaScript side, I have yet to be able to get any CSS transforms working, though the way to detect them seems to be:</p>
<p><code>
<pre>
if (document.body.style.msTransform !== 'undefined')
    alert("IE9!");
</pre>
<p></code></p>
<p>In short, it seems to have relative parity with Opera 10 as far as cool-yet-useful CSS3 features. Keep going, Microsoft, I&#8217;m totally cheering for you!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=83&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2010/10/30/adventures-with-microsofts-ie9-preview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>
	</item>
		<item>
		<title>Tip: faster mousemove events in webOS 1.4.5</title>
		<link>http://davebalmer.wordpress.com/2010/10/08/tip-faster-mousemove-events-in-webos/</link>
		<comments>http://davebalmer.wordpress.com/2010/10/08/tip-faster-mousemove-events-in-webos/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 10:03:13 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Trickery]]></category>
		<category><![CDATA[webOS]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=79</guid>
		<description><![CDATA[Mouse (touch) events not firing enough for your JavaScript-based drawing app? Things dragging slowly on the screen? Give this technique a try.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=79&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><b>Warning: this is a short-term solution, it may cause interesting results in future versions of the webOS SDK, so use wisely.</b></p>
<p>One minor frustration I&#8217;ve run into with making JavaScript webOS apps (games in particular) is the mousemove events don&#8217;t seem to fire very often on custom controls. This is particularly noticeable when users finger-paint on canvas tags or drag elements around. I suspect that this quirk in the webOS webkit was introduced as a performance improvement, but running up against it can be painful.</p>
<p>A fix I&#8217;ve discovered is this simple CSS addition to any elements which need higher resolution mouse movement (er, touch movement, whichever):</p>
<pre>myelement {
    -webkit-user-drag: element;
}</pre>
<p>Just put any valid CSS selector in place of &#8220;myelement&#8221; above, and you should notice a marked improvement in mouse movement precision for the element(s) in question.</p>
<p>This is not a future-proof solution, because if Palm&#8217;s webkit properly supports this CSS property in the future, your users will be dragging a shadowed version of the control around in ways you probably don&#8217;t want. Please be sure and test this with new SDK versions and be ready to take it out of your app at some point.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=79&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2010/10/08/tip-faster-mousemove-events-in-webos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>
	</item>
		<item>
		<title>Jo cross-platform demo screencast up on YouTube</title>
		<link>http://davebalmer.wordpress.com/2010/10/06/jo-cross-platform-demo-screencast-up-on-youtube/</link>
		<comments>http://davebalmer.wordpress.com/2010/10/06/jo-cross-platform-demo-screencast-up-on-youtube/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 16:44:21 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Jo]]></category>
		<category><![CDATA[webOS]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=74</guid>
		<description><![CDATA[This screencast is a quick intro to the cross-platform capabilities of this JavaScript framework.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=74&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='460' height='289' src='http://www.youtube.com/embed/wOjfKA23Of8?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>Twelve minutes of Jo, showing the same JavaScript web app code running on webOS, iPhone, iPad, Android, Symbian and&#8230; Dashboard widgets? Yup. First in a series of videos, this screencast is a quick intro to the cross-platform capabilities of this JavaScript framework (both for mobile apps with PhoneGap and mobile web apps). Followup videos will cover making your first Jo app, getting it running with PhoneGap, theming it with CSS and other goodies. Enjoy!</p>
<p>You can also read more about this open source project at <a href="http://joapp.com" target="_blank">joapp.com</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=74&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2010/10/06/jo-cross-platform-demo-screencast-up-on-youtube/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>
	</item>
		<item>
		<title>Jo and webOS part 2: window orientation and full screen</title>
		<link>http://davebalmer.wordpress.com/2010/09/08/jo-and-webos-part-2-window-orientation-and-full-screen/</link>
		<comments>http://davebalmer.wordpress.com/2010/09/08/jo-and-webos-part-2-window-orientation-and-full-screen/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 14:34:51 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Jo]]></category>
		<category><![CDATA[Trickery]]></category>
		<category><![CDATA[webOS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mojo]]></category>
		<category><![CDATA[Palm]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=61</guid>
		<description><![CDATA[The last post revealed how a simple call to PalmSystem from your JavaScript code opens the door for you to take a stock web app with your favorite framework and turn it into a simple webOS app without having the overhead (or the wealth of cool features, in the interest of fairness) of Mojo. Continuing [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=61&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The last post revealed how a simple call to PalmSystem from your JavaScript code opens the door for you to take a stock web app with your favorite framework and turn it into a simple webOS app without having the overhead (or the wealth of cool features, in the interest of fairness) of Mojo.</p>
<p>Continuing with my explorations in the webOS 1.4.5 SDK, I&#8217;ve picked out a couple of other useful calls to the PalmSystem object. Both can be added to the &#8220;hello world&#8221; example I started in part one, and they&#8217;re really quick.</p>
<h3>Free-wheeling orientation</h3>
<p>A common requirement for mobile apps is the ability to respond to device orientation. I&#8217;m still digging around to see where you can hook into these events, but in the meantime here&#8217;s a simple call which is quite useful:</p>
<pre><code>window.PalmSystem.setWindowOrientation('free');</code></pre>
<p>This tells webOS to let your app rotate along with the device orientation, switching from portrait to landscape as necessary. It&#8217;s a high-value one-liner call which should serve most orientation needs.</p>
<p>You can also specify a &#8220;locked&#8221; orientation with different strings in place of &#8220;free&#8221;. Options are: up (default portrait), down, left and right. So if you have a side-scroller game that would benefit from horizontal presentation, just use:</p>
<h1><span id="more-61"></span></h1>
<pre><code>window.PalmSystem.setWindowOrientation('left');</code></pre>
<p>Pretty cool, and definitely useful in our quest to turn web apps into webOS apps without having to load Mojo.</p>
<h3>Full screen mode</h3>
<p>Speaking of games, sometimes you want all the screen real-estate you can get, and those extra 30px or so which have your app menu, current time, battery and signal strength look mighty delicious. Here&#8217;s how to toggle that on or off, revealing a full empty screen to create your masterpiece:</p>
<pre><code>window.PalmSystem.enableFullScreenMode(true);</code></pre>
<p>Toggle the full screen mode by passing in either true or false.</p>
<h3>A word of caution</h3>
<p>Keep in mind that there is a reason Palm abstracts this stuff into the Mojo SDK, and there is no guarantee (yet) of how long these calls will be around. It&#8217;s always best to keep a close eye on the <a href="http://developer.palm.com">Palm Developer Forums</a> and test your apps extensively with any upcoming version of webOS.</p>
<h3>Next steps</h3>
<p>I want to get a working example of a low-level webOS service request. This interface allows you to get to important system calls to dial a phone number, get your GPS location, launch another app and other neat stuff.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=61&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2010/09/08/jo-and-webos-part-2-window-orientation-and-full-screen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>
	</item>
		<item>
		<title>Jo and webOS: bypassing Mojo</title>
		<link>http://davebalmer.wordpress.com/2010/09/04/jo-and-webos-bypassing-mojo/</link>
		<comments>http://davebalmer.wordpress.com/2010/09/04/jo-and-webos-bypassing-mojo/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 03:34:18 +0000</pubDate>
		<dc:creator>Dave Balmer</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Jo]]></category>
		<category><![CDATA[Trickery]]></category>
		<category><![CDATA[webOS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mojo]]></category>
		<category><![CDATA[Palm]]></category>

		<guid isPermaLink="false">http://davebalmer.wordpress.com/?p=46</guid>
		<description><![CDATA[One neat discovery I found in the webOS 1.4.5 SDK is that it is possible to have a simple app which doesn't use Mojo. Why would you want to? Load time! Mojo brings a lot to the table, but if you want to use your own favorite JavaScript framework, much of that ends up being overhead and increases your app's load time.

<h3>Step one: Make a web app and test it in Chrome or Safari.</h3>

<p><pre>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&#62;
&#60;html lang="en"&#62;
&#60;head&#62;
    &#60;title&#62;Hello&#60;/title&#62;
    &#60;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&#62;
&#60;/head&#62;
&#60;body&#62;
    &#60;h1&#62;Hello World!&#60;/h1&#62;
&#60;/body&#62;
&#60;/html&#62;</pre></p>

<p>Save this into a new folder (using a folder name of "hello" in this example) as index.html. This will become your app folder. You can test your app in Chrome or Safari by simply opening this file in your browser. Not terribly impressive, but hey, it's a start.</p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=46&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>One neat discovery I found in the webOS 1.4.5 SDK is that it is possible to have a simple app which doesn&#8217;t use Mojo. Why would you want to? Load time! Mojo brings a lot to the table, but if you want to use your own favorite JavaScript framework, much of that ends up being overhead and increases your app&#8217;s load time.</p>
<h3>Step one: Make a web app and test it in Chrome or Safari.</h3>
<p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;title&gt;Hello&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Hello World!&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</p>
<p>Save this into a new folder (using a folder name of &#8220;hello&#8221; in this example) as index.html. This will become your app folder. You can test your app in Chrome or Safari by simply opening this file in your browser. Not terribly impressive, but hey, it&#8217;s a start.</p>
<h1><span id="more-46"></span></h1>
<h3>Step two: Add a file to turn your folder into an app.</h3>
<p>
<pre>{
    "id":"com.yourdomain.hello",
    "version":"0.0.1",
    "vendor":"Your Company",
    "type":"web",
    "main":"index.html",
    "title":"Hello"
}</pre>
</p>
<p>Save this off as appinfo.json in your application folder. You can test this app real fast in webOS. Just pull up your emulator, then open a command line prompt and do this:</p>
<p>
<pre>palm-package hello
palm-install com.yourdomain.hello_0.0.1_all.ipk</pre>
</p>
<p>Then go to your emulator and pull it up. And&#8230; nothing happens. You get a blank card and a loading spinner. Hypnotic, but certainly not what we intended. We&#8217;re missing something, and luckily it&#8217;s not much of a something.</p>
<h3>Step three: Add this tiny chunk of JavaScript near the top:</h3>
<p>
<pre>if (window.PalmSystem) PalmSystem.stageReady();</pre>
</p>
<p>This tells webOS that you are ready to present your app to the user. It exists to give you a chance to preload whatever you need (usually your JavaScript libraries and some app initialization) so your users don&#8217;t see things flying around the screen as you load them.</p>
<p>Add that line of code, so now your index.html should look like this:</p>
<p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;title&gt;Hello&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;script&gt;
        if (window.PalmSystem)
            window.PalmSystem.stageReady();
    &lt;/script&gt;
    &lt;h1&gt;Hello World!&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</p>
<p>Now when you palm-package and palm-install (as above) and then run your app, instead of a card floating there with a loading spinner, you get your app!</p>
<h3>Moving forward</h3>
<p>From here, you can add your favorite JavaScript library (some work better on mobile devices than others), and make a proper app.</p>
<p>This is exciting stuff for cross platform mobile development. I&#8217;ll be working closely with Palm engineering to see what other gems we can expose, so stay tuned!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davebalmer.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davebalmer.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davebalmer.wordpress.com&#038;blog=13241040&#038;post=46&#038;subd=davebalmer&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davebalmer.wordpress.com/2010/09/04/jo-and-webos-bypassing-mojo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c4962c3cfb03eb04053ce9b1d9835860?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davebalmer</media:title>
		</media:content>
	</item>
	</channel>
</rss>
