From: Tom S. <tom...@li...> - 2001-03-20 15:36:09
|
Chuck Esterbrook wrote: > > At 04:04 PM 3/20/2001 +0100, Tom Schwaller wrote: > >I'm trying to find ou where you used > >this aproach in Webware, so I get a better feeling for it.. > > Webware.MiddleKit.Core.ModelUser > > Read the methods that start with "install". > > So what is a model user? It is one of three things: > 1. Python code generator > 2. SQL code generator > 3. SQL object store > > The first 2 are found in MiddleKit.Design. The last in MiddleKit.Run. > > My aim here was that the generators and stores need to customize the core > classes and should do so without changing the source of core. > > There is a reason, why I didn't use subclasses. "Model user" objects > already let the user pass in custom subclasses for the core classes (Model, > Klass, Attr, IntAttr, ...) and I didn't want to burden the user with having > to remember to subclass something like: > MiddleKit.Design.MySQLPythonGenerator.Attr > > as opposed to: > MiddleKit.Core.Attr.Attr > > The latter is cleaner, more consistent and doesn't change when you switch > adapters/databases. > > Hope that gets you started. definitively. thanks a lot. The methods you use in this class modulesForClass installMixInsForModule installMixIns are quite generic and could be used at other places too. Is that correct? -- Tom Schwaller http://www.linux-community.de |