Re: Specifying all biz rules in relational data
Date: 12 Sep 2004 00:19:16 -0700
Message-ID: <31f7e57d.0409112319.7338f6e0_at_posting.google.com>
> My own experience and inclination has always propelled me towards code
> generators
In my sourceforge project (http://butler.sourceforge.net), I have a
code generator that generates java classes for tables in a database
schema. If you have a column named "ConctactName", the generator will
produce two methods:
But if you have a more powerful language, like Python, with dynamic
properties, you can retrive the value for "ContactName" by typing:
record.ContactName
It is also very important not to generate more than absolutely
necessary. In Butler a fragment of a generated class would look like
this:
public String getContactName()
* public String getContactName()
* public void setContactName(String name)
And generated classes is not needed.
{
return (String) get("ContactName");
As you see the generated code do nothing more than casting the return type and eliminates the usage of typing column names as strings.
The real functionality is inside the get-method of the super class.
> I wonder what the participants in this newsgroup feel about that
> proposition, that being that a database application can have its entire
> behavior defined by scalar values that can themselves be organized into
> relational tables.