Quote from: aNoble at Feb 14, 2006, 01:05 PM
TOXIC:
I’ve spent a good bit of time digging into it and trying to make it work for me. You can call any PHP object and (user created) method form JS. The only downsides at all that I see are there is no support for costructors (I think we could get around this with the new PHP5 reflection API but that would make it Tattoo only) or setting or getting object properties, the only existing backend is PHP5 only (but it should be simple to write one for PHP4), there are some a lot of potential security issues if you don’t watch what you’re doing, and it’s one man’s script and not an open source project.
Constructors and properties are not an issue in Tattoo -- every object property is protected and accessible to be get or set only via methods anyway, and all the constructors are empty as default values are all handled internally by the class. As for it being one man’s script, I have no issue with that, as long as it is a good starting point for the correct solution. I plan on implementing this functionality as an extension of the Resource class and Element class, so you’ll have an AjaxResource class that will handle AJAX requests to the Tattoo object model, returning the appropriate AJAX response, and it will be completely customizable by a developer anyway, by simply extending the AjaxResource class and overriding it’s methods.
Quote from: aNoble at Feb 14, 2006, 01:05 PM
I haven’t tried everything of course but so far I like Toxic. I think it wouldn’t be too hard to get constructors and properties working. If we could do that I think it would be amazing. Because Toxic is in such early development we might have to fork it and develop it ourselves but I don’t see that being a big issue if we’re looking for one AJAX toolkit that we are going to us across the board with MODx/Tattoo.
Hmmm, yep, the constructor/properties issue may be a problem when using MODx; that will most likely need to be solved to use in both... other thoughts?
Quote from: aNoble at Feb 14, 2006, 01:05 PM
XAJAX does look nice for smaller applicaitons but if you had to write wrapper functions for everything you’d want to use with AJAX it colud get to be a bit of a pain. It might be possible to write one reusable wrapper which could work out well.
Yeah, don’t particularly care for that approach, but might be more powerful in some cases. Perhaps a XajaxResource implementation could address that.
Quote from: aNoble at Feb 14, 2006, 01:05 PM
One other thing I’ll mention is there are a few javascript to php (and vica versa) serializers out there that can be useful if you want to roll your own solution.
Definitely a possiblity, though I see no reason to throw away all the concepts already provided in one of these existing frameworks; they’ll provide at least some good paper and tobacco to use in the process...