<?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>Chris Norton &#187; jquery</title>
	<atom:link href="http://www.chnorton.com.au/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chnorton.com.au</link>
	<description>A blog about software engineering, web development, education and my otaku interests.</description>
	<lastBuildDate>Tue, 07 Dec 2010 11:45:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Adventures with ExtJS and jQuery</title>
		<link>http://www.chnorton.com.au/2008/01/31/adventures-with-extjs-and-jquery/</link>
		<comments>http://www.chnorton.com.au/2008/01/31/adventures-with-extjs-and-jquery/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 06:52:06 +0000</pubDate>
		<dc:creator>Chris Norton</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.chnorton.com.au/2008/01/31/adventures-with-extjs-and-jquery/</guid>
		<description><![CDATA[I have recently been doing quite a bit of development with both ExtJS and jQuery and I thought I would share my experiences with both of them. One thing to keep in mind is that I&#8217;m not going to say whether one is really good or bad &#8211; they&#8217;re both excellent libraries and your choice [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently been doing quite a bit of development with both ExtJS and jQuery and I thought I would share my experiences with both of them. One thing to keep in mind is that I&#8217;m not going to say whether one is really good or bad &#8211; they&#8217;re both excellent libraries and your choice for any given project might simply come down to personal preference. That said, the rest of this will be my opinion on the two.</p>
<p><span id="more-205"></span>First of all, Ext really is just freaking <em>massive</em>. Although jQuery isn&#8217;t exactly minuscule it&#8217;s still a hell of a lot smaller than Ext. Loading my Ext application, even on a local connection, takes quite a while and freezes the browser while all that code is processed. Admittedly this is more to do with my browser being slow as a dog than with any inherent flaw in Ext. Still, if you want to have a lightweight site Ext is pretty much immediately out of the running.</p>
<p>One thing that I initially loved about Ext, that I am now starting to loath, is that it tries to be too much like Java or some other desktop programming language/library. Basically you can (and probably should) build the entire interface through JavaScript calls rather than use HTML and CSS. The problem with this is that, at the end of the day, it&#8217;s <strong>not</strong> Java and Ext just ends up doing fancy <abbr title="Document Object Model">DOM</abbr> manipulations anyway (for the layouts anyway) so all it&#8217;s really doing is obfuscating what&#8217;s going on and making sure you are forced to rely on the Ext interfaces rather than DOM manipulation or CSS or the like. Now, 98% of the time this won&#8217;t be an issue for you but I&#8217;ve run into a few cases where it&#8217;s tripped me up because I can&#8217;t work out how to get around all the Ext-ness.</p>
<p>In comparison jQuery provides almost nothing but DOM manipulation helpers, which is really useful if you already know what to do but if you want to build a layout like Ext does then you&#8217;re going to be messing around with HTML and CSS quite a bit. That said, it really isn&#8217;t that difficult to get the basics up and running but emulating something like SplitPane would be painful &#8230; unless you find an appropriate plugin. So, for what it does, jQuery is stunningly good. It makes enhancing web sites trivial and removes a lot of the sharp edges from JavaScript without attempting to fundamentally change how you use it.</p>
<p>As an example of how the two differ, here&#8217;s some code to run logic when a user clicks on a link and to disable the normal execution of that link.</p>
<p><b>For Ext:</b><br />
<code>
<pre>
Ext.select('#links a').on('click', function(event) {
    alert("You clicked: " + Ext.get(event.target).dom.innerHTML);
  },
  this,
  {stopEvent: true}
);
</pre>
<p></code></p>
<p><b>For jQuery:</b><br />
<code>
<pre>
$('#links a').click(function(event) {
  alert("You clicked: " + $(this).html());
  return false;
});
</pre>
<p></code></p>
<p>As you can see, the jQuery code is a bit shorter and easier to understand. To disable the normal browser action of following the link, Ext has a special option on the event handler whereas in jQuery you simply return false from your click function. This might seem counter-intuitive if you don&#8217;t know JavaScript so if you don&#8217;t, compare the above to how you&#8217;d do this without the libraries:</p>
<p><code>
<pre>
&lt;a href="/foo/bar/"
  onclick="alert('You clicked: ' + this.innerHTML); return false;"&gt;
Click here
&lt;/a&gt;
</pre>
<p></code></p>
<p>You can see that returning false is what you normally do anyway so, instead of encapsulating this, jQuery basically just lets you use the normal way of doing things. Ext, on the other hand, makes things more programmatic and Java-esque by having an extra configuration option to the event handler.</p>
<p>I am still developing web applications with both of them so I can tell you that both libraries are suitable for <abbr title="Rich Internet Application">RIA</abbr> development, it&#8217;s mostly just a question of whether you prefer developing apps entirely in JavaScript or using JavaScript for logic and a little layout, as well as whether or not you need all the advanced features Ext comes with. I think that I would normally pick jQuery because I prefer the simplicity of it and like more control when writing an application. Hopefully this little post has given you an idea of what the two libraries are like and encourage you to try them both out. I&#8217;d like to hear the experiences of others working with these libraries, as well as others like Prototype and Mootools, which I am also interested in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chnorton.com.au/2008/01/31/adventures-with-extjs-and-jquery/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>First impressions of ExtJS</title>
		<link>http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/</link>
		<comments>http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 08:41:34 +0000</pubDate>
		<dc:creator>Chris Norton</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/</guid>
		<description><![CDATA[I&#8217;ve recently been developing a web-based application (a RIA one might say) and, after initially trying to get it working right in jQuery, I decided to have a go at using ExtJS, a JavaScript library I&#8217;ve been meaning to try for a while. Basically, it is a JavaScript library that includes a ton of things [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been developing a web-based application (a <abbr title="rich internet application">RIA</abbr> one might say) and, after initially trying to get it working right in <a href="http://jquery.com/" rel="external nofollow">jQuery</a>, I decided to have a go at using <a href="http://extjs.com/">ExtJS</a>, a JavaScript library I&#8217;ve been meaning to try for a while. Basically, it is a JavaScript library that includes a ton of things for building web application other libraries don&#8217;t &#8211; not surprising considering it started life as an add-on to <a href="http://developer.yahoo.com/yui/" rel="external nofollow">YUI</a>. Here is my initial impressions of it, most of which are direct comparisons to jQuery.</p>
<p><span id="more-197"></span>First of all, getting Ext running is slightly more complicated than getting jQuery running. jQuery is a simple matter of including jquery.js in your HTML and then writing your script. Ext requires first it&#8217;s own <abbr title="cascading style sheets">CSS</abbr> file, then an adapter which uses another library (jQuery, YUI or Prototype) but can also use the newish ext-base.js which doesn&#8217;t depend on external libraries, and finally you include ext.js itself. I went with the pure Ext solution but tried out the jQuery adapter and found it didn&#8217;t work for me &#8211; I&#8217;m sure I was doing something wrong but didn&#8217;t care enough to fix it and went back to Ext.</p>
<p>Secondly, Ext is rather huge. Not surprising considering what it can do but the whole thing (ext.js, ext-base.js and stylesheet) still comes in uncompressed at just over 512KB. Sorry, I should mention that that&#8217;s <em>with</em> Ext&#8217;s default minification &#8211; the debug versions are a bit over 1MB! In comparison, jQuery is roughly 70KB before any minification is applied. So what do you get for all this size? Quite a bit actually.</p>
<p>The customer info area of my application is designed with a list of customers on the left and an area for details on the right. With pure HTML and CSS a nice-looking layout here, similar to a desktop app, is really difficult to achieve. With Ext it&#8217;s almost trivial and you can use a logical declarative style of recursive JavaScript objects to define the layout &#8211; similar to how it would be done in Java Swing, for example. With Ext you can also easily get &#8220;bonus&#8221; features like resizable panes, content areas that adjust to the size of the viewport and a default style that looks pretty damned good (and you have to option of using different themes). Without any trouble I was able to get a simple list working which allows clicking on customer names to load their details asynchronously in the details panel, as well as allowing dynamic updates and the like. </p>
<p>The standard things that I use with jQuery &#8211; selectors and <abbr title="Asynchronous Javascript And XML">AJAX</abbr> support &#8211; are also well supported in Ext, even if they are slightly more verbose. Ext also includes a nifty feature in it&#8217;s simplistic load() method that allows you to set a loading message, something that I believe you have ot do manually in jQuery.</p>
<p>Ext also supports a wide range of widgets and the like out of the box. Data grids are all the rage now and Ext makes it simple to get them up and running. Tree views, buttons, colour pickers, date selectors and a bunch of others are provided as well. If there&#8217;s something missing you might be able to find a plugin for it.</p>
<p>Overall, I&#8217;m really enjoying working with Ext. It makes some fundamental yet complex things ridiculously easy and provides enough of a framework to get almost anything working with a bit of lateral thinking and liberal application of nested layouts and the like.</p>
<p>So I guess the obvious question now is if I prefer Ext or jQuery? Honestly, the two are just aimed at completely different areas. If you&#8217;re making a web site that needs some fancy JavaScript effects, a bit of AJAX and you want it to be light and accessible, then I&#8217;d say jQuery is the way to go. If you want a RIA with lots of advanced functionality and don&#8217;t care about those plebs who don&#8217;t have JavaScript then I&#8217;d say Ext is definitely the preferred option. If I had to pick I&#8217;d say I like jQuery a bit more since I prefer writing enhanced web sites rather than desktop application wannabes but this is really just a personal choice. Both libraries offer the same basic functionality and jQuery can certainly be extended to do pretty much what Ext does so choosing either will probably let you do what you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chnorton.com.au/2007/12/20/first-impressions-of-extjs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery 1.2 Released</title>
		<link>http://www.chnorton.com.au/2007/09/11/jquery-12-released/</link>
		<comments>http://www.chnorton.com.au/2007/09/11/jquery-12-released/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 09:27:11 +0000</pubDate>
		<dc:creator>Chris Norton</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.chnorton.com.au/2007/09/11/jquery-12-released/</guid>
		<description><![CDATA[jQuery version 1.2 has been released.]]></description>
			<content:encoded><![CDATA[<p>Version 1.2 of the jQuery JavaScript library <a href="http://jquery.com/blog/2007/09/10/jquery-12-jqueryextendawesome/" rel="external">has been released</a>. There seems to have been quite a few subtle alterations to the selector and AJAX systems so if you&#8217;ve done some development with jQuery and want to upgrade then you should read <a href="http://docs.jquery.com/Release:jQuery_1.2#How_To_Upgrade" rel="external nofollow">How To Upgrade</a> on the jQuery wiki. I myself shall be looking into this in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chnorton.com.au/2007/09/11/jquery-12-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

