Web frameworks are too dang easy to write (Another bloody one showing up in my code...)


Spent the day pounding away at the VOIP Billing project. It's getting fairly close to functional at the single-account level. Did a couple of significant refactorings during the day and am now seeing a web framework poking it's hoary head out of the contingencies.

Since I'm using BasicProperty for all of the modelling, there are all sorts of places where generic programming can be done... and that's where frameworks sneak in, refactoring their way into rules and patterns that try to be generic solutions to everything ever done.

Of course, maybe it's just my frustration that's letting them creep in. I'm astonished at just how much I was upset by writing a couple of dozen raw SQL queries for each module. Something in me just screams out when forced to sling strings about.

Even with PyTable's SQLQuery making the composition a little neater, the lack of schema introspection is driving me nuts (the lack of automatically retrieving sufficient unique keys to identify the record is also a pain).

I miss being able to say:
    if record.dirty()
record.updateQuery( connection )

And just having everything figured out for me under the covers, which keys to use to identify the query, which fields need to be updated, what the table name is in the schema, whether a key-value is changing and thus requiring special handling.

No big deal for one record type, or one module, but with half a dozen modules and record types it just grates on the nerves and beckons the unwary wanderer into the depths of framework creation...

The problem being I already have a framework (heck, a plethora of them), so I can't justify spend any time building one now... I was seriously tempted about an hour ago to install Django and see if it was reasonably similar to D'Arcy and Tim's CGI stuff that I could prevail upon them to adopt it.

Ignore it all, I tell myself; march forward, I chant. Get the project done and delivered. Deadlines are looming in the rearview mirror.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.