Archive for the ‘Alpha Zeetix’ Category

Create a new clazz

February 9, 2009

For a class named “Foo” in assembly “Bar”:

  1. Create a sql file that adds suitable records to it, behavior, clazz, and metaclazz, and any superclazzes. If Foo is to have persistent instances, this file should also create a new table named “foo”. By convention, the sql file is named “create_foo.sql”, and is kept in the “sql” subdirectory of the “Bar” directory. NOTE: Each new object requires a new version_id/object_id, and these must be kept in synch with the ZeeStore.
  2. Run, from either the command line or MySqlQueryBrowser, the sql created in the previous step. Validate that the new records exist in the ZeeStore and are well-formed.
  3. Create a python file containing class definitions for the new clazz and its metaclazz. The new file should be named “Foo.py”, and should be located in the “Bar” subdirectory of the zeetix root. Inside “Foo.py”, there should be an import statement that imports the superclazz, and class definitions for “Foo” and “FooClazz”.
  4. Create another python file containing class definitions for the record clazzes of the new clazz. The new file should be named “FooRecord.py”, and should be located in the “Bar” subdirectory of the zeetix root (alongside “Foo.py”). Inside “FooRecord.py”, there should be an import statement that imports the superclazz (another descendant of ItRecord), and class definitions for “FooRecord” and “FooRecordClazz”.
  5. Add implementations of hook methods required by the various framework interfaces, such as “doTransientAttributeNames”, “doTableName”, and so on.
  6. Add an import line and installation code to “BarAssembly.py” that imports and installs Foo and FooRecord.

With proper tweaking of the existing Zeetix naming conventions, it should be possible to generate the required column names (in the DB), record attribute names (in the record clazz), and instance attributes (in the new clazz) from the specification provided in the original subclazz creation method. I do some of this now (I use ZeeString), and could do MUCH MUCH more.

Advertisements

Adding a new Assembly/SubAssembly

February 4, 2009
  1. Create the assembly directory.
  2. Add the __init__.py module to the assembly directory.
  3. Create the assembly module in the assembly directory.
  4. Add the clazzes in the assembly to the assembly module.
  5. Create a clazz module for each clazz in the assembly directory.
  6. Add an import for the new assembly to SystemConfiguration.py (ouch!)
  7. Add the assembly to the doAssemblyNameList method of each application that requires the new assembly.