<?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"
	>

<channel>
	<title>Christoph's Blog &#187; Pylons</title>
	<atom:link href="http://blog.workaround.org/category/pylons/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.workaround.org</link>
	<description>Rants, discoveries and my tireless search for perfect Linux tools</description>
	<pubDate>Fri, 08 May 2009 20:31:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Automatic HTML validation of Pylons (or any WSGI) applications</title>
		<link>http://blog.workaround.org/2009/01/26/automatic-html-validation-of-pylons-or-any-wsgi-applications/</link>
		<comments>http://blog.workaround.org/2009/01/26/automatic-html-validation-of-pylons-or-any-wsgi-applications/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 16:29:15 +0000</pubDate>
		<dc:creator>Christoph Haas</dc:creator>
		
		<category><![CDATA[Open-Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Pylons]]></category>

		<guid isPermaLink="false">http://blog.workaround.org/?p=43</guid>
		<description><![CDATA[While many other &#8220;web designers&#8221; create hacky websites (that break in many funny way once the browser developers figure out how to do their jobs right making the hacks fail) I almost always try to use W3C&#8217;s web standards. Just that sometimes I forget to validate my own pages for proper CSS or (X)HTML. Thanks [...]]]></description>
			<content:encoded><![CDATA[<p>While many other &#8220;web designers&#8221; create hacky websites (that break in many funny way once the browser developers figure out how to do their jobs right making the hacks fail) I almost always try to use W3C&#8217;s web standards. Just that sometimes I forget to validate my own pages for proper CSS or (X)HTML. Thanks to the great &#8220;<a href="http://chrispederick.com/work/web-developer/" onclick="javascript:pageTracker._trackPageview('/outbound/article/chrispederick.com');">Web Developer</a>&#8221; Firefox plugin I can press Ctrl+Shift+A and validate my local (X)HTML using their <a href="http://validator.w3.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/validator.w3.org');">validation service</a>. But I felt that a more automatic way would be nice. Besides I use <a href="http://pylonshq.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/pylonshq.com');">Pylons</a> (a shiny <a href="http://python.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/python.org');">Python</a> web framework) for a few closed-source applications and don&#8217;t want to send that information to a public web site. So a while back we were discussing automatic validation in Pylons applications. And today Michael van Tellingen told me in #pylons that <a href="http://pythonpaste.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/pythonpaste.org');">Ian Bicking&#8217;s Paste</a> has automatic validation built-in as a <a href="http://http://wsgi.org/wsgi/" onclick="javascript:pageTracker._trackPageview('/outbound/article/wsgi.org');">WSGI</a> middleware.</p>
<p><em>(For those who don&#8217;t know WSGI. It&#8217;s an interface similar to CGI that is used by Python web frameworks. It&#8217;s what is spoken between an application creating the HTML output and the web server. WSGI allows you to hook up several layers of functionality which are called &#8220;middleware&#8221;. Middleware can be used for example for authentication or for intercepting errors. It works similar to a UNIX pipe. The output of one layer is the input to the next layer. You want to profile every HTML page? Just add profiling middleware.)</em></p>
<p>So all I had to do was import the <a href="http://pythonpaste.org/modules/debug.wdg_validate" onclick="javascript:pageTracker._trackPageview('/outbound/article/pythonpaste.org');">paste.debug.wdg_validate module</a> and use the middleware in the right place. One way to do that is edit the config/middleware.py file of a Pylons application and just insert this line where it reads &#8220;CUSTOM MIDDLEWARE HERE&#8221;:</p>
<pre>
app = paste.debug.wdg_validate.WDGValidateMiddleware(
    app, global_conf, wdg_path='/usr/bin/validate')
</pre>
<p>But I&#8217;m not a big fan of hardcoding such functionality. So I enabled it only if a certain variable (&#8217;html_validator&#8217;) in the application&#8217;s INI file is set that points to the &#8216;validate&#8217; binary and if the application is run in debug mode like during development:</p>
<pre>
if config['debug'] is True and &#8216;html_validator&#8217; in config:
    import paste.debug.wdg_validate
    app = paste.debug.wdg_validate.WDGValidateMiddleware(app, global_conf,
        wdg_path=config['html_validator'])
</pre>
<p>And in the INI file I put:</p>
<pre>
[app:main]
html_validator = /usr/bin/validate
</pre>
<p>The validation software is from the <a href="http://htmlhelp.com/tools/validator/offline/" onclick="javascript:pageTracker._trackPageview('/outbound/article/htmlhelp.com');">WDG&#8217;s web site</a>. But in case you are  lucky Debian user an &#8220;<code>aptitude install wdg-html-validator</code>&#8221; is all it takes.</p>
<p>Voila - now every (X)HTML validation error gets displayed on the bottom of a page. The output isn&#8217;t very nifty but it&#8217;s sufficient to find typos without having to run every single page through the validator. And it&#8217;s completely local thus being faster and avoiding to disclose internal HTML data to the W3C web site.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.workaround.org/2009/01/26/automatic-html-validation-of-pylons-or-any-wsgi-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>screenshots.debian.net gets slashdotted</title>
		<link>http://blog.workaround.org/2008/11/19/screenshotsdebiannet-gets-slashdotted/</link>
		<comments>http://blog.workaround.org/2008/11/19/screenshotsdebiannet-gets-slashdotted/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 20:25:34 +0000</pubDate>
		<dc:creator>Christoph Haas</dc:creator>
		
		<category><![CDATA[Debian]]></category>

		<category><![CDATA[Open-Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Pylons]]></category>

		<guid isPermaLink="false">http://blog.workaround.org/?p=39</guid>
		<description><![CDATA[Bear with me that I keep you posted with boring news of screenshots.debian.net. But after further optimisation (caching the start page, serving screenshots directly from nginx instead of via Pylons) we decided that it&#8217;s time to get us on Slashdot. Thanks a lot to zepolen for teaching me about memcached and threading! The slashdot people [...]]]></description>
			<content:encoded><![CDATA[<p>Bear with me that I keep you posted with boring news of <a href="http://screenshots.debian.net" onclick="javascript:pageTracker._trackPageview('/outbound/article/screenshots.debian.net');">screenshots.debian.net</a>. But after further optimisation (caching the start page, serving screenshots directly from <a href="http://nginx.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/nginx.net');">nginx</a> instead of via Pylons) we decided that it&#8217;s time to get us on <a href="http://slashdot.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/slashdot.org');">Slashdot</a>. Thanks a lot to zepolen for teaching me about <a href="http://www.danga.com/memcached/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.danga.com');">memcached</a> and threading! The slashdot people have approved my <a href="http://linux.slashdot.org/linux/08/11/19/1828220.shtml" onclick="javascript:pageTracker._trackPageview('/outbound/article/linux.slashdot.org');">announcement</a> and we are already getting hammered by people following the link to <a href="http://screenshots.debian.net" onclick="javascript:pageTracker._trackPageview('/outbound/article/screenshots.debian.net');">screenshots.debian.net</a>. Currently the server load is still near 100%, we have 10 Mbps network traffic and 60 request/second. Watching the web server logs is currently pretty cool. <img src='http://blog.workaround.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>21:08:30 up 455 days, 15:08,  2 users,  load average: 1.27, 0.94, 0.69</p>
<p><a href='http://blog.workaround.org/uploads/2008/11/network0135daydv3.png'><img src="http://blog.workaround.org/uploads/2008/11/network0135daydv3-300x191.png" alt="Network traffic when slashdotting began" title="Network traffic when slashdotting began" width="300" height="191" class="alignnone size-medium wp-image-40" /></a></p>
<p><a href='http://blog.workaround.org/uploads/2008/11/sdn-on-slashdot.png'><img src="http://blog.workaround.org/uploads/2008/11/sdn-on-slashdot-300x133.png" alt="Yes, I\&#039;m on slashdot! :)" title="Yes, I\&#039;m on slashdot! :)" width="300" height="133" class="alignnone size-medium wp-image-41" /></a></p>
<p>Honestly I hardly ever read Slashdot. But apparently many others do. And if you are especially bored you can read the comments on the posting there. So much childishness. &#8220;You should have made it a distribution-independent site.&#8221; &#8220;How should I make a screenshot of libfoo-bar?&#8221; Why can&#8217;t people just be happy with what they get for free and make proper suggestions? Well, go create something yourself. Expecting something perfect from the start is pretty naive. But not unexpected. <img src='http://blog.workaround.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.workaround.org/2008/11/19/screenshotsdebiannet-gets-slashdotted/feed/</wfw:commentRss>
		</item>
		<item>
		<title>screenshots.debian.net goes live</title>
		<link>http://blog.workaround.org/2008/11/14/screenshotsdebiannet-goes-live/</link>
		<comments>http://blog.workaround.org/2008/11/14/screenshotsdebiannet-goes-live/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 14:00:50 +0000</pubDate>
		<dc:creator>Christoph Haas</dc:creator>
		
		<category><![CDATA[Debian]]></category>

		<category><![CDATA[Open-Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Pylons]]></category>

		<guid isPermaLink="false">http://blog.workaround.org/?p=37</guid>
		<description><![CDATA[After just three days of beta operation I could already make screenshots.debian.net go live. Within the first day I fixed a few typos, optimized database queries and added proper HTTP headers for caching. We got a huge load spike after my announcement on debian-devel-announce. I&#8217;m very happy and proud to have this service running and [...]]]></description>
			<content:encoded><![CDATA[<p>After just three days of beta operation I could already make <a href="http://screenshots.debian.net" onclick="javascript:pageTracker._trackPageview('/outbound/article/screenshots.debian.net');">screenshots.debian.net</a> go live. Within the first day I fixed a few typos, optimized database queries and added proper HTTP headers for caching. We got a huge load spike after my <a href="http://lists.debian.org/debian-devel-announce/2008/11/msg00003.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/lists.debian.org');">announcement on debian-devel-announce</a>. I&#8217;m very happy and proud to have this service running and appreciate the help from the <a href="http://www.sqlalchemy.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sqlalchemy.org');">SQLAlchemy</a>, <a href="http://pylonshq.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/pylonshq.com');">Pylons</a> and <a href="http://debian.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/debian.org');">Debian</a> community. Michael Vogt has already added screenshots support to the Synaptic package manager. Martin Stigge has joined the admin team to speed up approving screenshots in the moderation queue. (It would nice if someone else volunteered who is from .us or .au to deal with uploads while we sleep.) And above all I&#8217;d like to thank &#8216;zepolen&#8217; from <a href="http://www.car.gr" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.car.gr');">car.gr</a> for allowing me to host the web application on his server. I think neither of us estimated so much interest in the service. May his server not melt under the load. <img src='http://blog.workaround.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Honestly the first feedback wasn&#8217;t very motivating (developers tend to point out errors first) but I enjoy seeing how quickly the news is spreading. And thanks to everybody for uploading further screenshots. I&#8217;ll keep on watching the moderation queue and enjoy how others blog about it. <img src='http://blog.workaround.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.workaround.org/2008/11/14/screenshotsdebiannet-goes-live/feed/</wfw:commentRss>
		</item>
		<item>
		<title>screenshots.debian.net goes beta</title>
		<link>http://blog.workaround.org/2008/11/10/screenshotsdebiannet-goes-beta/</link>
		<comments>http://blog.workaround.org/2008/11/10/screenshotsdebiannet-goes-beta/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 16:31:46 +0000</pubDate>
		<dc:creator>Christoph Haas</dc:creator>
		
		<category><![CDATA[Debian]]></category>

		<category><![CDATA[Open-Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Pylons]]></category>

		<guid isPermaLink="false">http://blog.workaround.org/?p=36</guid>
		<description><![CDATA[Roberto Sanchez and I proposed to create a service to provide screenshots for Debian packages. And with a little work, a lot of Pylons frameworking power and a tad of jQuery spice I created the &#8216;debexpo&#8217; software that provides a nice-looking web site doing exactly that. The service is already up and running at screenshots.debian.net. [...]]]></description>
			<content:encoded><![CDATA[<p>Roberto Sanchez and I proposed to create a service to provide screenshots for Debian packages. And with a little work, a lot of <a href="http://pylonshq.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/pylonshq.com');">Pylons</a> frameworking power and a tad of <a href="http://jquery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/jquery.com');">jQuery</a> spice I created the &#8216;debexpo&#8217; software that provides a nice-looking web site doing exactly that. The service is already up and running at <a href="http://screenshots.debian.net" onclick="javascript:pageTracker._trackPageview('/outbound/article/screenshots.debian.net');">screenshots.debian.net</a>. This is still the phase where I have to sort out a few minor technical, legal and organisational issues. And thanks to a friendly fellow Pylons&#8217; user I have now a place to host the service (my vpslink-sponsored server is already overloaded). Once all the subleties are sorted out I will announce the service to debian-devel-announce and hope to get mentioned in the weekly news.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.workaround.org/2008/11/10/screenshotsdebiannet-goes-beta/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ExtJS - impressive for the user - painful for the programmer</title>
		<link>http://blog.workaround.org/2008/10/22/extjs-impressive-for-the-user-painful-for-the-programmer/</link>
		<comments>http://blog.workaround.org/2008/10/22/extjs-impressive-for-the-user-painful-for-the-programmer/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 20:04:27 +0000</pubDate>
		<dc:creator>Christoph Haas</dc:creator>
		
		<category><![CDATA[Open-Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Pylons]]></category>

		<category><![CDATA[Rants]]></category>

		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.workaround.org/?p=34</guid>
		<description><![CDATA[When following my blog you may have learned one thing about me: I spend half of my spare time trying out every single piece of software because I fear I could miss a tool that would make my life a tad easier. It&#8217;s not really surprising that this way I wasted more time in my [...]]]></description>
			<content:encoded><![CDATA[<p>When following my blog you may have learned one thing about me: I spend half of my spare time trying out every single piece of software because I fear I could miss a tool that would make my life a tad easier. It&#8217;s not really surprising that this way I wasted more time in my life than any tool could help me save. On the other hand I know a whole lot of tools and can usually instantly recommend something thus making me appear like a professional liar to many people. <img src='http://blog.workaround.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> A helpful side-effect is that I can critisize tools and pieces of software more thorougly if knowing them better. And you may make fun of me for trying my current (workflow web-site) application with three different Javascript frameworks. Most of the time I spent fighting against <a href="http://extjs.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">ExtJS</a>. No, seriously, I tried to work with it. I try not to deny working with new tools just because I&#8217;m not used to them. And ExtJS is seriously different from most other Javascript frameworks (with <a href="http://developer.yahoo.com/yui/" onclick="javascript:pageTracker._trackPageview('/outbound/article/developer.yahoo.com');">YUI</a> apparently being the closest). I don&#8217;t want to bore you too much but these are the pros and cons that finally made me go back to <a href="http://jquery.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/jquery.com');">jQuery</a> and rather create a new plugin instead of relying on ExtJS. These arguments are very subjective of course.</p>
<p>Pro ExtJS:</p>
<ul>
<li>Nice <a href="http://extjs.com/deploy/dev/examples/samples.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">widgets</a>. They have just everything. ExtJS is like a superset of the widgets of all available Javascript frameworks. And so far I couldn&#8217;t find any obvious bugs. Be it <a href="http://extjs.com/deploy/dev/examples/menu/menus.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">menus</a>, status bars or <a href="http://http://extjs.com/deploy/dev/examples/grid/array-grid.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">grids</a>. It&#8217;s just impressive. Take a look at the <a href="http://extpaste.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/extpaste.com');">ExtJS-based pastebin</a> and you&#8217;ll likely say &#8220;Wow&#8221;. It&#8217;s great from a user&#8217;s perspective. When I saw it the first time I had to show it to everybody who couldn&#8217;t get away fast enough. It&#8217;s like a proof-of-concept of what&#8217;s possible in the web browser.</li>
<li>Good <a href="http://extjs.com/deploy/dev/docs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');"><em>API</em> documentation</a>. If you need to look up something you&#8217;ll probably find it.</li>
</ul>
<p>Con ExtJS:</p>
<ul>
<li>Applications do not degrade gracefully. Turn off Javascript and you are left with a few naked lines on your screen screaming &#8220;eeeeek&#8221; and disappearing in shame. I try to make my applications work without Javascript (web 1.0 style) and just spice it up with Javascript to support the users and save them time.</li>
<li>The <a href="http://http://extjs.com/deploy/dev/resources/css/ext-all.css" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">CSS</a>. It&#8217;s nearly thousand definitions which are giving you no idea which is used for what purpose. You just can&#8217;t seriously customize it. No theming. Their style is &#8220;eat or die&#8221;.</li>
<li>The HTML. Okay, the generated HTML works. But it&#8217;s huge. Many tags get so many CSS styles assigned that you don&#8217;t understand what&#8217;s going on. DIVs are nested so deeply that you&#8217;ll need a minute at least to find a certain widget in Firebug. If you are fast.</li>
<li>ExtJS works in pixels. You don&#8217;t say &#8220;give me a textarea with 60&#215;5 chars to enter&#8221; but &#8220;give me a textarea that is 300 pixels wide and 80 pixels high&#8221;. I rather try to avoid working with pixels. Isn&#8217;t the point of HTML to render properly on every screen? Try a Layout in a Panel (rendered in a DIV). You&#8217;ll have to specify the height which is either too high or too low. Try a Layout in a Viewport and you are all set - it&#8217;s exactly filling the browser window. But you won&#8217;t be able to change anything in it or use it in the context or your existing application. If you want ExtJS you&#8217;ll have to virtually surrender to its way to render things.</li>
<li>The <a href="http://http://extjs.com/company/dual.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">license</a>. When ExtJS started to use the GPL3 everybody complained. At first I wondered why. After all 50% of what I do is open-source anyway. I just forgot about the other 50% where I either create web applications for my employer or for my own customers. I obviously don&#8217;t want to publish my own source code - especially not under the GPL. (At first I wondered why all the trolls were so upset about the viral nature of the GPL. But with the time I understood that&#8217;s really viral and often a problem. The GPL may be okay for applications. But it&#8217;s definitely the wrong choice for libraries - like ExtJS.) In the context of applications for my employer it&#8217;s all internal/intranet applications. So I&#8217;m not distributing the application and don&#8217;t need to pay for a license or publish the code. (Even though the ExtJS web site tries to confuse their readers regarding the &#8220;internal usage&#8221; and claims you need a license to do so.) Of course the makers of ExtJS can publish the library under whatever license they want. And it&#8217;s definitely high quality so they deserve to get paid for it. But their GPL restriction may really be a no-go for many projects that are evaluating different Javascript applications. If you like to hear my proposal: publish ExtJS under a permissive license (MIT or BSD) and just sell support. Many companies earn money that way. And it would make people worry less about using it and rather have them using it.</li>
<li>The web-based support <a href="http://extjs.com/forum/" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">forum</a>. Now that I went back to jQuery I value their <a href="http://docs.jquery.com/Discussion" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.jquery.com');">simple mailing list</a> so much. Web forums (although pretty widespread) are a PITA. Their advantage is that you can easily seperate different topics on a single site. If you tried the same with mailing lists you&#8217;d have to offer a dozen mailing lists. But on the downside you have just 20% value (with 80% being HTML, rankings, polls, blinking signatures and &#8220;me too&#8221; postings). I really wish we would all go back to using the usenet in a proper way - subscribe to a group and participate without subscribing or clicking your way through a web forum like a crazed monkey. And I believe that the friendliness in the jQuery community is much better than the arrogance of ExtJS users.</li>
<li>Lack of proper examples. The API documentation is pretty complete (I rarely found something in an example that wasn&#8217;t found in the official docs). But often the classes and objects are derived from other objects. So you have to click your way through hoping to find where something is documented. In addition the documentation hardly has any examples. You can&#8217;t learn from the docs. You&#8217;ll have to understand most of it already and just it to look something up. It doesn&#8217;t give you an idea of the concepts behind a certain class or object. You&#8217;ll have to look at the example applications (which are documented pretty well) to learn from it. And even then it&#8217;s a lot of guesswork.</li>
<li>No customization. I can hardly imagine how I should use ExtJS on a customer web site. Show me a web site and I&#8217;ll tell you if it&#8217;s done with ExtJS or not. ExtJS is probably good for applications where you really need all the widgets - like a internal management or workflow application. But you will hardly find a good way to make the widgets look any different than in the examples. It&#8217;s sink or swim. If you have to follow a corporate identity then you are pretty much screwed.</li>
<li>90% client-side coding. I still love <a href="http://pylonshq.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/pylonshq.com');">Pylons</a> (the Python WSGI MVC web framework). I have a <a href="http://python.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/python.org');">good programming language</a>. A good <a href="http://www.makotemplates.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.makotemplates.org');">templating language</a>. A nice online debugger. But with ExtJS I initialise the application in the browser and just interact with my backend using JSON. Which means that most of the complex logic that I use to display things on the web must be done in Javascript. This is error-prone and the user can see exactly what I&#8217;m doing. I overheard developers worrying on how to load Javascript code on-the-fly so that every user just sees the widgets that are necessary. Seriously - such code belongs in the backend. You&#8217;ll have to do the data validation in the backend anyway. (Although I saw some example of ExtJS applications where all the security validation was done in - easily tampered - Javascript.) Try the <a href="http://extjs.com/learn/Tutorial:Basic_Login" onclick="javascript:pageTracker._trackPageview('/outbound/article/extjs.com');">login tutorial</a>. You&#8217;ll see that logging you in means forwarding you to another page. No session cookies. No making sure that AJAX/XHR requests don&#8217;t come back with a 401 (Authentication needed) error. Just the kind of security you&#8217;ll expect from an average PHP application. AJAX is a security risk anyway and you should use it carefully to avoid <a href="http://docs.pythonweb.org/display/pylonsfaq/Warnings" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.pythonweb.org');">cross</a>-<a href="http://bob.pythonmac.org/archives/2007/04/05/fortify-javascript-hijacking-fud/" onclick="javascript:pageTracker._trackPageview('/outbound/article/bob.pythonmac.org');">site</a> <a href="http://en.wikipedia.org/wiki/JavaScript_Object_Notation#Cross-site_request_forgery" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">scripting</a> problems. Did you know that passing JSON arrays is potentially insecure? ExtJS often expects JSON data as arrays (or in XML). ExtJS is virtually in invitation for hackers.</li>
<li>Verbosity. To do simple things you&#8217;ll find yourself writing large amounts of Javascript. Of course a grid or layout has a lot of possible options that you can pass. But nothing beats jQuery&#8217;s simplicity of <code>$('#div1').load('/something')</code>.
<li>Debugging. Although there is a debug version of the library I could hardly ever figure out what went wrong. My main debugging tool wasn&#8217;t Firebug. It was Mercurial. Because I checked in every single working change I had and diff&#8217;ed my changes in case anything didn&#8217;t work any more. Programming on trial and error isn&#8217;t really my favorite style.</li>
<li>Size. The library is 500 KB in size. While people may argue that you load that once and then keep it cached it&#8217;s still 500 KB. Imagine you have that on your start page. I wouldn&#8217;t worry about that size on an intranet application where everybody is on 100 or 1000 Mbps. But on the web?</li>
</ul>
<p>You probably won&#8217;t need long to count my pros and cons. Please don&#8217;t let me make your decision on whether to use ExtJS or not. Just consider the above criticism if you consider using ExtJS. Bah, enough with the politically correct talking. See you on #jquery. <img src='http://blog.workaround.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>P.S.: Yahoo&#8217;s <a href="http://developer.yahoo.com/yui/" onclick="javascript:pageTracker._trackPageview('/outbound/article/developer.yahoo.com');">YUI</a> has similar widgets like ExtJS. It&#8217;s just also very verbose. But at least they are flexible enough to be used easier and you can skin them.<br />
P.P.S.: I have to admit that the <a href="http://ui.jquery.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ui.jquery.com');">jQuery UI</a> widgets are still a tad buggy. If you seriously need widgets then consider the YUI.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.workaround.org/2008/10/22/extjs-impressive-for-the-user-painful-for-the-programmer/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
