We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15510
    • 70 Posts
    I’ve been reading up on Ext and have seen some interesting talk on server-side code being developed to enable even richer development environments. Claims are to allow for direct server-side calls from the client among other things. Does Revolution include such features or is it more accurate to say that the server-side is about the same for Evo/Revo with respect to Ext?



    (If this question comes across as an insult to the development team, please be assured that it is only because of my own ignorance of the subject.)
      • 22303 MODX Staff
      • 10,725 Posts
      Do you have any references for these claims of "direct server-side calls"? I’m not sure I understand what you are asking about, but I can safely say Evo / Revo are not about the same, with respect to ExtJS or anything else.
        • 28215
        • 4,149 Posts
        Quote from: kc64 at Jan 09, 2010, 04:01 PM

        I’ve been reading up on Ext and have seen some interesting talk on server-side code being developed to enable even richer development environments. Claims are to allow for direct server-side calls from the client among other things. Does Revolution include such features or is it more accurate to say that the server-side is about the same for Evo/Revo with respect to Ext?
        Server-side code? Do you mean Ext code generated by PHP? If so, yes, there are some examples of that, but we did try to keep it far and few between, simply to make more flexibility in the manager UI.

        "Direct server-side calls from the client"? You mean AJAX? If so, there is tons of AJAX...I guess I’m unclear as to what you mean by this.

        Evo does not use ExtJS, by the way. Revolution’s manager UI is built on top of ExtJS.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 15510
          • 70 Posts
          @ OpenGeek:
          After searching, I haven’t located the reference for the site that prompted my question. I’ve done so much reading recently, it has eluded me presently. If I come across it soon, I will forward it along. Without the reference, my mentioning it doesn’t help at all.

          @ splittingred, OpenGeek:
          The Ext site talks about the need for server-side support for the Ext client and discusses PHP, Python, ASP.NET, etc. I’m hoping that the server-side support in PHP will be MODx Revolution. It seems that you guys will have taken care of that part of the solution to make Ext/MODx/AJAX solutions work together even nicer than the parts by themselves. Just trying to get a basic structural view of what will be, in my humble opinion, the slickest CMS offering available. There is so much to learn, though, with all of these converging technologies for someone who is fairly new to all of them, that it becomes a bit daunting.

            • 17499 ☆ A M B ☆
            • 872 Posts
            Extjs is a javascript framework, so it works on client side most definitely.

            However, i think your talking about GWT Ext version which is also available on the ExtJS website, and offer server side development with java trough GWT using similar components of the main Ext project.

            Two years ago (before the Ext Team decide to change their licence), some people started to build a PHP wrapper for Extjs like GWT but the project does not seems to be really anymore.

            See here for more informations.

            I think i would not like a solution like that since it will merge front and server side code too much and grieve the modular capacity of the manager.
              • 15510
              • 70 Posts
              I think this is what I read that got me asking the question:

              From extjs.com, "Call server-side methods directly on the client-side, eliminate code, and boost productivity."

              This is a tagline for Ext Direct which is described here http://www.extjs.com/products/direct/?ref=family. Perhaps I was too tired and asked the question prematurely.

              kc64
                • 15510
                • 70 Posts
                So, I’ve come back around to this topic again. I hope you can help me.

                What is the best way to develop ExtJS back-end code?

                Are there MODx API functions (in Evo or Revo) to support ExtJS apps that require data stores, etc?

                When I needed database access in my app, I used MODx DBAPI. When I need an ExtJS data store to populate a tree or grid, is there a MODx Ext API library that can help or should I write my own functions?

                I’m also wondering what are the best-practices for back-end coding. Should I write my PHP functions as methods in a application-related code module? Should I treat data source handlers as static methods and call with $obj::method rather than $obj->method?

                In an AJAX application, when does the session expire such that the instances of classes are destroyed? My guess is that the instances will persist until all AJAX requests terminate. Is this correct?

                Thanks.
                  • 28215
                  • 4,149 Posts
                  Quote from: kc64 at Apr 26, 2010, 11:44 AM

                  What is the best way to develop ExtJS back-end code?
                  Are there MODx API functions (in Evo or Revo) to support ExtJS apps that require data stores, etc?

                  First off, I recommend you read on Custom Manager Pages (CMPs):

                  http://svn.modxcms.com/docs/display/revolution/Custom+Manager+Pages

                  Then, MODx uses a wrapper around ExtJS we call "MODExt": http://svn.modxcms.com/docs/display/revolution/MODExt

                  It can be used to provide connectivity to processors, which would power your ExtJS-based CMPs.


                  When I needed database access in my app, I used MODx DBAPI. When I need an ExtJS data store to populate a tree or grid, is there a MODx Ext API library that can help or should I write my own functions?
                  You should take a look at Quip, or Gallery, or any of the other Extras that have their own CMPs. They detail how this can be done.

                  That said, you are free to do it however you want.


                  I’m also wondering what are the best-practices for back-end coding. Should I write my PHP functions as methods in a application-related code module? Should I treat data source handlers as static methods and call with $obj::method rather than $obj->method?
                  You should use xPDO and take advantage of processors.

                  In an AJAX application, when does the session expire such that the instances of classes are destroyed? My guess is that the instances will persist until all AJAX requests terminate. Is this correct?
                  Incorrect - ajax requests are asynchronous and non-persistent. So if you instantiate a connection to the server with an AJAX request, it runs the PHP script, and then feeds back the output, just like a normal PHP page.
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 15510
                    • 70 Posts
                    @splittingred:

                    Thanks for the thoughtful response. I appreciate it.

                    It sounds like your recommendations are all Revo-based. I’ve done most of my work with Evo waiting for Revo to be officially released. Sounds like I should probably switch over for this application. Hey, what’s another learning curve? [JS, PHP, ExtJS, MODx Revo] smiley
                      • 17499 ☆ A M B ☆
                      • 872 Posts
                      Quote from: kc64 at Apr 26, 2010, 12:15 PM

                      It sounds like your recommendations are all Revo-based.

                      That’s because only Revo’s backend is built with ExtJS.
                      Evo is built with jQuery.