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.
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.