<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.developerfriendly.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>JavaScript</title>
 <link>http://www.developerfriendly.com/taxonomy/term/17</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en</language>
<item>
 <title>The ultimate embedded MP3 player: SoundManager 2 and hAudio</title>
 <link>http://www.developerfriendly.com/node/61</link>
 <description>&lt;p&gt;
Tonight I implemented &lt;a href=&quot;http://www.rotgutglory.com/node/42&quot;&gt;this MP3 player&lt;/a&gt; for my band&#039;s website using &lt;a href=&quot;http://schillmania.com/projects/soundmanager2/&quot;&gt;SoundManager 2&lt;/a&gt; and minimal support for the &lt;a href=&quot;http://microformats.org/wiki/haudio&quot;&gt;hAudio&lt;/a&gt; &lt;a href=&quot;http://microformats.org/&quot;&gt;Microformat.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I&#039;m rather pleased with the way that this turned out. Thanks to SoundManager 2 I have a nice playlist embedded directly in the semantic html on the page. Javascript catches clicks and hands off the URL to a hidden Flash object embedded on the page. 
It degrades gracefully: users without Javascript or Flash support will still be able to download the mp3 file since it&#039;s the target of a href link and the hAudio microformat should make it robot-friendly.
&lt;/p&gt;
&lt;p&gt;
Another benefit: &lt;a href=&quot;http://www.songbirdnest.com&quot;&gt;Songbird&lt;/a&gt; can see the mp3 files automatically populate it&#039;s web playlist.&lt;/p&gt;

&lt;p&gt;If you would like to implement something similar you can visit &lt;a href=&quot;http://www.rotgutglory.com/node/42&quot;&gt;this page&lt;/a&gt; and view the source, or check out the examples on the &lt;a href=&quot;http://schillmania.com/projects/soundmanager2/&quot;&gt;SoundManager 2 Project Page&lt;/a&gt;.
&lt;/p&gt;</description>
 <comments>http://www.developerfriendly.com/node/61#comments</comments>
 <category domain="http://www.developerfriendly.com/taxonomy/term/17">JavaScript</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/22">microformats</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/58">mp3</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/59">music</category>
 <pubDate>Sat, 31 May 2008 06:54:56 -0500</pubDate>
 <dc:creator>20after4</dc:creator>
 <guid isPermaLink="false">61 at http://www.developerfriendly.com</guid>
</item>
<item>
 <title>New Project: XULFolio</title>
 <link>http://www.developerfriendly.com/node/52</link>
 <description>This XULRunner-based application will be used for managing an online photography portfolio. 

&lt;h4&gt;Overview&lt;/h4&gt;

Currently supports &lt;a href=&quot;http://www.zenfolio.com/zf/tools/api.aspx&quot;&gt;Zenfolio&#039;s API&lt;/a&gt;. I may add Flickr and SmugMug support in the future, I am striving to keep the interfaces abstract so that it will be easy to plug in to other sites by writing a simple API Compatibility Layer.

&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Update:&lt;/strong&gt; SmugMug isn&#039;t allowing anyone to obtain an api key at this time. This puts them indefinitely out of consideration for this project. Also, Flickr could end up owned by Microsoft. I am strongly apposed to this acquisition and I do not intend to develop anything for a Microsoft-owned site. As long as this is a possibility, I won&#039;t be working on Flickr support.

&lt;h4&gt;Interesting Developments&lt;/h4&gt;

&lt;ul&gt;
 &lt;li&gt;I developed a simple JSON-RPC library in javascript which uses Mozilla&#039;s new &lt;a href=&quot;http://starkravingfinkle.org/blog/2008/02/extension-developers-native-json-parsing/&quot;&gt;native JSON support&lt;/a&gt;.
 &lt;/li&gt;
 &lt;li&gt;ZenFolio uses SHA-256 hashes for their challenge-response authentication scheme. This took quite a while to work out but once I figured out how to use &lt;a href=&quot;http://developer.mozilla.org/en/docs/nsICryptoHash&quot;&gt;nsICryptoHash&lt;/a&gt; then it all went pretty smoothly.
 &lt;/li&gt;
 &lt;li&gt;I created a &lt;a href=&quot;http://www.developerfriendly.com/files/CRYPTO.jsm&quot;&gt;CRYPTO.jsm&lt;/a&gt; module to wrap up the hash generation functionality. In the process I got to play with the awesome new &lt;a href=&quot;http://developer.mozilla.org/en/docs/Using_JavaScript_code_modules&quot;&gt;JavaScript code modules&lt;/a&gt; feature in XULRunner.  This is similar to creating an XPCOM singleton component, however, it&#039;s much easier to implement.
 &lt;/li&gt;
&lt;/ul&gt;

I will post up the code on SVN soon. I think that the &lt;a href=&quot;http://www.developerfriendly.com/files/CRYPTO.jsm&quot;&gt;CRYPTO.jsm&lt;/a&gt; and my simple &lt;a href=&quot;//www.developerfriendly.com/files/json-rpc.js.txt
&quot;&gt;JSON-RPC code&lt;/a&gt; might be useful to someone.</description>
 <comments>http://www.developerfriendly.com/node/52#comments</comments>
 <category domain="http://www.developerfriendly.com/taxonomy/term/17">JavaScript</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/49">json-rpc</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/51">xulfolio</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/8">XULRunner</category>
 <enclosure url="http://www.developerfriendly.com/files/CRYPTO.jsm" length="3078" type="application/octet-stream" />
 <pubDate>Mon, 18 Feb 2008 17:04:31 -0600</pubDate>
 <dc:creator>20after4</dc:creator>
 <guid isPermaLink="false">52 at http://www.developerfriendly.com</guid>
</item>
<item>
 <title>Writing desktop applications with XULRunner and EXT</title>
 <link>http://www.developerfriendly.com/node/31</link>
 <description>I have been experimenting with EXT JS in XULRunner. I&#039;m using it to build yet another photo upload application, similar to some Firefox extensions that you may have seen such as Fireuploader.  I don&#039;t have a lot of details to report, however, I really like using the EXT Javascript framework.  It&#039;s a bit complicated at first but the interfaces that it produces are really slick.

Once I have a working demo I plan to post it here as an example of what can be done with XULRunner and EXT. Stay tuned!</description>
 <comments>http://www.developerfriendly.com/node/31#comments</comments>
 <category domain="http://www.developerfriendly.com/taxonomy/term/27">extjs</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/17">JavaScript</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/28">RIA</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/8">XULRunner</category>
 <pubDate>Wed, 01 Aug 2007 07:55:04 -0500</pubDate>
 <dc:creator>20after4</dc:creator>
 <guid isPermaLink="false">31 at http://www.developerfriendly.com</guid>
</item>
<item>
 <title>Dragging widgets (Undecorated XUL windows)</title>
 <link>http://www.developerfriendly.com/node/28</link>
 <description>&lt;br/&gt;
The following is a simple bit of code that can make a borderless window dragable, currently tested only on Linux.
 
While this may not be needed in most X Windows Managers (due to alt-click dragability) it&#039;s still an important part of any desktop widget runtime. In WidgetRunner you can simply include this JavaScript file to provide the functionality automatically.
&lt;!--break--&gt;
&lt;code&gt;&lt;pre&gt;
/* widget.js - shared code used in all widgets.
*/

window.addEventListener(&quot;load&quot;, startup, false);
var widgetRunner= window.opener.widgetRinner;

function startup() {
	
	window.opener.widgetLoaded(window);
	if (loadWidget) {
		loadWidget();
	}


	var startPos=0;
	var mouseDown = function(event) {
		startPos = [ event.clientX, event.clientY];

	}
	
	var mouseMove = function(event) {
		if (startPos != 0) {
			var newX = event.screenX-startPos[0];
			var newY = event.screenY-startPos[1];
			window.moveTo(newX,newY);
		}
	}
	
	var mouseUp = function(event) {
		startPos=0;
	}

	window.addEventListener(&quot;mousedown&quot;,mouseDown, false);
	window.addEventListener(&quot;mouseup&quot;,mouseUp, false);
	window.addEventListener(&quot;mousemove&quot;,mouseMove, false);
}
&lt;/pre&gt;&lt;/code&gt;

I have published a stripped down version of this code as an example on the Mozilla Developer Connection wiki.  That document is here: &lt;a href=&quot;http://developer.mozilla.org/en/docs/Code_snippets:Windows#Draggable_windows&quot;&gt;Code_snippets:Windows#Draggable_windows&lt;/a&gt;</description>
 <comments>http://www.developerfriendly.com/node/28#comments</comments>
 <category domain="http://www.developerfriendly.com/taxonomy/term/17">JavaScript</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/1">mozpad</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/26">WidgetRunner</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/16">XUL</category>
 <pubDate>Mon, 30 Jul 2007 02:19:00 -0500</pubDate>
 <dc:creator>20after4</dc:creator>
 <guid isPermaLink="false">28 at http://www.developerfriendly.com</guid>
</item>
<item>
 <title>XHTML Applications and XULRunner</title>
 <link>http://www.developerfriendly.com/node/12</link>
 <description>&lt;p&gt;As much as I love XUL and the Mozilla platform, I would like to introduce a related topic that I think deserves a little bit of attention. Maybe everyone is aware of this already but I rarely see it mentioned so I would like to devote a few minutes to the topic of XHTML applications in XULRunner. It may not be completely obvious to everyone: XULRunner can do a lot more than XUL. Just about any technology which works on the web will work inside of XULRunner - you can develop applications that utilize HTML, JavaScript, SVG and even Flash (via the Flash Player plugin.)  Some developers may feel that XUL is superior HTML for user interface design, however, there are a lot more people who are familiar with HTML and JavaScript.&lt;/p&gt;


&lt;p&gt;In my opinion, XUL should not be terribly difficult for any web developer with strong HTML, CSS and JavaScript. On the other hand, it&#039;s not exactly easy for new developers to familiarize themselves with all of the terminology and unfamiliar technologies provided by the Mozilla platform. It took me at least 6 months of casual coding and experimentation before I was beginning to be comfortable and productive working with XUL and XPCOM.  The situation has improved since I first started coding Firefox extensions a little over one year ago; today the Mozilla Developer Center provides a lot of wonderful information to help newcomers familiarize themselves with the technology and become productive Mozilla developers. Even with great resources like &lt;a href=&quot;http://developer.mozilla.org&quot;&gt;MDC&lt;/a&gt;, it seems to me that Mozilla development can still be moderately intimidating for the uninitiated.&lt;/p&gt;

&lt;p&gt;There was a point to all of this rambling, I&#039;m sure of it. Oh yeah, XHTML Apps in XULRunner... I think that we should try to do whatever we can to make it very easy for web developers to write applications and deploy them into XULRunner packages. Developing web applications has never been easier than it is in 2007. There are many wonderful JavaScript libraries like jQuery, Prototype, YUI, Dojo and so many more. These tools, combined with HTML and CSS provide a framework for developing wonderfully rich applications. Compared to some other popular development environments, often web applications can be developed with less effort while having a lot more fun in the process.&lt;/p&gt;

&lt;p&gt;I am very excited about one recent development that could be very interesting to the masses of web developers out there, though I am unlikely to reach many of said developers with this blog. The recent development that has me excited is called &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/3002&quot; title=&quot;Plain Old Webserver&quot;&gt;POW&lt;/a&gt; and it started as a Firefox extension by &lt;a href=&quot;http://davidkellogg.com/blog/&quot;&gt;David Kellogg&lt;/a&gt;.&lt;/p&gt;

&lt;em&gt;From the description of POW:&lt;/em&gt;
&lt;blockquote&gt;Turn the web on its head with the Plain Old Webserver (POW), which adds a server to your browser. Information and a tutorial for POW can be found at this wiki http://davidkellogg.com/wiki/Main_Page&lt;/blockquote&gt;

&lt;p&gt;POW is a very POWerful piece of software. It&#039;s a lot more than just a simple http server application. POW harnesses the power of the Mozilla platform in a way that I have never seen done before and it could be a basis for a lot of new and interesting applications. It should be possible to develop almost any small-scale web application using plain old html and javascript and  deploy the application in unique ways with the help of POW and XULRunner. POW really blurs the line between client and server, making it possible to things like replacing server technologies such as PHP with &quot;server-side javascript.&quot; I could go on and on about the possibilities but I&#039;m not a wonderful writer; I would probably be boring my audience and that is assuming anyone even reads my blog.  If you made it this far, I highly recommend that you take a look at POW and start thinking about the implications of this innovative approach to application development. If you love JavaScript as much as I do you should be getting excited about POW and the Mozilla platform in general. Thanks to so many incredible people in this community, It&#039;s a great time to be developing applications on Mozilla technology.&lt;/p&gt;</description>
 <comments>http://www.developerfriendly.com/node/12#comments</comments>
 <category domain="http://www.developerfriendly.com/taxonomy/term/17">JavaScript</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/1">mozpad</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/15">webapps</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/16">XUL</category>
 <category domain="http://www.developerfriendly.com/taxonomy/term/8">XULRunner</category>
 <pubDate>Mon, 25 Jun 2007 05:05:16 -0500</pubDate>
 <dc:creator>20after4</dc:creator>
 <guid isPermaLink="false">12 at http://www.developerfriendly.com</guid>
</item>
</channel>
</rss>
