<?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>Delivering Quality &#187; Cross Platform</title>
	<atom:link href="http://www.markdeepwell.com/tag/cross-platform/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markdeepwell.com</link>
	<description>A Software Developers View of the World</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:44:04 +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>Browser Notifications with Yip</title>
		<link>http://www.markdeepwell.com/2009/08/browser-notifications-with-yip/</link>
		<comments>http://www.markdeepwell.com/2009/08/browser-notifications-with-yip/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 02:51:35 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Cross Platform]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Firefox Extension]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[notifications]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=119</guid>
		<description><![CDATA[Add support for operating system notifications to your web application through a simple JavaScript API using Yip.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-121" title="Yip Icon" src="http://www.markdeepwell.com/wp-content/uploads/2009/08/yip-icon.jpg" alt="Yip Icon" width="197" height="205" /></p>
<p>Ever wanted your web application to be able to show notifications even if the user may be in another browser tab or application? Now you can!</p>
<p>The relatively new <a href="http://abcdefu.wordpress.com/2009/06/09/introducing-yip-an-unified-notification-system-for-the-web/">Yip  extension</a> for Firefox adds notification functionality. This is not a small JavaScript notification that pops up in the browser tab, but one that integrates directly with the users Operating System.</p>
<p>Yip uses <a href="http://www.markshuttleworth.com/archives/265">libnotify/notify-osd</a> on Ubuntu Linux, <a href="http://growl.info/">Growl</a> on Mac, and <a href="http://www.fullphat.net/">Snarl</a> or <a href="http://growlforwindows.com/gfw/">Growl for Windows</a> on Windows. If none of these notification applications are installed, it will use Firefox's simple and not as pretty  notification system. Ubuntu Linux users have notify-osd installed by default,  Growl is popular with Mac users, yet Windows users probably don't have  Snarl or Growler for Windows installed.</p>
<p>When building with notifications remember that they are meant to enhance the user experience, not require it.</p>
<p>The Yip extension supports both the Fluid and Prism APIs, but recommends Fluid because of support for an onclick callback function.</p>
<p>The API is simple and straight to the point:</p>
<div class="igBar"><span id="ljavascript-1"><a href="#" onclick="javascript:showPlainTxt('javascript-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-1">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">window.<span style="color: #006600;">fluid</span>.<span style="color: #006600;">showGrowlNotification</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; title: <span style="color: #3366CC;">"your notification title"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; description: <span style="color: #3366CC;">"some description"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; onclick: optionalCallbackFunction,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; icon: <span style="color: #3366CC;">"URL to an icon"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Since Yip may not be installed on the users computer, just wrap it with a check for fluid. A complete example looks like this:</p>
<div class="igBar"><span id="ljavascript-2"><a href="#" onclick="javascript:showPlainTxt('javascript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #66cc66;">&#40;</span>fluid<span style="color: #66cc66;">&#41;</span> !== <span style="color: #3366CC;">'undefined'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; window.<span style="color: #006600;">fluid</span>.<span style="color: #006600;">showGrowlNotification</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; title: <span style="color: #3366CC;">"Hello World"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; description: <span style="color: #3366CC;">"The Google icon says Hi"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; icon: <span style="color: #3366CC;">"http://www.google.com/favicon.ico"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>Related Projects</h3>
<ul>
<li><a href="http://digitarald.de/project/roar/">Roar</a>: Embed notifications into a web page (powered by MooTools).</li>
<li><a href="http://ajaxian.com/archives/growls-for-windows-and-a-web-notification-api">growl.js</a>: Windows only notifications using Growl for Windows.</li>
<li><a href="http://code.google.com/p/gears/wiki/NotificationAPI">NotificationAPI</a>: Notifications in Google Gears</li>
</ul>
<p>Of all these options, Yip is the best solution by far; its fully cross platform, has a simple to use API, and is ready to use. <a href="http://blog.abi.sh/yip-latest.xpi">Install Yip now</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/08/browser-notifications-with-yip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
