Data Dictionary Based Rad

I've always been fascinated by the idea of using some form of DataDictionary (DD) for RapidApplicationDevelopment. This may include some form of EntityRelationshipDiagram-like info in table form, which is essentially a DD about table relationships. Perhaps "attribute-driven RAD" may be a better name for it.

In the ideal case, you'd only have to fill in DD tables (perhaps with the help of a mousey IDE) and most of the CrudScreen portion of the app would more or less write itself. I've experimented with the idea and used tools that kind of use the idea. The problem is that there are a lot of potential gotcha's, such as the EightyTwentyRule.

[more to come...]

--top


Possible Features:


Who Makes It?

What's presented here is an interesting idea. I hope Top implements it so we can evaluate its merits.

Sounds a bit like NakedObjects.

Objects in general are difficult to search, sort, query, etc. in a way that I expect meta-data to be. One is generally stuck viewing them in the way the original coded forced on you.

Reflection can overcome this to a large degree, and/or you can use the RelationalModel to manage collections of instances.

In my opinion, reflection is an instance of GreencoddsTenthRuleOfProgramming. Don't tack on a half-ass database after the fact, start with a database to begin with so that the design is cleaner and more standard. And not app-language-specific.


I have not found a good interface convention for specifying sub-sets and super-sets of columns without copying. If we keep copying, then we end up with the kinds of messes that MS-Access tends to result in.

Some columns will be applicable for some situations but not others. We might have the same column but define it different in one context versus another. What is the primary key used for reference in such a case? Maybe have a two-column primary key with an optional "alternate" number. But we do want to use native RDBMS column names most of the time. In other words, we don't want a secondary set of reference keys that are the same as RDBMS keys in most cases.

For example, using letters as stand-ins for column names, suppose we have this situation:

They both use similar columns, but not the exact same set. In addition, report R has a different definition for "F" (F-alt) than report Q. Suppose, for instance, that report R uses a compact date format whereas report Q uses a full format. If we use the actual source data table column name as part of the primary data dictionary (DD) key, then such "alt" creations are tricky because it violates uniqueness without gimmicks.

A screen example of an "alt" would be one screen that has tighter validation than another. For example, a supervisor screen may be able to put in special characters or codes that a rank-and-file employee cannot. In some cases we could use EventDrivenProgramming ("on-validate" event) to provide such behavior imperatively, but I'm not sure if that will cover every situation well. I haven't tested enough "generic" data dictionaries to say if imperative addition/subtraction of DD-specified features is sufficient.

Or we may want to specify an alternative display order, but without having to update the second list every time a new column is added to the primary list. If auto-referencing is not possible, then at least have some way to warn the developer if an alternative list needs updating. Thus, some kind of set comparing operation, along with non-pairs to ignore, needs to be addressed. Relational triggers of some kind may come in handy for this along with an easy way to have the set difference moved into the second list to avoid manual typing of column names.

For example, for the input screen "A" we want one field ordering sequence. However, for report "B" we want a different ordering even though the entity is the same (same data source table). One approach is to have 2 columns in our field dictionary, such as "sort_A" and "sort_B". However, this limits us to 2 sorts and is generally considered poor design. An alternative is create a second table with only ordering info.

 table: field_dict   // regular field dictionary
 -----------------
 entity_Ref   
 fld_id
 fld_type
 fld_order  // default ordering (type "float")
 ...etc...

table: alt_sort --------------- entity_Ref // may not be necessary, per pending primary key issue sort_id // for example "B" for report B. fld_id fld_order

There's something ugly about this approach. It's kind of a violation of OnceAndOnlyOnce such that we have to remember to update 2 dictionaries (one primary and one dedicated mini-purpose dictionary). A trigger mechanism can be added such that anytime the primary dictionary is updated, the designer is warned about the related info in the "alt_sort" table. We could also add auto-replication with any new column placed at the end of the sort sequence. But, auto-replication is a poor substitute for clean OnceAndOnlyOnce. I'm stumped for how to fix this.

I've faced similar situations for field titles. I used to have a "short" and "long" title (and also a "help" text which may be a paragraph or so), but even this is sometimes not sufficient. Perhaps something similar to the "customAttributes" table in NonOopGuiMethodologies can be used for "extra" info.

I've been developing database-driven business applications day in and day out since the mid-1980s, yet aside from recognising words and phrases like "columns", "RDBMS", and "primary key", this section is incomprehensible to me. What, for example, is a "primary list" and an "alternative list"? What are "non-pairs"?

Is there a way this section might be explained more clearly?

You are right. I've started to add examples.

Have you compared -- in terms of complexity, maintainability, flexibility, etc. -- your table-driven approach above (which appears to be fine-grainted meta-modelling of the entire UI structure) with the equivalent written as, say, hard-coded SQL or even SQL in tables?

There would be some overlap with NonOopGuiMethodologies, but in general this topic focuses on RAD tools, not open-ended GUI's. The emphasis is on meta-data about data to drive most of the app, not fancy GUI's. It may have a rather bland GUI in fact with little room for shuffling stuff around. (However, a way to "escape" to naked GUI mode should ideally be provided in case we want to get tweaky.)

I asked because your mention of having reports that differ only in sort order, or column selection, etc., strike me as something that can be effectively written in minimal code -- whether SQL (in the case of sort order), or in a combination of native code and SQL in the case of column selections -- but typically involve a massive metadata schema to model in tables. I've been down this route, and it ends in vast schema complexity that can easily be vanished into a few lines of code. One reason programming languages exist is because implementing the machine-states they represent is easier to define in a high-level language than manually twiddling the underlying data structures. Or is it your intent that DataDictionaryBasedRad would be front-ended by some high level language, and the metadata schema would strictly be an internal structure?

But I am not sure what you mean by the hard-coded part. Whether the DD's are filled in with IDE's or hand-coded INSERTS is a personal choice. An open system would allow both approaches. That's an advantage of using off-the-shelf RDBMS (although I'd prefer DynamicRelational if appointed God of IT).


See Also: ConstantTable

JulyZeroEight


EditText of this page (last edited July 15, 2008) or FindPage with title or text search