We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I’ve done application development, just never inside of MODx... and some of the things I’m running into are new to me.

    First, I’m trying to get just a static version of my module working... no problem... but I’m wondering if I should build this from the get-go to use one document and include the various component pages via a frame (e.g. if my module has several tabs, should I build my pages to be 1.html, 2.html, 3.html, or as a single frameset that includes those pages). I’m just wondering what difficulties lie ahead once I put it into the manager.

    Secondly, what thoughts do people have about storing large sets of data returned from the database? E.g. if there’s a big query that runs on page 1.html (or in that frame), and then you navigate away and come back, I don’t want to have to run that query again... the obvious solution is to store the data, but where? In a cookie would mean it loads faster for the user who requested it because it’s stored locally on his/her machine, but .... meh... cookies. Sessions are easier to manage, but then the user has to download that data again (but at least he doesn’t have to hit the db).

    Thoughts? Concerns? Please, hit me over the head now before I wander down a wrong path.

    Thanks!
      • 34017
      • 898 Posts
      what about using javascript to load the different tabs? thats what docmanager and docfinder do. you could use the jquery.ui tabs widget to get going fast.
        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
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        I have working tabs. The problem is that all the data from each tab cannot live on a single html page because I’m potentially dealing with huge data sets and very long database queries, so it’s a requirement to have the data live on its own separate page. I’ll check out the jquery library... I’m not sure if that helps me figure out where to store all that data so I can avoid hitting the db more than I need to... granted, I have only scanned the jquery page, but the first example I saw on there won’t work for me because the content from each tab lives on a single page (just like the MODx resource manager, for example). I’m dealing with too much data for that to be practical.
          • 34017
          • 898 Posts
          what’s the application flow here? how does page1, 2, etc work together?

          im sure you’ve thought of this, can you not use js/ajax pagination to only get 25 or 100 rows at once?
            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
            • 9207 ☆ A M B ☆
            • 2,475 Posts
            lol... no, I’m kinda dense, and I’m a noob with AJAX and I avoid Javascript whenever possible... I do mostly back-end work, in PHP or MySQL, and I’m not good at all with this stuff.

            You can think of each tab as housing the results from different queries... they aren’t related other than in the type of queries they are. No interaction between the pages is necessary, thus my current draft of having the tabs be entirely a cosmetic formatting for the menu. I am thinking of using AJAX to insert the rows from the resulting query into a div on each page... that way I can have a nice animated timer (good for long queries) and I can update the page cleanly... I suppose I could do the same type of thing to simulate the effect of tabs. I’m still working on the nature of the UI and cleaning up my queries, but I know I’ll be cleaning things up here soon.

            Thanks for the input!