<?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>le blog &#187; Ext JS</title>
	<atom:link href="http://www.normyee.net/blog/category/ext-js/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.normyee.net/blog</link>
	<description></description>
	<lastBuildDate>Wed, 09 Dec 2009 23:23:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>jQuery tips, migrating from jQuery&#8217;s tablesorter to Ext JS&#8217; GridPanel</title>
		<link>http://www.normyee.net/blog/2008/04/02/jquery-tips-migrating-from-jquerys-tablesorter-to-ext-js-gridpanel/</link>
		<comments>http://www.normyee.net/blog/2008/04/02/jquery-tips-migrating-from-jquerys-tablesorter-to-ext-js-gridpanel/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 04:35:51 +0000</pubDate>
		<dc:creator>norm</dc:creator>
				<category><![CDATA[Ext JS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.normyee.net/blog/2008/04/02/jquery-tips-migrating-from-jquerys-tablesorter-to-ext-js-gridpanel/</guid>
		<description><![CDATA[I ran across this post which has some good jQuery tips. Speaking of JavaScript frameworks, I&#8217;ve been spending the last couple weeks ramping up on Ext JS since it comes with a very slick grid component (actually all of the components it comes with are very, very slick). I&#8217;ve been using the jQuery tablesorter plugin]]></description>
			<content:encoded><![CDATA[<p>I ran across <a href="http://monc.se/kitchen/150/eight-tips-that-makes-you-a-better-jquery-coder" target="_blank">this post</a> which has some good jQuery tips.</p>
<p>Speaking of JavaScript frameworks, I&#8217;ve been spending the last couple weeks ramping up on <a href="http://extjs.com/" target="_blank">Ext JS</a> since it comes with a very slick grid component (actually all of the components it comes with are very, very slick). I&#8217;ve been using the jQuery <a href="http://tablesorter.com/docs/" target="_blank">tablesorter plugin</a> for a grid layout used in one of my projects, but it&#8217;s missing a couple of features I need such as grouping &amp; resizable columns, which the Ext JS grid component has.</p>
<p>Migrating to the Ext JS grid has been interesting since I&#8217;ve had a chance to see the pros and cons of each framework and the different approaches taken to build a grid. The jQuery tablesorter plugin operates on an existing HTML table (or one you create in JavaScript and append to the DOM, which is my case) and converts it to a sortable grid, whereas the Ext JS grid uses a datasource such as a JavaScript array, JSON or XML file, etc. and uses that to build the grid.</p>
<p>Ext JS is quite verbose unlike jQuery (<a href="http://ejohn.org/blog/classy-query/" target="_blank">unless you want the verbosity</a> &#8212; note: if it&#8217;s not obvious, that is a April Fool&#8217;s joke <img src='http://www.normyee.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), but I do like how Ext JS is a complete framework with a lot of included widgets that all work well together, no doubt because they all are part of the distribution.</p>
<p>jQuery on the other hand is very compact and the syntax is similarly compact (which I love). The core distribution is kept as tiny as possible, and additional functionality is added via <a href="http://plugins.jquery.com/" target="_blank">plugins</a> such as tablesorter.</p>
<p>The existing implementation of my grid uses jQuery&#8217;s <a href="http://tablesorter.com/docs/" target="_blank">tablesorter</a>, <a href="http://plugins.jquery.com/project/ContextMenu" target="_blank">contextmenu</a>, <a href="http://plugins.jquery.com/project/blockUI" target="_blank">blockui</a>, <a href="http://plugins.jquery.com/project/cluetip" target="_blank">cluetip</a>, and <a href="http://plugins.jquery.com/project/metadata" target="_blank">metadata</a> plugins, whereas to achieve the same functionality in Ext JS and to add new features such as grouping &amp; resizable columns, I am using the following Ext JS objects: <a href="http://extjs.com/deploy/dev/docs/?class=Ext.grid.GridPanel" target="_blank">Ext.grid.GridPanel</a>, <a href="http://extjs.com/deploy/dev/docs/?class=Ext.grid.GroupingView" target="_blank">Ext.grid.GroupingView</a>,  <a href="http://extjs.com/deploy/dev/docs/?class=Ext.data.GroupingStore" target="_blank">Ext.data.GroupingStore</a>, <a href="http://extjs.com/deploy/dev/docs/?class=Ext.data.JsonReader" target="_blank">Ext.data.JsonReader</a>, <a href="http://extjs.com/deploy/dev/docs/?class=Ext.QuickTip">Ext.QuickTip</a>, <a href="http://extjs.com/deploy/dev/docs/?class=Ext.menu.Menu" target="_blank">Ext.menu.Menu</a>, <a href="http://extjs.com/deploy/dev/docs/?class=Ext.MessageBox" target="_blank">Ext.MessageBox</a>, <a href="http://extjs.com/deploy/dev/docs/?class=Ext.Viewport" target="_blank">Ext.Viewport</a>.</p>
<p>It&#8217;s not an apples to apples comparison since some of the Ext JS objects I listed above are used to load the JSON data into something the grid can use, whereas the JSON data was a JS object literal previously and I manually iterated over it to create my table which tablesorter then coverted into a grid. Others like grouping (via Ext.grid.GroupingView) is a new feature that I wanted to implement &amp; wasn&#8217;t available in tablesorter or any other jQuery plugin that I could find at the time. If I was to break it down to replicating my grid&#8217;s functionality in jQuery over to Ext JS, it&#8217;d be the following objects: Ext.grid.GridPanel, Ext.QuickTip, Ext.menu.Menu, Ext.Messagebox.</p>
<p>Each framwork has its pros and cons, but I am glad though that they both work well together (both were designed with this in mind). That&#8217;s a good thing, as I am using both: I&#8217;ve migrated the grid to use Ext JS&#8217; GridPanel, but am still using jQuery to do a couple manipulations to the grid. I can have my cake and eat it, too (though I will see if I can migrate all of the grid functionality over to Ext JS to keep things simpler)!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.normyee.net/blog/2008/04/02/jquery-tips-migrating-from-jquerys-tablesorter-to-ext-js-gridpanel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
