Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Persisting an XML File throughout site usage

Options
  • 02-11-2005 4:41pm
    #1
    Registered Users Posts: 3,548 ✭✭✭


    I am developing a web app which will return a set of Database results to the user in a table on screen. The results will be returned in XML format from the database.

    One of the columns in the table on screen will be a link to more information on that particular row. I want this link to reload the same frame as the original table, only with the more in depth analysis of the row.

    However, I am having trouble deciding how best to store the XML File across the multiple pages.

    I think the viewstate or Session object might give me scalability issues as the XML results could be very large.

    Does anyone have any further suggestions? I dont really like the idea of saving the XML File on the server, as there could be thousands of queries a day potentially.

    The Cache object seems appealing. Does anyone have any thoughts on using that?


Comments

  • Closed Accounts Posts: 2,046 ✭✭✭democrates


    I've no experience of it but maybe this might be of some help if you haven't read it already: http://www.devshed.com/c/a/PHP/Caching-Result-Sets-in-PHP-Object-Interaction-Within-a-Caching-System/
    Will read it myself when I get time as it looks like a possible solution to something else I've been contemplating.


  • Closed Accounts Posts: 324 ✭✭madramor


    Draupnir wrote:
    I want this link to reload the same frame as the original table, only with the more in depth analysis of the row.

    1:
    The best way would be to open link in a new frame\window and don't store
    the xml, only keep it persistant in the browser window.

    2:
    if you did store it somewhere,

    How would you know when to clear it, most people close a window
    or move to another page rather than using the logout button.

    Thousands of queries + unknown sizes is always going to be difficult.

    3:
    another option is to re-run the query each time.

    4:
    you could also write a script function in the html that stores a copy
    of the xml and when a users clicks a link it calls the function
    that passes the xml to the server along with the link details.


  • Registered Users Posts: 640 ✭✭✭Kernel32


    It sounds like you are using .Net but that's not clear. My response is all related to .net so ignore if its irrelevant.

    Whether or not to cache something is driven by how often it gets refreshed. If we are talking about an XML file that's not refreshed often then yes you should cache it and there are various options.

    1. File system, nothing wrong with it. If its accessed often then it will be cached by the web server anyway.

    2. Cache object is another choice. It can be stored in memory and have a file watcher dependency.

    3. Httphandler that returns the XML output which could be from memory, from disk or from database.

    As for the drill down stuff. Get yourself an AJAX enabled grid control. Infragistics have a nice one now with their latest release. You can bind to an xml source and have it hierarchical. When a top level node is expanded the underlying xml is streamed from the server using a JavaScript async request and rendered client side using an xslt transformation.


  • Registered Users Posts: 3,548 ✭✭✭Draupnir


    Yeah I am talking about .NET here.

    Basically I want to provide the grid of XML results to the user as the first screen after their query. That is no problem and I know how to do that.

    Secondly I want them to be able to use a link from the results to reload the frame with the more detailed child nodes of the row.

    But my problem is letting the user go back to the first screen from their. Im not sure how to reload the first frame.


  • Registered Users Posts: 131 ✭✭theexis


    Sounds like you already have all the data in the Xml doc originally retrieved; you're transforming this into a table based layout so why not simply transform everything and hide the "detail" in a div section. Put simply java script in the parent link to show/hide the div and you won't need to leave the page or hit the server again.


  • Advertisement
Advertisement