We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34127
    • 135 Posts
    This question has been bugging me for awhile, since I really got into moving my scripts over to MODx, and I thought I should ask before I got into further developing my current project, and future ones.

    Basically, I have a database filled with about 1500 items (with a few being added each day), with specific details on each one. The app has both a "backend" or manager-type interface where certain people can add/edit/remove items; and a "frontend" for searching through records. Currently, it doesn’t use ANY AJAX at all, and I figured it could jazz it up to make it both fast, and unique for my users rather easily by taking advantage of AJAX. I was thinking about basing the manager panel completely around AJAX... adding/updating items would be AJAX-ified, looking up an item for editing would be AJAX-controlled, and a "submission" panel for sending in corrections to the "db managers" would be all AJAX. The frontend would be the same: The main page brings up all of the records (paginated, naturally), doing a search would perform an AJAX-search and display all of the results below the search box and clicking on an item would replace the searches with the actual item’s data (ie. no page loads at all). cool

    I mean, it seems like it would be simple to do, and to keep it backwards-compatible for browsers without AJAX/JS support. But is it practical? Is there anything wrong with doing this? Is there really a such thing as "too much" AJAX, and would this be one of those"too much" instances?
      • 6726
      • 7,075 Posts
      I wouldn’t know about how many instances would slow down things to a point where your using AJAX would impair the interface... but as in anything you use for webdesign the question is : what is gained ? For each item you ajax-ify the question is will it really improve the user experience or is it "just" sugar-coating (not that sugar coating is not good, just not always worth the additionnal effort) ? how does it affect performance ? Last but not least : how long will it take to implement (you have to balance time investment with added value) ?

      My two cents...
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 34127
        • 135 Posts
        I see what you’re saying: so AJAX should be used to enhance what you’re doing. I think I had the wrong idea before... maybe having the whole thing use AJAX is a bit much, and although it might look cool, it might not be the best idea. I actually read a blog entry someone posted about overusing AJAX, and I realized that my original idea would break the functionality of a browser (forward and back buttons), which is not what I want. Perhaps a sprinkle of AJAX would be better after all. laugh
          • 34017
          • 898 Posts
          A great example of useful AJAX is Basecamp by 37 signals. I think there is a free version or a demo. It’s ajax use is perfect for their program.

          Chuck
            Chuck the Trukk
            ProWebscape.com :: Nashville-WebDesign.com
            - - - - - - - -
            What are TV's? Here's some info below.
            http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
            http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
            • 6726
            • 7,075 Posts
            37 signals sure is a benchmark and an example to live by...

            eleventeen : not saying you shouldn’t use too much AJAX, the main thing is, to make sure everything degrades well for those who have js disabled... although one might argue if it’s not frontend but an application, having js enabled is not a very demanding requirement given the benefits...
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 32942
              • 141 Posts
              Do everthing which makes your customers more happy smiley
              AJAXi-fying everthing wouldn’t make all of your customers happy.
              Slower loading times, bad user experience with old browsers and MS Browsers.

              I think finding the balance between usefullness and stylishness is already hard enough, so I would ask someone who doens’t know anything from programming etc.
              They can tell you if they like it or not, if it is too slow or just *wow*.
              All in all, it’s hard to stop for all of us to "enhance" the basic skeleton of our applications.
                • 4971
                • 964 Posts
                Maybe it is just a case of competitive advantage... if your competition is just doing
                vanilla designs with no AJAX whatsoever... you can show off some AJAX functionality
                to your customers to WOW them and sometimes that is all it takes to gain an account.
                If the customer just wants vanilla, well you are already there and should offer other
                added value stuff to win the account...
                  Website: www.mercologia.com
                  MODX Revo Tutorials:  www.modxperience.com

                  MODX Professional Partner
                  • 34127
                  • 135 Posts
                  Quote from: Xsss4hell at May 23, 2007, 06:27 PM

                  Do everthing which makes your customers more happy smiley
                  AJAXi-fying everthing wouldn’t make all of your customers happy.
                  Slower loading times, bad user experience with old browsers and MS Browsers.

                  I think finding the balance between usefullness and stylishness is already hard enough, so I would ask someone who doens’t know anything from programming etc.
                  They can tell you if they like it or not, if it is too slow or just *wow*.
                  All in all, it’s hard to stop for all of us to "enhance" the basic skeleton of our applications.

                  I think that’s a good way of putting it... they most definitely wouldn’t be too happy with an all-AJAX interface. I think I’ll keep it simple with just a few features being AJAX-enabled.

                  @Charliez: That’s actually part of the reason I wanted to do this - to make something unique to impress my site users and to hopefully win over some of the competitions’ userbase as well. Most of my competition makes little or no use of AJAX, so I thought this would be an awesome way to make people say "wow, that’s sweet". But even using AJAX for a few small things might get that "wow" effect from a lot of people, I think. smiley
                    • 34127
                    • 135 Posts
                    I actually have a question about using AJAX with MODx. At first I was thinking about putting my AJAX-specific function inside my PHP class file so it would have access to certain functions and the MODx API. That doesn’t work, because it looks like the entire page is outputted as the responseText. So I tried just moving those functions to a separate snippet, and calling it from a page without a template, but from what I understand about MODx, a whole lot of unneeded stuff will be loaded if I do this, which means it probably won’t be as efficient as it could be. The only other way I can think of using AJAX with a script would be to have it as an external script and call the script during the AJAX request. But then there’s no access to any of MODx’s database functions... nor any of the user/group functions, which could be an issue with the admin-side AJAX stuff. Is there something I’m missing? Thanks! smiley