Why isn't everything as easy as ColdFusion? It's a loaded and obviously rhetorical question ... loaded because I've been using CF for nearly 15 years (gasp!) and rhetorical for, well, pretty much the same reason.
First there is jQuery. Fast, simple, relatively small in footprint and with a healthy set of DOM functionality. Throw in jQuery UI and ThemeRoller and you've got yourself a complete RIA framework. Well, almost. If you are building big and handling a lot of data, you need a grid. jqGrid is pretty sophisticated, and Datatables is nice for displaying and sorting.
Here's the problem, though (and this is where ColdFusion comes in): I now have an OS framework with cores from two different groups (jQuery and jQuery UI), a semi-standard or at least semi-respected theme manager in jQuery UI/Themeroller, and two independent UI components managed by two other individuals. All are variously powerful, but each has it's own approach, and especially in jqGrid/Datatables a completely unique and proprietary data in/data out methodology. So, sitting on the table are four sets of documentation, four sets of functionality, four different ... well, you get the idea. On the server side I have literally built three different end-points to my application, one for general jQuery/JSON communication and one each for DataTables and jqGrid. Ack!
Another issue is the lack of some really crucial foundation elements. Having a core data model in a framework is crucial when building a large RIA. So too is a solid templating model. You don't *have* to use either, but having them will add a consistency that others will recognize and be able to build upon when they step into your application. Now, I'm not putting this on jQuery's shoulders. It isn't necessarily the job or responsibility of jQuery to do this, but in reality I haven't found anything that is core and complete in either case (though big props go out to Ben Nadel and his work on corMVC and his new JTML project, and to those others who have been working on similar projects).
Then there is ExtJS. UI maven, FLEX-ala-JS wonder, builder of UI components you could cut glass on. You could build an empire upon their grid component, templating via containers and XTemplate is a wonder, and its baked in extensibility and data "store" model is a dream.
Ah, but let's not so soon forget the first sentence in this post. The first issue I have with ExtJS is the size. If you are doing UI, you are going to be pushing 700K for the JS library. In a word, Ouch! Second, there are some curious omissions in the framework, such as a baked-in method of drag/drop sorting of DOM objects (which sadly is critical to my current application, and which I love jQuery UI for). Another thing I'm not a really big fan of is the insane number of DOM elements that ExtJS creates. The reason they give is for full cross-browser support, but man! A simple ExtJS three-tab box I created had no fewer that 50 html tags created for it. A three-tab box in jQuery: 12. I really hope that with more ExtJS experience I can reign that in a bit.
And then there is licensing and that small undercurrent of unbridled hatred that some in the FOSS community have for ExtJS. Having come in long after the license-switch fiasco, it is hard to feel animosity towards them. They have a dual GPL 3/commercial license, switched from a formerly and more liberal LGPL license, and that has upset those developers who were caught having to buck up for a commercial license when the switch was made and their software wasn't GPL or GPL-compatible. I'm sure there is much more to it, but even with what I've seen it isn't something I can work up the energy to care about. For criminy sake, a royalty-free commercial license is less than $300! You'd have to be seriously cheap to be doing commercial work that relies upon ExtJS and not want to pay them for the many rounds of improvements and wealth of documentation they supply. Just my opinion, is all, and again I'm new to the ExtJS party so I haven't been soaking in the vitriol of those who got burnt by the change.
Anyway, what I'm seeing here is that in many ways ExtJS is to ColdFusion as jQuery is to PHP. In the former, you have a fairly solid and complete development framework sourced from a single company, with a commercial license and commercial support, but an undercurrent of animosity because you will undoubtedly have to pay for it eventually. In the latter you have a completely open framework guided/governed by a few individuals, with important components contributed by various groups who have likewise variously implemented (or not) the general standards of the community. These are generalizations of course, and yes zealots I'm sure I've upset a few of you with this wide brush, but really it is the generalities that I am examining.
As a CF developer, I'm used to *not* having to hunt for third-party plugins to get things done. I'm also used to *not* having to learn a new methodology every time I need one. ColdFusion by its nature has bred a pureness of consistency and formula, meaning even when I turn to frameworks like FW/1 or ColdBox, or tools like Reactor or ColdSpring, the core and meat of what they do will be governed by the standards of ColdFusion, CFCs and common practices. The lack of that structure in PHP and Perl is why I never liked the former and abandoned the latter. Call me spoiled, but CF allows me a certain lazy comfort that I don't give up easily. It's this laziness that makes me fond of ExtJS, which tries (and so far succeeds) to do everything in one neat package. I like developing plugins and functions with jQuery, but I really like that ExtJS doesn't force me to.
Now (six chapters later) to the title of this blog. I should mention that I have quite easily and successfully merged the two into an application already. It was easy and it worked as expected, but of course there are bound to be complications later on and it added around 100K to my already teeth-gritting 700K library size. They may not necessarily *like* one another, but they do seem to at least tolerate each others' existence on the page.
So, what do I hope to accomplish with this variously introspective and semi-ranting journal, other than to clarify my issue? Well, maybe if I'm lucky some wonderful ExtJS guy (or gal) will say "hey, dummy, you do DOM drag/drop sorting via plugin X". Or, some wise and prophetic jQuery guru will point me towards a really solid ExtJS-style "store" or "Ext.Direct"-type model that I will fall in love with. Probably, though, I've just started another little mini Apple vs. PC-type war that will populated by haters and defenders.
Either way, it was nice to get off my chest.