We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    Should we consider incoporate XAjax into MODx?

    It can be use to integrate with our Ajax from prototype library.

    The beauty of XAjax is it is just a PHP so we can write any php call and register to XAjax, boom it become a Ajax function. It is powerful stuff!

    See this link for more info on this project: http://community.xajaxproject.org/

    What do you think?
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: chanh at Feb 14, 2006, 11:09 AM

      Should we consider incoporate XAjax into MODx?

      It can be use to integrate with our Ajax from prototype library.

      The beauty of XAjax is it is just a PHP so we can write any php call and register to XAjax, boom it become a Ajax function. It is powerful stuff!

      See this link for more info on this project: http://community.xajaxproject.org/

      What do you think?

      Compare and contrast with Toxic and Sajax...

      http://www.dotvoid.com/view.php?id=39 (immature, but promising, and very lightweight)
      http://www.modernmethod.com/sajax/ (more mature, but heavier)
        • 34162
        • 1 Posts
        Toxic license is restricted you can not sell your product with Toxic in it

        "The license is "free for all purposes except if you try to charge for Toxic itself".

        I am aware of Sajax and it is good too but it does not have the ability to easily integrate with other Ajax library like XAjax does.

        In matter of fact Sajax was my first choice until I discover XAjax.

        PS: XAjax recent change the license to BSD so you can do whatever you want with XAjax.
          • 32241
          • 1,495 Posts
          Thanks for the info Chanh.

          We might be able to have this at the top layer of MODx core, like a MODx third party library maybe?
          We can have one single plugin to include all the necessary library to be used on the desired MODx page, depending whether we want to use it or not. Or we can just use require_once to incldue those lib, don’t you think? Maybe by the time the new MODx manager come out, we can use the library being used inside the manager to achieve some AJAX functionality on it.
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 34162
            • 1 Posts
            I also want to add the XAjax developers are super helpful and freindly!
              • 25663 MODX Staff
              • 12,272 Posts
              Super helpful and friendly is good. But it sounds like as long as you give Toxic away, it’s ok to include with anything. I.e., you can’t charge for the Toxic part of a solution.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 1764
                • 680 Posts
                I suppose I shoud jump in on this one. I’ve looked into quite a few AJAX toolkits and definitely haven’t found one that I’m 100% happy with (or even 80% happy with).

                XAJAX:
                All PHP driven which is nice. But it can only access functions and methods that were written with it in mind.

                SAJAX:
                Seems nice but I don’t think it has any support for accessing objects and methods.

                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.

                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.

                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.

                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.
                  • 22303 MODX Staff
                  • 10,725 Posts
                  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... wink
                    • 1764
                    • 680 Posts
                    Here’s another interesting one to look at. I’m not so sure I like it much on a whole (no object and method support) but the data type serialization sounds very nice.

                    Ajax Agent supports complex data types like associated arrays & objects. It makes use of JSON (JavaScript Object Notation) for data interchange format to achieve this.

                    http://ajaxagent.org