On some of my personal sites and other side projects I ahve used jQuery for all ajax calls and its really quite nice and friendly to work with.
While cfajaxproxy is quick and easy it's also a little heavy and forces us to re-setup the application to run correctly in our application.
What do you think? and what are you using?
I'd suggest jQuery.
ReplyDeleteOne of the many great things about CF is that it allows almost anybody to develop web apps quickly. If you need to implement a slick looking popup window and you don't know JS (jQuery, ext, mooTools, whichever), cfwindow works a treat.
But one of the side effects of "simple" is that it's limiting. There's only so much you can do with the "out of the box" functionality. For many, that functionality may be adequate.
Before I got into jQuery, I thought cfAjaxProxy rocked (even wrote a blog entry about it). Now that I"m familiar with jQuery though, I'd prefer to do the "heavy lifting" myself and know that whatever needs to be done, I can do. I'm not limited by the simplicity.
Thanks Charlie. I agree jQuery is totally portable. I also remember your jQuery and ColdFusion demos of http://www.learncf.com - http://tutorial44.learncf.com/
ReplyDeleteif cfajaxproxy works, keep using. Less JS to maintain is always good.
ReplyDelete@Henry Sure it works but that's not the point. If you have used cfajaxproxy you'll find that you do actually have to write alot of your own JS function the same as if you used jQuery. Personally I don't see it as suing a great deall less js then coldfusion alone.
ReplyDeleteI use both. We use cfajaxproxy to bind to CFCs then utilize those objects with jQuery functions. I have two pages that I've built that mixes and I found that I really mixed the two together pretty well and they've become very complimentary features.
ReplyDeletejQuery - you can know exactly what is going on. I use it with my CFCs with returnformat=json. The only pain if CF pretty much returns all data as strings - even with CF9.0.1 update.
ReplyDeleteFor me Adobe could get rid of all the client side stuff in CF and focus on making it lean/fast and handling heavy lifting/services etc.
If you take a look at something like the file uploader in CF it is huge - over 100k as I recall. That's just silly stuff.
We use both - AJAX Proxy to set up the initial links and then jQuery to utilise them. We're moving more towards pure jQuery though as time progresses just to avoid loading 2 lots of Javascript libraries.
ReplyDeleteWe use both as well. I like the ability to have JQuery interact with the proxy CFC seamlessly. It is a cool way to develop, mixing CFC classes with JS.
ReplyDeleteHave no problem with CFAjax and Jquery too. But I use CFJAAX
ReplyDeleteThere is no solution to getting around the application scope issue you describe. But first lets look at cfajaxproxy, this is using the same ajax request that both ExtJS and jQuery use.
ReplyDeleteSo whether you are going with ExtJS Core, or YUI, Dojo, jQuery or any other framework you will have the same problem as they all use the same http ajax protocol.
So regardless of your solution in the long run, you will still have the same problem when dealing with using the application scope.
Usign jQuery to a cfc thay resides in the root will give full access via ajax to the application scope. cfajaxproxy will also give access to the app scope as long as the cfc resides in the document root ( ie not a mapping ).
ReplyDeleteEither work well but jQuery is more portable.
Paul they all use XMLHttpRequest, and they all will have the same problem with creating a new session.
ReplyDeletesession != application Andrew
ReplyDeleteThe all create a new application session.
ReplyDeleteNo they don't
ReplyDeleteWell my comment got chopped some how.
ReplyDeleteSo here it is again.
When dealing with cfajaxproxy there are certain conditions that WILL create a new session (not Application but browser session). As CFAjaxProxy uses XMLHttpRequest() as does ExtJS, ExtJS Core and jQuery they all will suffer this problem.
A browser session is not a application session so I'm really not sure what your point is Andrew.
ReplyDeleteWith the way our application is setup we can NEVER fix this with cfajaxproxy and the way it handles virtual directories but we could with jQuery.