?

Log in

No account? Create an account

Previous Web | Next Web

Well, I started working out the inner workings of the x-poster gizmo today.

It's gonna be a rather unholy fusion of OO and functional code; some bits, like journal entries, just sound right as objects, while the idea of a login object is a bit too odd for me. Basically it's going to end up having CGI capabilities (like login, logout, selectthread, addentry, etc) as functions and the actual journal, with it's threads and entries, will be done as objects.

'Course, the problem now is that it's, um, a while since I did anything OO... so I've been struggling with deriving objects... the fun bit of deciding methods and attribures is gonna take me a while I think. And I've gotta nail down how I'm gonna work this abstraction against physical storage, which will affect that list I suppose...

So I guess that's my next challenge.

Not sure how much I'm gonna get done tomorrow on this; I need to do some AnneHarris.org stuff as I've been slacking, and I'm seeing a guy about the possibility of doing some work tomorrow too.

Still, I'm gonna play a bit more tonight and see where it gets me.

Oh, I've added a new project to the list too; except this one is atleast quite well on already; I'm gonna push my newly revamped WWW site into a CGI; so basically the CGI does all the repetitive per-page stuff, like putting all the 'divs' in place, making the 'head', etc, and there'll files that contain the page title and the main bit of the page that'll get inserted in the relevent places.

This thing grew out of the journal project; not the updater, but the interface on the WWWSite that needs to read the local 'database' and output from that. Basically I couldn't think of an easy way to have a write-once-use-site-wide layout; I didn't much feel like working out first how to write Apache includes (so much so that I haven't even bothered to see if they'd work on the host), and then working out how to include CGI output within an Apache include (if that is even possible, which I doubt), so I figured a CGI would do the job very nicely in place of having PHP.

This perl-page-generator is about 1/3 done; it does all the page generation stuff, I need to add in the stuff to make it accept input safely (the current generator doesn't bother to even try for params) and the code to get it to read the title+content files and put them into the CGI output. This (obviously(?)) needs to make sure that no-one's trying to be sneaky with paths (leading slashes and ..s being amongsth the especially evil bunch of things to squash) and that the requested file exists (if it doesn't, there really should be a 404, File Not Found message of some sort triggered off).

There's some other complications in there too, but it shouldn't be too hard to write!