Recommend this page to a friend! |
CDA Cross Domain AJAX | > | All threads | > | CDA vs. jsonP | > | (Un) Subscribe thread alerts |
|
|
![]() CDA vs. jsonP
why CDA if jsonP does it too - there are two main reasons.. I often injected script tags to load app-parts - I used some dirty JS for it - CDA is the same merged in a jquery-plugin.. 1. jsonP needs your server response as json.. => no functions / no app code => only raw data in json-format wrapped in a function call "one" (1) function call for all, you wanted to have from the server.. CDA does allow your server-response to be all that is allowed in a JS file, if it's valid JS, CDA can call it So you can call a complete application on user request form remote. For example, one that starts a syndication display of videos. With search function.. jsonP can't do more than the search result - but not the app itselfe.. With CDA, loading a complete app, even some more plugins later, should not be an issue.. ok - one could use normal script-tags to load it. True in most cases - in my work with embedable apps, I often needed user-/site-licenses to be verified first before I load/execute the app code. Or I needed "plugins" to be loaded on user request - jsonP was not much help there.. 2. jsonP has no error handling if the injection fails With CDA, that should not be an issue. CDA was developped to be able to confirm that your data is there, before continuing the programm - if you fear it may fail, you can even implement a timeout and re-call the data if it does not report in. This is easely accomplished in the waiter-helper.. This is how I understand the differances.. Since I didnt work a lot with jsonP I may be wrong on some details.. you know - I seldom need only json data mostly I need app-extensions to be loaded on runtime.. - I intend to use CDA to eleminate Iframes from apps like this one.. heavenlyhostnet.net/Free-Virtual-Bi ...Here all my embeded script does at first is call an iframe to show the AJAX app.. jsonP didnt help me with this at that time.. With CDA, getting rid of the iframe, should not be an issue.. I hope that clarification was informative for some of you.. I'm aware, that those are subtile differences and not everybody runs into trouble with that - but I did reguarly in my syndication work.. Note: I quoted tech stuff about jsonP from here: remysharp.com/2007/10/08/what-is-js ...
![]() The package forum is more for your package users ask questions or other type of support inquiries. If you post information like that in the forum, your users will hardly see it.
If you want your users to see it, you should use your package blog to post that information as an article. Additionally, you can flag the article as featured, so it becomes a candidate to appear in the JSClasses site blog and many other people see it. Go ahead, submit this information as an article here: jsclasses.org/blog_post.html?packag ...
![]() Greetings, Herr Hartmann.
I think CDA is a revolutionary and brilliant idea, and I was thinking of delving deeper into it. Unfortunately the server hosting your demo appears to be down. Ishould be grateful if you would post the complete package including the server side demo files also so that I could get a better grasp of the script's capabilities as a layman. Thanks. |
info at jsclasses dot org
.