New module for testing - XajaxInterface - background JS calls to PHP

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
100rk

Re: Xajaxinterface

Post by 100rk »

Hi Sjg!
sjg wrote: Can you upload this to the Wiki?
Of course I can, but this module was created for testing and demonstration purposes only and module section in wiki is not divided into categories yet.. To be honest, I really don't have time to be 'in touch' with CMSMS, so I can't be responsible for development of this module - I do not want walk in piratos steps, You know... ;-) So - if You make some usable module with xajax and/or 'xajaxinterface' code, just do it instead of me, please.
sjg wrote: If I use it as a dependency...
If You want to use it in CMSMS, I recommend to You wait a few days or weeks - this version of xajax is still beta and it still doesn't contain object oriented functionality (You can register procedural functions, but You can not register object methods) - this feature will be added in next version (or try some of 'patches' from xajax forums on sourceforge.net). For all informations about xajax try to read those forums - there are some xajax limitations and bugs, of course. IMHO one of biggest problems is this AJAX project do not work in Opera browser.

Hi, 100rk.
Last edited by 100rk on Thu Sep 22, 2005 11:02 am, edited 1 time in total.
User avatar
sjg
Power Poster
Power Poster
Posts: 310
Joined: Thu Jan 27, 2005 5:11 pm
Location: Los Angeles, CA

Re: New module for testing - XajaxInterface - background JS calls to PHP

Post by sjg »

Of course I can, but this module was created for testing and demonstration purposes only and module section in wiki is not divided into categories yet.. To be honest, I really don't have time to be 'in touch' with CMSMS, so I can't be responsible for development of this module - I do not want walk in piratos steps, You know... wink So - if You make some usable module with xajax and/or 'xajaxinterface' code, just do it instead of me, please.
OK. Thanks. I may well end up migrating some of your code into other modules (or even CMS MS Core!). I didn't want to "steal" your work without proper discussion :)

So let me ask for some further recommendations. I've taken a cursory look at PEAR::AJAX_HTML, NAJAX, Pajax, AjaxAC, and SAJAX. Whew! It doesn't seem to me that any of these libraries have the feature set that xajax does.

When I think of the kinds of things that I want to use Ajax for in CMS Made Simple, it's primarily dynamic form stuff. The things that look interesting to me are adding an option to "autosave" when editing content, drag-and-drop assignment of permissions, and live validation of paths (during install). It looks to me that xajax has the best library of features for form handling. Do you agree?

Thanks again,
___Samuel___
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
100rk

Re: New module for testing - XajaxInterface - background JS calls to PHP

Post by 100rk »

sjg wrote: It doesn't seem to me that any of these libraries have the feature set that xajax does.
I agree. I like simple tools - like a hammer, CMSMS and xajax ;-)
sjg wrote: It looks to me that xajax has the best library of features for form handling. Do you agree?
Yes, in case:
  • You do not want to handle file inputs
  • You do not need multiple - there is a bug with xajax function xajax.getFormValues('XYZ').
  • You do not need synchronous calls
  • You do not need a lot of example code - xajax is pretty young project
ad 1)  Uploads can be still easily done with hidden iframe (and with patched version of PHP You can make upload progress meter)
ad 2) I mean You can code Your html like this:

Code: Select all

<a href="#" onclick="xajax_processform(xajax.getFormValues('testform'));return false;">XYZ</a>
After click on this anchor will be called Your php function 'processform()' with array of values from form with id 'testform' as parameter. But this function can not handle multiple inputs in this time.
ad 3) some of other AJAX libraries can do it

BTW: in module xajaxinterface are all registered functions (filenames and function names) stored in session variable without any tests which page is currently displayed. It is not clear way how to do this - remember: testing purposes only - I am using CMSMS as tool for testing fragments of my php code (I am using AdoDB && Smarty in my projects). In this case You have allways registered all functions on every page in during Your session - IMHO it is unwanted feature, if You want to take xajax seriously ;-) And also: IMHO direct calls of file XajaxInterface.module.php is definitely bad way - it has to be a class definition only.

I like xajax also because of its license - LGPL is better for me then GPL (this is one of reasons why I can not use CMSMS for my real work). Anyway: BSD license WINS (BSD is almost theology for me), but SAJAX is too complicated for my purposes and I hate JavaScript coding :-)
Last edited by 100rk on Tue Sep 20, 2005 10:59 pm, edited 1 time in total.
Locked

Return to “Modules/Add-Ons”