PROPOSAL: Splitting ZPatterns into two products
Many people have suggested splitting out the PlugIns part of ZPatterns as a seperate product for general Zope use. In addition to this, it is becoming clearer to me as I work on docs, etc., that there really is only one thing left in ZPatterns after you take out PlugIns, and that is DataSkins. (Pretty much everything else in ZPatterns only has meaning in relation to DataSkins.) So, I am thinking perhaps I should split ZPatterns into two products: PlugIns and DataSkins. The DataSkins product would require the PlugIns product. LoginManager would require both. For backward compatibility, there would need to be a "final release" of ZPatterns which contained stubs to load in classes from their new locations, so that existing objects stored in ZODB's would not be "broken". Newly created objects, of course, would refer to the new products automatically. The term "ZPatterns" would then go away, which is just as well because it doesn't really mean anything, anyway. :) Please let me know if you have any comments or questions on this. _____ _/__) ___/
"Phillip J. Eby" wrote:
Many people have suggested splitting out the PlugIns part of ZPatterns as a seperate product for general Zope use. In addition to this, it is becoming clearer to me as I work on docs, etc., that there really is only one thing left in ZPatterns after you take out PlugIns, and that is DataSkins. (Pretty much everything else in ZPatterns only has meaning in relation to DataSkins.)
So, I am thinking perhaps I should split ZPatterns into two products: PlugIns and DataSkins. The DataSkins product would require the PlugIns product. LoginManager would require both. For backward compatibility, there would need to be a "final release" of ZPatterns which contained stubs to load in classes from their new locations, so that existing objects stored in ZODB's would not be "broken". Newly created objects, of course, would refer to the new products automatically.
The term "ZPatterns" would then go away, which is just as well because it doesn't really mean anything, anyway. :)
Please let me know if you have any comments or questions on this.
I'm all for this proposal. The only problem I see is that the work of updating the developer documentation on the Wikis, and putting "historical documents", like the IRC chat transcript, in a context where they make sense. I'm willing to spend some time on the documentation work. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Steve Alexander wrote:
"Phillip J. Eby" wrote:
So, I am thinking perhaps I should split ZPatterns into two products: PlugIns and DataSkins.
If 'PlugIns' includes plugins, plugin groups and plugin containers, then that's a pretty good name :-) (If I've missed bits out and the like, please let me know, I'm trying to keep up to date ;-) 'DataSkins' doesn't mean a lot to me as a name :S What components would go into this product?
I'm all for this proposal.
Yup, sounds like a great idea. Hopefulyl Pluggins could get into the Zope core ASAP. I reckon they might be quite useful to ZMI mark II :-)
The only problem I see is that the work of updating the developer documentation on the Wikis, and putting "historical documents", like the IRC chat transcript, in a context where they make sense. I'm willing to spend some time on the documentation work.
Has anyone done anything with the 'glossary wiki' idea I punted out a while back? I would have liked to have done it but have been a little busy :( anyway, sounds cool :-) Chris
Chris Withers wrote:
'DataSkins' doesn't mean a lot to me as a name :S What components would go into this product?
An object that has DataSkin as a base class allows a DataManager to look after its data storage requirements. The DataManager stores all the propertysheets and attributes, and works out what to do and who to notify when things change. There are various types of DataManager in ZPatterns, and the important ones take plug-ins so that you can greatly modify their behaviour. Specialists and Customizers (aka Folders w/ customizer support) are the main DataManagers you build an application out of. Specialists may have Racks inside them to actually do the work of storing the data, so you can think about your application's architecture at many different levels of abstraction. You can say "The AddressBook specialist manages Address DataSkins" but you can also say "The Addresses rack in the AddessBook specialist stores the Address DataSkins". When Objects get created or deleted or changed, a DataManager will tell any Agents it knows about that this has happened, in case they are interested. An Agent is anything that monitors the events produced when things happen to DataSkins. A Trigger is a kind of Agent that does something concrete, like calling a method, in response to a change in a DataSkin. You can use a Trigger to update a ZCatalog when a DataSkin gets added or deleted or changes. This is good because catalog-awareness gets to move out of the domain objects (business objects, or whatever) and into the parts of your system that are concerned with the management of those objects. You can even use two Triggers to update two different Catalogs when a DataSkin changes -- for example, the AddressBook catalog, and also a SiteIndex catalog for searching all the data in your system. Perhaps the SiteIndex holds just minimal indexes and meta-data, whereas the AddressBook catalog holds meta-data and indexes more specialised to an address book. Two other important aspects of the DataSkins part of ZPatterns are SheetProviders and AttributeProviders. These plug into Racks (and anything else that takes "Data Plugins") and do the work of getting propertysheets and calculating or importing attributes. These attributes and propertysheets generally end up as the data belonging to the DataSkins.
Yup, sounds like a great idea. Hopefulyl Pluggins could get into the Zope core ASAP. I reckon they might be quite useful to ZMI mark II :-)
What is ZMI? -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Steve Alexander wrote:
An object that has DataSkin as a base class allows a DataManager to look after its data storage requirements. The DataManager stores all the propertysheets and attributes, and works out what to do and who to notify when things change.
Okay, makes sense...
There are various types of DataManager in ZPatterns, and the important ones take plug-ins so that you can greatly modify their behaviour.
I thought there were only two right now?
Specialists may have Racks inside them to actually do the work of storing the data,
Now what's a rack in Plugin terminology?
so you can think about your application's architecture at many different levels of abstraction. You can say "The AddressBook specialist manages Address DataSkins" but you can also say "The Addresses rack in the AddessBook specialist stores the Address DataSkins".
By DataSkins here, particularly in the secodn phrasing, wouldn't it be better to say the AddressBook specialist stores the flesh and bones of the Address DataSkins?
When Objects get created or deleted or changed, a DataManager will tell any Agents it knows about that this has happened, in case they are interested.
Are 'Objects' here DataSkins, non-DataSkins or either?
An Agent is anything that monitors the events produced when things happen to DataSkins.
But they're actually called by the Data Managers?
A Trigger is a kind of Agent that does something concrete, like calling a method, in response to a change in a DataSkin. You can use a Trigger to update a ZCatalog when a DataSkin gets added or deleted or changes.
Sounds cool, where does SkinScript fit in here?
This is good because catalog-awareness gets to move out of the domain objects (business objects, or whatever) and into the parts of your system that are concerned with the management of those objects.
I think I like this...
You can even use two Triggers to update two different Catalogs when a DataSkin changes -- for example, the AddressBook catalog, and also a SiteIndex catalog for searching all the data in your system.
Now how would these triggers actually get added to the datamanager in the above example? I like this very much as it's something I've often wondered about but which CatalogAware never seemed to address...
Two other important aspects of the DataSkins part of ZPatterns are SheetProviders and AttributeProviders. These plug into Racks (and anything else that takes "Data Plugins") and do the work of getting propertysheets and calculating or importing attributes. These attributes and propertysheets generally end up as the data belonging to the DataSkins.
Ah, okay, I see now. So, for example, a SheetProvider would prove a property sheet for each DataSkin served by the DataManager in which it was located?
What is ZMI?
Zope Management Interface (specifically Mark II ;-) It's a proposal on dev.zope.org... cheers, Chris
At 10:22 PM 7/28/00 +0100, Chris Withers wrote:
Steve Alexander wrote:
There are various types of DataManager in ZPatterns, and the important ones take plug-ins so that you can greatly modify their behaviour.
I thought there were only two right now?
Technically, there are three - Specialist, Rack, and Customizer. But Specialist is never directly used by a DataSkin as its data manager, because of the Rack. Specialist derives from DataManager, though, so it can have data plug-ins for use by its Racks. So there are only two "true" DataManagers - Rack and Customizer. I don't expect there will be any more in future, because I don't know of any other ways to organize Zope objects besides: 1) a flat namespace (Rack), or 2) a sub-object tree (supported by Customizers).
Specialists may have Racks inside them to actually do the work of storing the data,
Now what's a rack in Plugin terminology?
A plug-in that's also a plug-in container.
so you can think about your application's architecture at many different levels of abstraction. You can say "The AddressBook specialist manages Address DataSkins" but you can also say "The Addresses rack in the AddessBook specialist stores the Address DataSkins".
By DataSkins here, particularly in the secodn phrasing, wouldn't it be better to say the AddressBook specialist stores the flesh and bones of the Address DataSkins?
Here's how I prefer to say it... An "AddressBook" specialist is where you get, create, or manipulate en-masse, things which you'd like to have in an address book. It may contain one or more racks which store some particular concrete class of things which have addresses, and which you want to have available through your addressbook specialist. The rack does not necessarily store the "flesh and bones", because that might reside in LDAP, SQL, the filesystem, or something else altogether. The rack is a "storage manager" which manages the process of realizing DataSkins of a particular class with common storage characteristics.
When Objects get created or deleted or changed, a DataManager will tell any Agents it knows about that this has happened, in case they are interested.
Are 'Objects' here DataSkins, non-DataSkins or either?
DataSkins only.
An Agent is anything that monitors the events produced when things happen to DataSkins.
But they're actually called by the Data Managers?
Yes. DataSkins tell their DataManager they've changed; the DM forwards the appropriate messages to the Agents.
A Trigger is a kind of Agent that does something concrete, like calling a method, in response to a change in a DataSkin. You can use a Trigger to update a ZCatalog when a DataSkin gets added or deleted or changes.
Sounds cool, where does SkinScript fit in here?
SkinScript can be used to specify DTML expressions to be called as triggers, or to be used to calculate attributes, etc. In place of an AttributeProvider or Trigger, you plug-in a SkinScript Method to a DataManager, then write the SkinScript code to describe all the attributes and triggers, etc. you want.
You can even use two Triggers to update two different Catalogs when a DataSkin changes -- for example, the AddressBook catalog, and also a SiteIndex catalog for searching all the data in your system.
Now how would these triggers actually get added to the datamanager in the above example?
You go to its Data Plug-ins tab, and select from the "Add" dropdown the kind of trigger or provider you want. Then you fill in its settings to do what you want it to do.
Ah, okay, I see now. So, for example, a SheetProvider would prove a property sheet for each DataSkin served by the DataManager in which it was located?
Yep.
At 09:51 AM 7/28/00 +0100, Chris Withers wrote:
Steve Alexander wrote:
"Phillip J. Eby" wrote:
So, I am thinking perhaps I should split ZPatterns into two products: PlugIns and DataSkins.
If 'PlugIns' includes plugins, plugin groups and plugin containers, then that's a pretty good name :-)
Yes.
'DataSkins' doesn't mean a lot to me as a name :S What components would go into this product?
DataSkins themselves, and all the things that support them. Data Managers (Racks and Customizers), Data Manager containers (Specialists and Folders w/Customization Support), and Data Plug-Ins (Attribute Providers, Sheet Providers, Triggers, etc.)
Yup, sounds like a great idea. Hopefulyl Pluggins could get into the Zope core ASAP. I reckon they might be quite useful to ZMI mark II :-)
That might be, but the PlugIns part isn't really where it should be before it could even be proposed to go into the Zope core. The biggest hurdle remaining is full ZClass support. I would like to have it so that if you base a ZClass on PlugInContainer, you get a tab in the ZClass management screen where you can add and configure plug-in groups... and the groups themselves would be plug-ins, so that you could have specialized forms of plug-in groups.
Has anyone done anything with the 'glossary wiki' idea I punted out a while back?
I don't believe so. But I think that splitting the package will make documentation easier. Partly because it will allow starting from a fresh viewpoint that is DataSkins-centric and more use-oriented. I figure on leaving the ZPatterns Wiki alone for the most part until the DataSkins docs start to mature, and then yanking out documentation-type stuff from the ZPatterns Wiki and re-purposing it to focus on application design, object modelling, and the like, in the context of the DataSkins and PlugIns packages.
Phillip J. Eby writes:
So, I am thinking perhaps I should split ZPatterns into two products: PlugIns and DataSkins. The DataSkins product would require the PlugIns product. LoginManager would require both. For backward compatibility, there would need to be a "final release" of ZPatterns which contained stubs to load in classes from their new locations, so that existing objects stored in ZODB's would not be "broken". Newly created objects, of course, would refer to the new products automatically.
Sounds like it would reduce some of the apparent complexity of the current ZPatterns. Not the final solution but it would help.
participants (4)
-
Chris Withers -
Dan L. Pierson -
Phillip J. Eby -
Steve Alexander