<?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>SwellJS - another big fish in the sea &#187; CDN</title>
	<atom:link href="http://blog.justswell.org/tag/cdn/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.justswell.org</link>
	<description>well-minded javascript library</description>
	<lastBuildDate>Fri, 20 Aug 2010 20:48:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Let&#8217;s start using Swell!</title>
		<link>http://blog.justswell.org/lets-start-using-swell/</link>
		<comments>http://blog.justswell.org/lets-start-using-swell/#comments</comments>
		<pubDate>Wed, 06 May 2009 19:11:13 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Swell]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[Swell Installation]]></category>

		<guid isPermaLink="false">http://blog.justswell.org/?p=206</guid>
		<description><![CDATA[If you&#8217;ve been following this blog (or are going to read some previous posts), you&#8217;ll most likely want to try out Swell for yourself. I posted a while ago about CDN technology allowing anyone to start using Swell while linking it on a Content Delivery Network, meaning visitors will always get the library from the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been following this blog (or are going to read some previous posts), you&#8217;ll most likely want to try out Swell for yourself.</p>
<p>I posted a while ago <a href="http://blog.justswell.org/empowering-swelljs-adopters-with-cdn-technology/" target="_self">about CDN technology</a> allowing anyone to start using Swell while linking it on a Content Delivery Network, meaning visitors will always get the library from the closest point, and as the first milestone has been reached, I guess it&#8217;s time to do a little introduction on the way <strong>you</strong> will be able to make Swell-enabled applications.</p>
<p>At first, you need to determine which component you need. If you try to implement one of the examples in previous or future posts, you can get this information from the code snippet itself.</p>
<p>In our case, let&#8217;s say we want to use <em>setStyle()</em> to change our page&#8217;s background color. We want it black, the reason is irrelevant.</p>
<p>This will get our background black:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>backgroundColor <span style="color: #339933;">:</span> <span style="color: #3366CC;">'#000'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As <em>setStyle()</em> is part of the <em>Core.Element</em> Swell library, we&#8217;ll need it, but also its dependencies. &#8220;Core.Element&#8221; requires &#8220;Core.Hashtable&#8221; which requires &#8220;Core.CustomEvent&#8221; which requires &#8220;Core.Core&#8221;, who are all requiring the &#8220;Swell&#8221; namespace itself.<br />
Dependencies are a pain, so we&#8217;ll just ignore them and include &#8220;Element&#8221; (<em>Core.Element</em>&#8216;s alias name). The server-side system will automatically include everything we need in a very convenient way.</p>
<p><a href="http://get.swl.fr/1.0/Element.js" target="_blank">http://get.swl.fr/1.0/Element.js</a></p>
<p>Yep, that&#8217;s all. With this URL, I&#8217;ll include the Element lib from Swell, with all its dependencies, from the &#8220;1.0&#8243; stable branch. If you feel adventurous, you can replace &#8220;1.0&#8243; with &#8220;trunk&#8221; and get bleeding edge code.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://get.swl.fr/1.0/Element.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
$(document.body).setStyle({backgroundColor : '#000'});
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Looks simple, try it too!</p>
<p>Finally, you might want to include more than one library. This is also possible, and is really easy. Let&#8217;s say we want Ajax and Event too, the URL would become: <a href="http://get.swl.fr/1.0/Element/Ajax/Event.js" target="_blank">http://get.swl.fr/1.0/Element/Ajax/Event.js</a>. The (obvious) goal is to include everything you need without including tons of different files.</p>
<p>Just a final note: using Swell only to change your page&#8217;s background color is called overkill. Try out the other examples on the blog and start building rich web applications!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justswell.org/lets-start-using-swell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Empowering SwellJS adopters with CDN technology</title>
		<link>http://blog.justswell.org/empowering-swelljs-adopters-with-cdn-technology/</link>
		<comments>http://blog.justswell.org/empowering-swelljs-adopters-with-cdn-technology/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 10:39:25 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Swell]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[Swell Installation]]></category>

		<guid isPermaLink="false">http://blog.justswell.org/?p=111</guid>
		<description><![CDATA[One of our objectives is to make usage of SwellJS easy in order to maximize its adoption. Usually one of the major drawbacks is the installation. Most software you want to use on your website will require you to download it, extract it, upload it, and keep it up to date. One of the best [...]]]></description>
			<content:encoded><![CDATA[<p>One of our objectives is to make usage of SwellJS easy in order to maximize its adoption. Usually one of the major drawbacks is the installation.<br />
Most software you want to use on your website will require you to download it, extract it, upload it, and keep it up to date.</p>
<p>One of the best ways we found on SwellJS to reduce installation hassle is to remove the installation process. We will instead provide the library via a CDN.</p>
<p>So, what will a &#8220;CDN&#8221; do, and how does it helps to avoid installation of the SwellJS library?</p>
<p><span id="more-111"></span>A Content Delivery Network (CDN) is an architecture designed to make content available to anyone as fast as possible. This means that someone accessing a file on a CDN from New York will get it from a server located in New York, while someone accessing the same file from Tōkyō will get it from a server located in Tōkyō.</p>
<p>This will allow us to provide SwellJS by directly hosting it ourselves, without having to worry about the fact that it might make websites hosted in other countries than our own slower. This also means that when you use SwellJS via this method, someone accessing your website from a different country will load the SwellJS library faster than your own website.</p>
<p>We also have plans to optimize lazy loading of SwellJS components, effectively reducing number of HTTP queries required to make a page work.</p>
<p>Finally, SwellJS assets will also be available via CDN, meaning that a full-swell website will usually be faster than the same hosted directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justswell.org/empowering-swelljs-adopters-with-cdn-technology/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

