We are moving away from cfajaxproxy towards jquery...
# cfml-general
We are moving away from cfajaxproxy towards jquery post/gets. For something simple like user validation, with cookie clearing, would using the current code in a rest CFC make sense rather than the cfajaxproxy? Sorry if this is stupid, obvious or way out there... 🙂
Just a plain old CFM file works just as well! Less moving parts etc etc
👍 1
I'm certainly of the school to use a CFC to make things run smoothly. If you are planning on returning anything, CFC is the way to go because you can specify what you want to return (i.e. json). You can certainly do it in CFM but it's NOT really meant to do that. Just my humble opinion.
👍 1
So, if the CFC already exists and was being called using cfajaxproxy and then calling the function, are there changes necessary to make that same call with jquery?
It might help to consider that most of what cfajaxproxy is doing is acting as a wrapper for equivalents of jquery's own wrapper for making async HTTP requests. cfajaxproxy and jquery are equivalents in this mix. Not direct mappings, but equivalents. They're doing the same job, with different implementations. If your CFC method on the server side currently fulfils the processing requirement you have, then... yeah... it's still doing its job. You should still use it. Remember that the CFML code doesn't know what's calling it or how... it's just being told by a web server "here... see what you make of this, and flick me back a response". It's irrelevant what the mechanism is that gets the request from the client to the web server.
👍 2