First-person entomology   Leave a comment

Be the spider.

I spent a lot of time on Friday the 27th thinking about the possible future webby work thing. I certainly spent more thought on that than on the immediate problems to hand, but then they weren’t nearly as interesting. It might seem odd to spend quite a lot of thought on something I know almost nothing about, but that makes it more exciting. And I should know a bit about software development by now, and ultimately that’s all it is – software that runs on a server, gets stuff from a database, does a bit of processing occasionally, and sends pretty pictures to the users – so it’s not like I’m approaching it blind.

So plan A, then, which may be utterly stupid, and could end up changing totally, is to use HTML5 as an interface definition language. So each form/page would have its own HTML page, which isn’t read directly. The dynamic elements could be embedded as my own custom tags. Alongside each of those, another file could contain the data necessary to calculate the dynamic elements – queries used to populate fields or combo boxes, and so on. The back-end software (which I imagine being in C++ because that’s what I’m most comfortable with, and I don’t know any of those ponderous, ugly scripting languages) would get a request for a page, read the HTML and data files, pull the appropriate stuff from the database, glue it all together and send it off to the requester. It’ll also need to be able to receive web forms submitted, check the data and chuck it at the right place in the database.

Which is fine for simple forms (most of them, really); no extra processing required. Ideally for those you’d just need data files and no extra coding. But sometimes some actual work is needed, so the idea would be to have dynamic libraries for any more complicated forms/pages; their data file could tell the server which object to load, and it could do that and throw the data at it. I’m not sure of the best way to implement that, but I’m tempted to rip off my old individual project and just have each library be an object factory with a common base-type. It worked fine for terrain rendering, I don’t see why it couldn’t work just as well for database-driven web services.

But really I’m looking forward to doing something where I can do a bit of proper software development, in a language I like, where there are actual things to think about, with some of that engineering stuff in it. Y’know, separating the UI from important code (which would be imposed by the webby stuff) rather than having it all in one big blobby mess, having a big system designed to be a big system rather than a massive Jenga-tower of hacks, things like that.

Of course, someone (hi, Phil!) might come along and point out why I’m an idiot, or say I could much more easily use some library or system (Wt, perhaps – see, I knew a thing! Literally one thing) that already does all this and more, but better. Which would be good, but would also make me sad; I’d happily spend ages inventing the wheel, but there’s not much point if everybody else is already driving a Ferrari.

So work was pretty good. Not work was also pretty good! Beats the first half of the week.

I started reading a book called Whiteout by Ken Follett. I don’t read enough books, so thought I should start one, and this – bought from Asda for £1 last Christmas – was chosen. I might write a bit about it later.

The day closed with a trip to the gym. Fourth of the week, and third in a row; my poor, old, aching body found it hard work. Still, it’s all good exercise, and what’s the saying? That which doesn’t kill us makes the meantime slightly less pleasant? Something like that.

Ooh, and I got my first #ff on Twitter! So that was jolly nice. Nobody actually followed me because of it, but that’s really the best of both worlds: I get the compliment, but not the horror of having more non-spambots reading my rubbish. Hurrah!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s