• RobertYoung (10/27/2010)


    The long standing issue with schema changes (code generated or otherwise) is what to do with existing table data. With code generation, there really does need to be a hard and fast rule: if Sally Business Analyst wants a Foo column added to the Bar table she has to either identify the default value or accept that the column is Nullable. Sally, most often, hasn't a clue what the answer is, either way. Generation doesn't create the problem, but when coders are in charge, the problem keeps getting fobbed off into byzantine code loops. Generation demands an up front answer. The needy BA's of the world don't like having to be explicit.

    RAP does not presume to actually alter your tables for you, and in fact other than providing a preprocessor to help enforce the consistency of primary keys and status fields, it is not involved in the process of schema generation. The kind of capability you describe transends even modern schema design tools, which generally do nothing for you other than generate the new DDL after you've changed the schema.

    In order to preserve your data and make the kinds of new-field-initialization decisions you describe requires intimate knowledge of the purpose of the fields. Until such time as we have schema design tools that understand the intent (and not just the pattern) of your design, this task will need to be done by hand.

    Similarly, neither RAP nor any other design tool that I know of would have the ability to modify your business rules and your UI in accordance with your schema changes. These sorts of changes could be made only by a comprehensive application design tool that truly understands what you are trying to do. Such a thing could sit on top of RAP, but it is well beyond the scope of RAP.

    What RAP does do is to relieve you of the nightmare of trying to track down all the places in the database and the data layer that are impacted by your schema change. It does this by simply and comprehensively regenerating all the code it originally generated when you created the app.