RE: [Zope-dev] ZClass not in a Product
Title: RE: [Zope-dev] ZClass not in a Product I have to say that I agree with you Dieter. It would be very useful to have the ZClasses that relate to a project in a single branch with the rest of the project code for a number of reasons * Security (As you said). Users could have full write permissions to one branch only. * Backups or exporting from development to production servers. With the code all in one place, it would be possible to export the entire project from a development server and import it to the production server in one action (Ok, one action each end) eliminating the possibility of getting code and ZClasses out of sync. * Reducing the size of the Add List - This has to be a pain for everyone! However I also understand the appeal of having a central, restricted, ZClass repository as well, it just serves a different (Not incompatible) purpose. I think that both situations would be useful ... Now we just need to find out if they are possible. :) -- Adrian Hungate Manager, European I.S. Acucorp UK Limited To a database person, every nail looks like a thumb. Or something like that. - Jamie W. Zawinski http://www.zopezen.org/Zope/Quotes -Original Message- From: Dieter Maurer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 26 June 2001 05:07 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Zope-dev] ZClass not in a Product Joachim Werner writes: I know about the duality of Python classes. I just don't see what I could really do with a ZClass in the instance space (reading this twice, see below for some possible examples). A totally different aspect is whether Zope should have something like an in-built support for virtual instances, i.e. sub-folders could be like full Zope instances, providing a local Products directory etc. To clarify, you use instance here in the spirit of Zope instance a-la INSTANCE_HOME and not in the sense of instance of a class... That would probably be a good thing. I am more in favor of getting things OUT of the instance folders than getting more stuff in. That is completely different from what I would like to do. It makes absolutely no sense to me why the Zope management interface displays database adaptors, user folders, and actual content objects all in the same folder. It makes lots of sense for me! Consider a large site hosting many applications, partly developed and maintained by different people/departments. It is very nice to be able to structure the site hierarchy into folders corresponding to appliciations and allow each team responsible for an application to put in everything they need for the implementation: database adapters, additional user definitions, special roles, ZClasses, Zope already allows this partially. Unfortunately, the product registry is global and not managed similar to user folders. Your proposed virtual instances would be an alternative solution. I could live with it, though I would not think it is better. To come back to the ZClass question: I see and use them mainly as templates. That's what they are good for. So they should reside in a template folder. Right now, this folder is the Products folder. Maybe we need local Products/Templates folders, so that it is possible to have ZClasses that just work locally or that overload a base ZClass defined up in the tree. But what we definitely don't need is freely floating ZClasses. I am much in favor to structure objects *NOT* according to type (e.g. all images in a folder, all SQL methods in a folder, all Scripts in a folder, ...) but according to applications/services: One folder for each service which contains everything needed only for this service: images, scripts, SQL methods, content, ZClasses, There are things that are used more globally. They may go into type specific folders. ... Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZClass not in a Product
Maybe you search python.org for Guido's metaclasses article. It tells that a Python class can be both a class and an instance and that this view has interesting applications. You focus on the class aspects of a ZClass (a pattern for creating instances providing them with basic common infrastructure), while I stress the instance aspects. The fact, that you can manage ZClasses in the same way as other Zope objects, calls for similar structuring possibilities: taking them out of the centralized control panel and putting them anywhere in the site. That was the starting point of our discussion... I know about the duality of Python classes. I just don't see what I could really do with a ZClass in the instance space (reading this twice, see below for some possible examples). A totally different aspect is whether Zope should have something like an in-built support for virtual instances, i.e. sub-folders could be like full Zope instances, providing a local Products directory etc. THAT would make a lot of sense to me. But in general I am more in favor of getting things OUT of the instance folders than getting more stuff in. It makes absolutely no sense to me why the Zope management interface displays database adaptors, user folders, and actual content objects all in the same folder. The only thing these objects have in common is that they are living in the same namespace. Another problem ist that the Add lists get longer and longer. So why not have a separate tab for users, content, and technical things like database adaptors, or SiteRoots? O.k., what we get then is too many tabs, what there should be a clever way of changing the ZMI to a multi-level tab concept (main tabs and sub-menus). To come back to the ZClass question: I see and use them mainly as templates. That's what they are good for. So they should reside in a template folder. Right now, this folder is the Products folder. Maybe we need local Products/Templates folders, so that it is possible to have ZClasses that just work locally or that overload a base ZClass defined up in the tree. But what we definitely don't need is freely floating ZClasses. Another problem is that the ZClass implementation is really experimental. They work great, which is a miracle, but they are extremely slow, and a lot of things you'd need for effectively sub-classing ZClasses from others don't work. E.g. it is impossible to overload existing properties/porpertysheets, and acquisition does not work as expected either. Joachim ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZClass not in a Product
Joachim Werner writes: I do not agree with you: a ZClass is both an instance (you can manage, modify, delete) and a class (you can use as blueprint for object creation). O.k., I CAN manage/modify/delete a ZClass, but it still is (conceptually) a class, and only a class. You can manage/modify/delete Zope Python classes, too: Add new icons, DTML or real methods etc. It just is done from the file system. Still nobody would call those instances ... Or did I miss something here? Maybe you search python.org for Guido's metaclasses article. It tells that a Python class can be both a class and an instance and that this view has interesting applications. You focus on the class aspects of a ZClass (a pattern for creating instances providing them with basic common infrastructure), while I stress the instance aspects. The fact, that you can manage ZClasses in the same way as other Zope objects, calls for similar structuring possibilities: taking them out of the centralized control panel and putting them anywhere in the site. That was the starting point of our discussion... Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZClass not in a Product
Now is there a technical reason why I can't have a ZClass inside any folder? No. There is not code to allow this to happen in Zope, however. I think at I know there is no code to do this. I'm asking how much code would be needed. Is it a major re-architecture? Is it something I could do? I have absolutely no idea. I'd imagine you're may run into the mind-bending code inside ZClass.py and run away screaming at some point. some point, Lalo came up with a local factory product that did something like this. Not quite the same thing. I want local factory for local class. Sorry, I wish I could help... - C ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZClass not in a Product
Joachim Werner writes: Is there any good reason why a Product inside the ControlPanel is the only place a ZClass can exist? Why can't I have one in any folder? I think it is perfectly logical that ZClasses are located in the Products area. A folder is for instances of classes, and a ZClass is a class, not an instance. I do not agree with you: a ZClass is both an instance (you can manage, modify, delete) and a class (you can use as blueprint for object creation). Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZClass not in a Product
I do not agree with you: a ZClass is both an instance (you can manage, modify, delete) and a class (you can use as blueprint for object creation). O.k., I CAN manage/modify/delete a ZClass, but it still is (conceptually) a class, and only a class. You can manage/modify/delete Zope Python classes, too: Add new icons, DTML or real methods etc. It just is done from the file system. Still nobody would call those instances ... Or did I miss something here? Joachim ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZClass not in a Product
Is there any good reason why a Product inside the ControlPanel is the only place a ZClass can exist? Why can't I have one in any folder? Dylan Jay mailto:[EMAIL PROTECTED] Avaya Communication Tel: +61 2 9886-8961 Level 3, 123 Epping RoadFAX: +61 2 9352 9224 Nth Ryde NSW 2113 Mobile: 0409 606 171 AUSTRALIA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZClass not in a Product
Is there any good reason why a Product inside the ControlPanel is the only place a ZClass can exist? Why can't I have one in any folder? I think it is perfectly logical that ZClasses are located in the Products area. A folder is for instances of classes, and a ZClass is a class, not an instance. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZClass not in a Product
Now is there a technical reason why I can't have a ZClass inside any folder? No. There is not code to allow this to happen in Zope, however. I think at some point, Lalo came up with a local factory product that did something like this. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] ZClass not in a Product
-Original Message- From: Chris McDonough [mailto:[EMAIL PROTECTED]] Sent: Friday, 22 June 2001 2:42 PM To: Jay, Dylan; 'Joachim Werner'; [EMAIL PROTECTED] Subject: Re: [Zope-dev] ZClass not in a Product Now is there a technical reason why I can't have a ZClass inside any folder? No. There is not code to allow this to happen in Zope, however. I think at I know there is no code to do this. I'm asking how much code would be needed. Is it a major re-architecture? Is it something I could do? some point, Lalo came up with a local factory product that did something like this. Not quite the same thing. I want local factory for local class. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )