« - »

Look-up Tables revisited

24 January 2009

Once I started thinking about making a stand-alone demo release that you could just download, unzip, and launch, I had this urge to go back and clean up all of the little odds and ends that I had left undone in the name of pushing forward and getting to “done” on specific tasks. The basic thought process there was that, if I was going to put together a demo file that was easy to get up and running quickly, I didn’t really want it to be filled with a bunch of unfinished or passed over features. Of course, the flip side of that is that you can’t do everything that you want to do, and if you wait until you do, then you won’t ever release anything, but still …

Anyway, one of the main things that I want to showcase in the demo system is the Notification Service, mainly because I think it has a lot of potential uses in a variety of different areas. A major component of that service is the capability of creating and maintaining the templates for the notices that go out, but one thing that I never really finished was the template editor. Yes, it works, but there are a number of things that I wanted to add, including the addition of a Rich Text Editor, that I just never went back a completed. One thing that I thought would be pretty simple to go ahead and do was to use the Look-up Table service to replace the open entry text boxes for both the Content Type field and the Delivery Method field with drop-down select/option controls for the specific valid values. That seemed like a relatively easy thing to do, but it got me thinking …

The Look-up Table service is very nice, and it creates an easy way to set up a quick drop-down or pop-up pick list of valid values for all kinds of things, but not all lists of valid values are the same. Some of them, such a list of valid US State postal codes or a list of the days of the week or months of the year, are universal, and are the same for all applications. But there are many others that are very application-specific, and really have no place in a shared repository of look-up tables. The two that I was thinking of creating, Content Type and Delivery Method, were quite specific to the Notification Service, and not really relevant to any other application. Which got me thinking …

I need to add another level of “qualifier” to the whole Look-up Table concept. In the Authorization Service, we utilized the idea of a “context” to separate authorizations for one application, or functional area, from another. We could adopt the same strategy with the Look-up Table service, and possibly even use the same values. In fact, we could use the Look-up Table service to create a Context table of valid contexts, which could then be used by both the Authorization Service and the Look-up Table service. We could create a “shared” context for common tables, and then a “notification” context for the two tables that I wanted to create for the Notification Service. And, of course, all of that could be pre-loaded into the demo system database so it was all there to see when you brought up the demo system.

Of course, to do that would involve refactoring most, if not all, of the Look-up Table software, but I just got through a massive refactoring project of all DAO components, so it’s not like I haven’t done something like that before. It’s a lot of work, but one way to get a lot of work done is to get started doing it.

So, let’s get started!


Leave a reply

You must be logged in to post a comment.