How Random Babbling Becomes Corporate Policy (t3knomanser) wrote,
How Random Babbling Becomes Corporate Policy

  • Music:

End of the Week

I keep some balls for juggling in my cube. Since the weather's been fairly nice (too hot today), I've been going outside and juggling on my lunch break. Some fresh air, sunlight, a little exercise. Basically, things that are anathema to programmers.

Anyway, as it turns out, over in Market Square, I stumbled across another group of jugglers. We swapped some info, and hopefully will meet up again soon. They have much more by way of juggling supplies- I was just starting to get used to juggling rings (still have a mental block about clubs for whatever reason). Apparently, those guys have been running around getting kicked out of public places for juggling in them.

Speaking of juggling, I've been doing work too. So please, let me explain how

Caveat: The application discussed here has only a handful of users. It is not a heavily loaded application and it runs on its own hardware. This means that it actually performs “acceptably” in most situations. But seriously, folks- there’s a lot of issues with this design.

Someone requests an ASP on your server. The ASP is loaded by the ASP runtime. Based on the data it wants to display, it populates a multi-dimensional array. Each “column” in the array represents a separate query that you want to run against the database. Each “column” has six “rows” (an Nx6 array, where N is the number of queries to be run). Each row has a specific meaning, including the name of the query to run (all SQL is stored in the database, you see), extra options on the query, like sorting overrides, etc.

The ASP then calls a method on a class, passing this array in as the parameter. Based on the input parameters, the class retrieves data from the database. The first query retrieves some basic metadata about the screen to be displayed. The second query retrieves the individual elements to be displayed on that screen. Then, for each column in the array, a query is run to retrieve the ACTUAL query we want to run. Except the SQL code isn’t stored in the database. Data ABOUT a SQL statement is stored in the database, and the class retrieves that data and mashes it into a SQL statement, which is then run against the database. This whole shebang is then mashed into a row-oriented XML file (as opposed to a hierarchical XML file- y’know, the kind of data XML is MEANT to display).

The ASP receives that XML file from the class. Now the ASP passes that file off to a different class. That other class wraps a set of methods around the XML so that the ASP can request specific data in order to display it. Sometimes the data is just plain unmarked strings, but usually it’s HTML.

Sometimes, like when outputting a list, the HTML won’t operate properly without client-side javascript. Even though the javascript is the same on every page, there’s no method to retrieve that javascript from the UI class. You have to hard code it in.
Hey, at least it automatically pages large recordsets for you. That’s something, right? Well, it is, except for the fact that it doesn’t cache any of this data. Which means that when you click a paging link this ENTIRE PROCESS IS REPEATED.

Lo, this is how it shall be, forever and ever, the methods of the TPM Screens. And there was much rejoicing.

All bitching aside, I'm starting to get a feel for how the app works, and I'll be ready to really dive into things next week.
Tags: pittsburgh, programming, work

  • Strange Things People Say About Me (to my face)

    Recently, I've been at the center of a trend. That trend is complete strangers asking me "Are you ____?" A quick summary. For example: Are you…

  • Writer's Block: If I could find my way

    -10,000 years, at minimum. Tomorrow is always better than today, especially when you can't fact-check.

  • Bob Morlang

    When I was working at Tri-Mount, we had these camp trucks. They were army surplus, and while they could take a beating, they only sort of worked. And…

  • Post a new comment


    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded