Results 1 to 2 of 2

Thread: Weekly or Daily "dynamic" updates

  1. #1
    Join Date
    Feb 2011

    Weekly or Daily "dynamic" updates

    Hi all,

    I'm in the process of updating my course websites (I'm a math professor) - mostly just for fun, but also to make them easier to maintain on a day to day basis. Anyway, right now I have a bunch of php scripts which read csv files and display relevant data (like announcements, the next homework assignment, etc) based on the current date and the dates listed in the csv file. I'm planning on moving to XML files or an SQLite database, but that's another story.

    My question is about the best way to sift through the data. Right now, the php scripts run everytime a user navigates to the particular page. This means reading all the data into a 2D array, and the displaying the relevant entries. There are no problems with this - I don't have very many readers, and there isn't that much data. But I'm wondering if there is a better way.

    Since the "current" data only changes twice or three times a week, it seems wasteful to parse all the data every time a user loads the page. Instead I could perhaps create a current_data.xml file the first time any user accesses a page since the most recent class period. So for example, if a homework set was due on Tuesday, the first time anyone browses to the site on Wednesday, a script runs updating which data is "current" and then I just use that data until the next class period. I would need to check the date each time the page is loaded, but I'm doing that anyway. The difference is I'm not parsing the data every time - just once.

    Is this something worth pursuing?


  2. #2
    Join Date
    Feb 2011
    Wiltshire, England
    Yes the way you have described deffinitly makes sense however "If it's not broke, don't fix it" if the servers performance is fine and the load time isn't effected then your better off leaving it as it is.
    If ever in doubt about a threads purpose report it and let webdev mods or admins be the judge. If we don't know we can't help.
    "Coffee is the saviour of mankind!"
    Web Design Wiltshire
    My Blog

Similar Threads

  1. Dynamic "You-Are-Here" Indicator (JavaScript, I think)
    By Incizion in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 28 Nov 2009, 10:10 PM
  2. Non-js dynamic choice of "action=" in forms!
    By djlebarron in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 27 Jun 2009, 11:05 AM
  3. How to set up "register/ log in" & user friendly "upload/download" feature on my site
    By trumpeter in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 28 Jun 2006, 05:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts