|
Re: Database Constraints: Use Them or Lose Them?
|
Posted: Sep 25, 2009 8:22 AM
|
|
> So you only have to express your constraints in the model, > then you even mentioned that AndroMDA provides free > generators.
I have never used AndroMDA. Its name bears coincidental resemblance to a SourceForge/GoogleCode project called Andromeda Project, or simply "Andro" for short. Andromeda is written in PHP. I also don't use it. Awhile back I also got kicked off the mailing list for being a colossal jerk (posting code reviews that would make Al Viro of the linux kernel mailing list blush). It was a situation where I probably should've banned myself.
What Andromeda does well is it has a simple, additive model for security. It also decouples columns from tables, and tables from schemas. This means you only define everything once, including columns. Columns are "placed into" tables, as opposed to being defined as "part of a" table. Tables are therefore composed additively, as are the security constraints on them. Tables actually aren't even directly grouped into schemas, but instead grouped into an Andromeda Data Dictionary concept called a "module" (effectively a namespace). Modules can in turn have security settings. Security itself can be composed out of groups, which map to roles.
Other code generators, like Oslo, have a slightly different way of doing things, but they also don't allow you to directly specify security settings and other compositional properties. Oslo is still very immature, and I personally dislike the language they came up with. It was designed by the same folks who thought COM/CORBA was a good idea. The saving grace is probably that the same folks who invented VB are also on the project. IMHO, looking at Oslo, it's not as complicated as COM, but it's not targeted for the layman and will require several iterations and facade patterns to cover up the more complicated portions of it.
The scope of Oslo is also huger. For instance, with Oslo, I can use MS Researcher's Common Compiler Infrastructure: Metadata project as a browser for basically all my software artifacts that MSBuild uses.
> Are you saying that code generation isn't there yet or that > it isn't the right solution to constraint management ???
I'm saying millions of people have done code generation before. What matters is how well you do it, or how low your expectations are.
If you're building software product lines, things can get very complicated quickly, and its not something you want to do ad-hoc, or you'll be writing millions of lines of Java code (which SpringSource is rooting for you to do). For instance, Minnesota State requires that you not show employees full birthdate (but you are allowed to show the month and day). So now your model has to accomodate a legal requirement, and you've got to be able to verify you're meeting these legal requirements.
|
|