<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.1.2" -->
<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/"
	>

<channel>
	<title>A Trifle Absurd</title>
	<link>http://www.matthewmorgan.net/blog</link>
	<description>Matthew Morgan's software notions</description>
	<pubDate>Wed, 14 Mar 2007 04:51:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>
	<language>en</language>
			<item>
		<title>It was inevitable, I suppose&#8230;</title>
		<link>http://www.matthewmorgan.net/blog/archives/2005/06/15/it-was-inevitable-i-suppose</link>
		<comments>http://www.matthewmorgan.net/blog/archives/2005/06/15/it-was-inevitable-i-suppose#comments</comments>
		<pubDate>Thu, 16 Jun 2005 02:21:53 +0000</pubDate>
		<dc:creator>Matthew Morgan</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.matthewmorgan.net/blog/?p=132</guid>
		<description><![CDATA[Someone&#8217;s gone and implemented a simple Unix-like system&#8212;wait for it&#8212;in JavaScript.  The coolest (and/or most disturbing) part is the working implementation of vi.
Makes me think we need a new instance of Zawinski&#8217;s Law for software platforms, something like: &#8220;Every platform attempts to expand until it can run Unix&#8230;&#8221;
]]></description>
			<content:encoded><![CDATA[<p>Someone&#8217;s gone and implemented a simple <a href="http://www.masswerk.at/jsuix/">Unix-like system</a>&#8212;wait for it&#8212;in JavaScript.  The coolest (and/or most disturbing) part is the working implementation of vi.</p>
<p>Makes me think we need a new instance of <a href="http://www.catb.org/~esr/jargon/html/Z/Zawinskis-Law.html">Zawinski&#8217;s Law</a> for software platforms, something like: &#8220;Every platform attempts to expand until it can run Unix&#8230;&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewmorgan.net/blog/archives/2005/06/15/it-was-inevitable-i-suppose/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Without the X</title>
		<link>http://www.matthewmorgan.net/blog/archives/2005/03/24/without-the-x</link>
		<comments>http://www.matthewmorgan.net/blog/archives/2005/03/24/without-the-x#comments</comments>
		<pubDate>Fri, 25 Mar 2005 03:18:22 +0000</pubDate>
		<dc:creator>Matthew Morgan</dc:creator>
		
		<category><![CDATA[Trifle]]></category>

		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.matthewmorgan.net/blog/archives/2005/03/24/without-the-x</guid>
		<description><![CDATA[The &#8220;Ajax&#8221; moniker seems to be catching hold, and I don&#8217;t mind too much&#8212;it&#8217;s nice to have a name for it.  As others have already pointed out, though, the &#8220;X&#8221; (for XML) is a misnomer.  Many Ajax applications (e.g. GMail) don&#8217;t use XML for their back channel.  If you send data as [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8220;Ajax&#8221; moniker seems to be catching hold, and I don&#8217;t mind too much&#8212;it&#8217;s nice to have a name for it.  As others have already pointed out, though, the &#8220;X&#8221; (for XML) is a misnomer.  Many Ajax applications (e.g. GMail) don&#8217;t use XML for their back channel.  If you send data as JavaScript, then a simple eval() does all the parsing work on the receiving side.</p>
<p>I&#8217;ve bootstrapped Trifle as a simple read-only tagbase browser.  The client receives data as JavaScript, which works great.  Now I need to handle the other direction: JavaScript code posting updates to the server.  But whatever code is running on the server, it probably won&#8217;t be JavaScript, so sending data in JavaScript form is pointless.</p>
<p>I could try to get sneaky and take advantage of the extreme similarity of JavaScript and Python data notation: lists, dictionaries, strings, and numbers have almost identical syntax.  That would inevitably bite back, though, especially the &#8220;almost&#8221;.</p>
<p>So what other format would be easy for JavaScript to generate and for your average text-munging language to parse?  Yes, there&#8217;s XML, but the DOM (for generating it) isn&#8217;t what I&#8217;d call convenient.  Maybe a simple line-based text format will fit the bill.  A general &#8220;verb url data&#8221; syntax could cover everything I need.</p>
<p>And no, it&#8217;s not like I&#8217;m abandoning XML.  I&#8217;ll eventually extend the server side of Trifle to accept and generate XML, so that it plays well with others.  For direct server-to-JavaScript-client communication, though, XML doesn&#8217;t cut it in this case.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewmorgan.net/blog/archives/2005/03/24/without-the-x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bookmarkability</title>
		<link>http://www.matthewmorgan.net/blog/archives/2005/03/16/bookmarkability</link>
		<comments>http://www.matthewmorgan.net/blog/archives/2005/03/16/bookmarkability#comments</comments>
		<pubDate>Wed, 16 Mar 2005 22:55:22 +0000</pubDate>
		<dc:creator>Matthew Morgan</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.matthewmorgan.net/blog/archives/2005/03/16/bookmarkability</guid>
		<description><![CDATA[Modern-day web applications are hard to make bookmarkable.  If you&#8217;re using script trickery behind the scenes to get new data without reloading the page, the page updates&#8212;but the address bar doesn&#8217;t.  Bookmarking the &#8216;new&#8217; page will grab the address of the old page instead.
Some apps, like GMail, just ignore the problem, and thus [...]]]></description>
			<content:encoded><![CDATA[<p>Modern-day web applications are hard to make bookmarkable.  If you&#8217;re using script trickery behind the scenes to get new data without reloading the page, the page updates&#8212;but the address bar doesn&#8217;t.  Bookmarking the &#8216;new&#8217; page will grab the address of the old page instead.</p>
<p>Some apps, like GMail, just ignore the problem, and thus prevent deep linking.  Google Maps uses a workaround: a link on the page itself that gives you a bookmarkable version of the current page.  But can we do better?</p>
<p>There is a way to change the URL in the address bar without causing a reload: just set location.hash.  The value is tacked on to the displayed URL (plus a &#8216;#&#8217;, of course), and gets saved in bookmarks.  When a bookmark is used, that part of the URL isn&#8217;t sent to the server, but we&#8217;re assuming a script-heavy web application anyway: just check for the location.hash value in an onload handler.</p>
<p>There&#8217;s a snag, though.  If the user is already at &#8220;http://your/url/#foo&#8221; and navigates to &#8220;http://your/url/#bar&#8221; (via another bookmark, for instance), the browser won&#8217;t tell you about the change.  Other than fantasizing about an onhashchange event, there&#8217;s not much you can do about it.  Well, you can use setInterval() to poll location.hash for changes, but you&#8217;re stuck between having a long gap between checks&#8212;and therefore slow update performance&#8212;or slowing things down with frequent checks.</p>
<p>So is there no good solution for web-app bookmarkability?  Not that I&#8217;ve found.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewmorgan.net/blog/archives/2005/03/16/bookmarkability/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Open-Source JavaScript</title>
		<link>http://www.matthewmorgan.net/blog/archives/2005/03/07/open-source-javascript</link>
		<comments>http://www.matthewmorgan.net/blog/archives/2005/03/07/open-source-javascript#comments</comments>
		<pubDate>Tue, 08 Mar 2005 01:46:36 +0000</pubDate>
		<dc:creator>Matthew Morgan</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.matthewmorgan.net/blog/archives/2005/03/07/open-source-javascript</guid>
		<description><![CDATA[A DHTML application&#8217;s source code is immediately visible to anyone who cares to look.  You can keep it proprietary, but you can&#8217;t keep it secret.  So why have there been so few open-source JavaScript libraries?  Up till now, few apps have had a large enough chunk of code in JavaScript to justify [...]]]></description>
			<content:encoded><![CDATA[<p>A DHTML application&#8217;s source code is immediately visible to anyone who cares to look.  You can keep it proprietary, but you can&#8217;t keep it secret.  So why have there been so few open-source JavaScript libraries?  Up till now, few apps have had a large enough chunk of code in JavaScript to justify splitting something out as a library.  But as interest grows in rich JavaScript-based applications (a.k.a. Ajax, a name I&#8217;m not too fond of) and the average code size grows, we should see more libraries.</p>
<p><a href="http://trimpath.com/project/">TrimPath</a> is a relatively new umbrella project for just that.  It currently houses three projects: a client-side templating library, a <acronym title="Domain-Specific Language">DSL</acronym> for SQL-esque queries, and a spreadsheet engine.  Steve Yen is the instigator and author of these projects; he has a <a href="http://trimpath.com/blog/">blog</a> on the TrimPath site.</p>
<p>Good stuff, and we need more of it.  Which, in the open-source world, means that <em>I</em> should be doing more of it.  Okay, I&#8217;m off to program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewmorgan.net/blog/archives/2005/03/07/open-source-javascript/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
