Thoughts On Ajax Frameworks And ColdFusion/Adobe

A reader (ironically named Todd) commented on my post yesterday:

I'd also like to see some discussion about Ext vs. Spry.

Dreamweaver CS3 seems to have settled on Spry while CF8 has settled on Ext (1.0). Apparently, Adobe divisions do not talk to each other.

I can't decide between them. I find Ext (at least teh 1.0 version used in CF) to be difficult and frustrating to use. Prototype.js was easy. I haven't yet tried Spry.

[More]

Comments
Wasn't me! I wasn't even paying attention to anything yesterday as I was enjoy the day off due to snow. :)
# Posted By Todd Rafferty | 2/13/08 10:55 AM
First off great article Todd! I still try to figure out why everyone has to pick a side whenever 2 choices come up. A great example is Flex vs AJAX. Why not learn them both and understand that in different scenario's one may provide a better solution. I think the same can be said about AJAX frameworks. While I clearly love Ext. I use JQuery & SPRY for certain things. The only way you will know is to use them and find out what you like about each framework.
# Posted By Dan Vega | 2/13/08 11:01 AM
I have a problem with his assertion that "Dreamweaver CS3 seems to have settled on Spry". The DW team didn't settle on Spry. They DEVELOPED IT to make AJAX easier and the barrier to entry lower for designers. This means that they thought there was not an AJAX framework available that they felt suited designers' skill sets. Spry makes it easy to leverage dynamic XML or JSON data on a web page for designers. Remember, created for designers, embraced by developers.
# Posted By Andrew Powell | 2/13/08 11:09 AM
Andrew hit the nail on the head. Spry is developed by the Dreamweaver team. When we were building CF8 we took a very close look at Spry (which wasn't even 1.0 at this point).

The bottom line is that Spry is already incredibly simple to use in Dreamweaver. We couldn't make it any easier with CF. On the other hand, we saw an opportunity to make Ext JS alot easier to use.

ColdFusion 8 does offer native support for Spry datasets with <cfsprydataset> so you can easily work with CF queries in Spry.
# Posted By Adrock | 2/13/08 12:36 PM
I mentioned cfsprydataset - and to be clear Andrew and Adam - I was not downplaying anything with Spry. I heart Spry! I didn't know it was developed *by* the DW team - I was just stating my opinions/observations. Hope I didn't come off wrong, but thanks for clarifying.
# Posted By todd sharp | 2/13/08 1:06 PM
Oops I lied. I mentioned cfsprydataset in my post yesterday, not this one...
# Posted By todd sharp | 2/13/08 1:08 PM
That would be me.

I asked for "discussion" because I'm totally unfamiliar with Spry. I have deliverables to deliver and don't have tremendous amounts of time to research the hundreds of packages out there to find exactly the right one. Nor do I have the time (nor will my clients pay for the time) for me to roll my own. Hence the question.

I know Dreamweaver is not a ColdFusion product, but it is an Adobe product, and as Adobe claims to be a company with a goal of making all their products into a seamless suite, I thought I'd take them at their word. Part of being a seamless suite is actually being aware of the other products. If that's not the case, they shouldn't claim it. I pay a boatload for these products and that part of the value I expect in paying these prices.

<asside>
I take great exception to Adobe's claim that their customers are not cost constrained (or whatever the exact words were.
</asside>

I know there are always issues with timing in the release of products: trying to get the right versions compatible with each other, especially w/r/t documentation.

<asside>
Dreamweaver's Coldfusion documentation seems to have had no QA done on it whatsoever. CF8's documentation has had precious little, and the search function is now completely missing. A huge step backwards, making it far less useful that CF7 docs. Thanks the goddesses for http://www.coldfusiondocs.com/app/
</asside>

But back to Ext.

I've had lots of problems with it and have given up on various aspects as I've just been unable to get them to work. Apart from the fact that the various includes can swell the page size to unconscionable levels, the CF application framework seems to throw a curve ball at Ext in some cases and prevents it from working in any way at all. Specifically, using <cfajaximport> together with <cf$ajaxy_whatever> can fail (and possibly direct inclusion of Ext components not included in <cf$whatever>), and fail in a silent, undebugable way.

You ask: "Why wouldn't you expose developers writing PHP, ASP, etc to your Ajax framework?" The answer you give is, obviously, the right one. But that's the wrong question. The real question is why would you (DW, an Adobe) not support the other framework upon which CF8 (another Adobe product) has settled on? Additionally, that is, not in lieu of. Even if it's an Extension. I mean, if you can handle CF and PHP and JSP and ASP and ActionScript, &c, surely you can handle the two AJAX frameworks used in the two Adobe products.

Dan Vega: You /have/ to pick a side for a project. Ext/YUI can add 150k+ to a page. At that size, you can't include more than one framework and have the site usable. I'm not trying to determine whether one is canonically better than another, I'm trying to determine whether one is better than another /for a specific application/ without spending tens of thousands of dollars in client money trying to decide. I need to rely on others to help make that determination. There's a whole industry built around that (ask Ben Forta). If you were not to decide on one over another, the obvious extension of that would be to write some pages of your application in CF, others in PHP, and others in Python, and so on. That's just crazy talk.

Andrew Powell: Yes: "settled on." I was unaware the DW people developed Spry. But that's orthogonal to the issue. Regardless of who developed it, DW settled on Spry. Fact. Full stop. DW is for both designers AND developers. There are even two supplied "Workspace Layouts", so clearly, it's not /just/ for use by non-coding designers.

Adrock: I'd totally forgotten about <cfspry...>. Thanks.

I guess the biggest question I've been unable to find an answer for deals with upgrading the framework. It seems to me any Ext update has to come from Adobe through a CF upgrade. Surely one can't just drop the 2.0 js files on top of the 1.0 ones (or specify a directory containing 2.0 with the scriptSrc= parameter) and have it "just work". If it does, let me know and I'll have your baby!
# Posted By todd | 2/13/08 2:09 PM
Hey, is this a "todd only" forum?
# Posted By todd | 2/13/08 2:10 PM
Wow..I'm gonna leave most of that for Adam if he don't mind...

As for your last statement - as flattered as I am at your offer I think I'll pass on the 'having my baby' thing, but I just tested this and it worked. Copy /CFIDE/Scripts/ajax to a test directory, replace the Ext folder with the contents of Ext 2.0 and run the following code:

<cfajaximport scriptsrc="/test8/misc/testExt2/">

<cfsavecontent variable="stylesheet">
<link href="ajax/ext/resources/css/xtheme-aero.css" rel="stylesheet" type="text/css">
</cfsavecontent>
<cfhtmlhead text="#stylesheet#" />

<cflayout type="border" name="borderLayout">
   <cflayoutarea position="left" size="250" closable="true" collapsible="true">
   left
   </cflayoutarea>
   <cflayoutarea position="center">
   center
   </cflayoutarea>
</cflayout>

<cfwindow name="win" initShow="true" title="test win" center="true" closable="true">testwin</cfwindow>

It "just works"...

Now I'm sure there are some bits that are broken, but if you really want Ext 2.0, as I said above you do have other options. Hell, even the GWT/Ext2.0 bits could be taken advantage of with CF (since it's all Java).
# Posted By todd sharp | 2/13/08 2:28 PM
@"other" todd: I'm not so sure that without talking to Don, Kin, & the rest of the Spry guys at Adobe that you can say definitively that they "settled". There is a reason that they saw the space for a framework of their own. Yes, DW is for both designers and developers, in fact, I know a lot of people who don't have a design bone in their body that still use DW. However consider the first paragraph on the Spry site on Adobe Labs:

"The Spry framework for Ajax is a JavaScript library that provides easy-to-use yet powerful Ajax functionality that allows designers to build pages that provide a richer experience for their users. It is designed to take the complexity out of Ajax and allow designers to easily create Web 2.0 pages."

I don't know about you, but that makes it pretty clear to me who they are aiming at.

You can easily, as TS has shown, upgrade any of the frameworks. Is it the vendor's responsibility to keep on the bleeding edge of technology? I would say no. I think that a new revision to Ext or Spry should only be added after thorough testing and proof that existing implementations will not break. There's no need to upgrade for the sake having the latest and greatest.

Granted, I do think that the way that cfsprydataset has been implemented leaves much to be desired (very bloated and lots of unnecessary code). However, the goal is bringing AJAX to the server-side developer who does not have the JS skills to do it by hand in the views. With that in mind, I think there have to be some trade-offs (bloated implementations, etc) when looking for the middle ground as a vendor. Those that don't want to use the built in implementations and want it to be lean and mean will do so by hand. Those who are not as comfortable have the option to let CF do the heavy lifting. There are always trade-offs if you want someone else to do the work for you.
# Posted By Andrew Powell | 2/13/08 4:22 PM
I have to agree with Andrew that Adobe developed Spry to be easy for designers. Unfortunately, as a closed system (or so it seems), I don't see how to integrate it into situations where I don't have access to Dreamweaver, nor have I been able to tell if it allows for you to add features.

At my 9-to-5 job, I don't have access to Dreamweaver, so I learned jQuery, because I needed to manipulate data. I fell in love with it because I could write my own plug-ins. I think this is why moo-tools, jQuery, ext, etc. have done well with the developer/programmers.

On the other hand, I've shown designers the "simple" jQuery/ext/etc code, and they freak. I don't think they would do that so much with Spry.
# Posted By walter wimberly | 2/13/08 5:55 PM
I have not touched DW in over 4 years and plan on never using it again. With that said I use Spry a lot. You do not need DW to use spry and I think its a lack of spry knowledge on your part. I am also curious to know where you heard that you needed DW to use spry?
# Posted By Dan Vega | 2/13/08 6:02 PM
Go to Adobe Labs. You can download Spry there for use in any app you want. I have never used DW to develop with Spry for a web app.
# Posted By Andrew Powell | 2/13/08 6:05 PM
Well, I don't want to argue about the meaning of the word "settled". I'm using it as http://www.merriam-webster.com/dictionary/settled meaning 3a and 5b, which, considering there are built-in menu picks, buttons, documentation, and whatnot, they (DW) have, indeed, settled on Spry. And, considering there are no menu picks, buttons, documentation and whatnot for any other framework, they've (DW) has settled on Spry only. I'm not saying that's good or bad, it's just an observation.

And, no, it's not the vendor's responsibility to maintain the bleeding edge. That said, Macromedia didn't have the greatest record for keeping up with bug fixes, &c., and my experience with Adobe is that they're even worse (I'm looking at YOU <cfdocument>). But I'm willing to be convinced otherwise.

I guess what I'm really saying is that as both of these products are for rapid application development, lots of the "rapid" is immediately useless if one wants to keep abreast of things. Like, if I want to use <cfwindow> or whatever, I then have /no alternative/ than to wait for Adobe to fix a bug (assuming there is one) or update the thing. (I mean, it was almost 3 YEARS between CF7 and CF8.) That leads me to believe that it's not worth the risk of using any of the CF ajax taqs.

I mean, at least with a third party package, I can update the package independently of CF. And if I pick the right 3d party package, I can get the source code and fix any problems myself. (Assuming I'm good enough to do it!) :>

But it's a HUGE thing to have it built right into the framework. That makes my application development really, really rapid. I mean, <cftooltip> alone has save me all kinds of time. But the minute I use it, I'm tied to Ext/YUI 1.0. That makes me a little uncomfortable.

When I started this, as I say, I was just looking for some insight into when to use which package when. Like, "spry is good for large data intensive things", or "Ext is great for whizbang interactivity" or, you know, whatever. That's all.
# Posted By todd | 2/13/08 6:07 PM
Dan Vega | 2/13/08 6:02 PM:

I know you don't need DW to use Spry. But I do use DW, and Spry is built in, so it's an implied endorsement. I like to use endorsed products whenever possible as at least they've been vetted.

That said, I've used others. mxAjax for one. Prototype.js, for another. It depends.

I use DW because I've used it for a long time and I'm comfortable with it. It's what my clients use (at least those that use anything at all) and other clients use Contribute, which integrates well (for certain definitions of "well") with DW.

The project management and the proofing tools are nice as well. I mean I've got (counting...) 38 total project of which about 20 are on-going that I need to keep track of. It works reasonably well and integrates with the other products in the suite to an acceptable degree. And CS3 is an improvement over previous versions.

But this is about CF, so I'll shut up about that.

walter wimberly | 2/13/08 5:55 PM:
Thanks, that's the kind of insight I'm looking for!
# Posted By todd | 2/13/08 6:17 PM
I agree with all of what you say and especially this:

"Quite simply, the ColdFusion 8 Ajaxy UI components give you a very easy way to roll dynamic, powerful UI."

I pushed out a full ajax UI the other week very quickly and easily.
# Posted By Sam Farmer | 2/13/08 7:22 PM
@ other Todd:
"Ext/YUI can add 150k+ to a page. At that size, you can't include more than one framework and have the site usable."

I think you need to clarify this statement. This is totally based on your target audience. Ext's biggest benefit is the desktop-like feel and rest-assured that the people that are using it not only use Ext but other JS libs as well, and do so effectively. The key is the target audience. How do I know this? Because I'm part of the Ext team and I chat with our users daily. I know what's being built and where the limitations are.

I also benefit from being part of the jQuery project and seeing how that fits into consumer-facing sites which need to smaller file size to ensure good performance upon initial page views.

So i think your original statement was just a little too broad.

Finally, if you've had problems with Ext, could you clarify if you've had problems w/ the library itself or integrating other libs within CF's implementation of Ext? There's a critical distinction here as CF loads much more than Ext when using the CF8 tags

@Todd Sharp: I just want to caution users with simply dropping Ext 2.0 into the CF ajax folder. Ext 2.0 has some big differences in the API and in my discussions with Adobe, they've made it clear that upgrading isn't possible. With that said, you can always risk it to see what happens.
# Posted By Rey Bango | 2/15/08 1:11 AM
I didn't advocate dropping it in the /CFIDE folder - there is an option to specify an alternate script source with cfajaxproxy so that is what I was referring to. Of course I'd never do so without fully testing - and now that I think of it it may have worked because I merged the 1.x folder with 2.0 - which is not the 'right' way to do it.

Bottom line - if you wan't 2.0 and all the good/bad/indifferent that comes with it - roll ya own...agreed?
# Posted By todd sharp | 2/15/08 5:31 PM

cfunited08

cfunited08

Calendar

Sun Mon Tue Wed Thu Fri Sat
    123
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Subscribe

Enter your email address to subscribe to this blog.

Tags

actionscript ajax blogging cfsnippets coldfusion flash forms flex misc model-glue off topic personal project learn sql

Recent Comments

Hosting Advice Needed
todd sharp said: Must have been on a box that I'm not on. Thank goodness too, because all of my sites (this blog, cf... [More]

Hosting Advice Needed
Oğuz Demirkapı said: No. And the tickets are still open in support system. :) I think they had a big outage and still ... [More]

Hosting Advice Needed
todd sharp said: Did they say what caused such a long outage? [More]

Hosting Advice Needed
Oğuz Demirkapı said: VPS is back after 13 hours. :) [More]

Hosting Advice Needed
Oğuz Demirkapı said: 12 hours now since the server is down. :( [More]

RSS


coldfusionbloggers

FullAsAGoog MXNA

Consumed By Feed-Squirrel.com