in reply to Global program flow

Hi guys, First of all thanx for the feedback! Not to start different threads on all replies I'll just express my thoughts in this one. If I've missed one of your points, please tell me so.

I had a quick look at Apache::ASP and CGI::Application, and turning the picview script into a module seems the way to go (for now anyway). Not to mention the sh*tload of challenges that come with it .. :-)

Correct me if I'm wrong but the Apache::ASP looks like PHP, which I particularly do not use.
Please enlighten me on why Apache::ASP is a good choice combined with SSI?

Also the MVC provides a good piece of reading material and an intriguing view on things. I'm using a webengine developed by a friend of mine, that really fits the profile to be turned into a module as well, but first things first. This one had me going http://ootips.org/persistent-objects.html, and wil be read in the train to work. When am I ever gonna sleep again .. :-)

One final note on why I didn't just created static HTML pages to all pictures. That's how the script was born in the first place. I'm very systematic and tidy (no to say obsessive). First time I found pictures and thumbs online there was a directory with 50 pics and a thumbs page that had fifty links to 50 pages all with one IMG tag to one picture. So at the time I thought that was to static (read: messy .. ;-)). So an intelligent script was the solution. What I want it to do eventually is monitor a directory for incoming pictures and have the script do the whole thumbs thing by itself. Practically: I have a cell phone with a camera; I take a picture; I send it to an email adress; After XX seconds you can view the picture online (with a thumbnail and description ofcourse).

It's not an application that would improve the world, but I just thought it would be fun for people to see what I do when I'm on holiday for instance.

That's it for now. Looking forward to your replies. Hope you can still find the questions up here somewhere.

Kind Regards,

Gerard.
~
~
:wq!

Replies are listed 'Best First'.
Re^2: Global program flow
by Anonymous Monk on Feb 15, 2005 at 11:58 UTC
    One final note on why I didn't just created static HTML pages to all pictures. That's how the script was born in the first place. I'm very systematic and tidy (no to say obsessive). First time I found pictures and thumbs online there was a directory with 50 pics and a thumbs page that had fifty links to 50 pages all with one IMG tag to one picture. So at the time I thought that was to static (read: messy .. ;-)). So an intelligent script was the solution. What I want it to do eventually is monitor a directory for incoming pictures and have the script do the whole thumbs thing by itself. Practically: I have a cell phone with a camera; I take a picture; I send it to an email adress; After XX seconds you can view the picture online (with a thumbnail and description ofcourse).
    Exactly. No need for CGI or another form of pages generated on viewer demand. You'd only generate new pages (and update any indexing/overview pages) whenever a new picture arrives. Seen from the server (and hence the viewer), that's static - the pages are there before the viewer requests them.
      Dear Anonymous Monk, I'm sorry but I'm missing your point. Are you saying to have a cyclic script just check and create html pages? Instead of the on demand script all together? Regards, Gerard.
      ~
      ~
      :wq!
        What is a "cyclic" script?

        What I would do (well, what I do), is generate new, or changed, picture albums if something changes. I can just call my build script and it'll figure out whether there are new pictures, or modified options (descriptions, cropping parameters, whatever) to pictures, and it (re)builds the corresponding html pages, thumbnails, preview, and display size images, adjusting the navigation pages if necessary. Without parameters, it just checks all, but I can also tell it to check certain albums, or even certain images.

        Now, I do this by hand because I copy the images by hand from my camera to the machine. But having it trigger from the arrival of an email would be simple (takes, oh, one line to call an external program in about any language, doesn't it?).

        I mean, if I have pictures, pic1, pic2, pic3 and pic4, and they have thumbnails th1, th2, th3 and th4, and preview images prev1, prev2, prev3, and prev4, and I'm using html pages pag1, pag2, pag3, and pag4, then that's fairly static, isn't? It's not something you couldn't determine until someone wants to see pic1 or pic2? And it's not going to change if pic5 arrives.

        And as an additional benefit, I can distribute an album (which in my setup is contained in a directory tree), be it by sending someone a tar or a zip file, or to burn it on CD or putting it on a memory stick, by just (recursively) copying the directory. Nothing special required for the receiver. No webserver needed. No OS dependency.