[Zope3-Users] woah... zcml O.D.
Appologies if some of these questions seem naive, I'm just beginning to more thoroughly delve into zope3 - of which I've been very impressed so far. However - is it just me, or does zope3 seem to require a rather massive amount of configuration? Is that specifically an artifact of Component Architectures in general? Or is this by design? Are "site administrators" really supposed to understand all that zcml in the configure.zcml files, or are they more realistically the domain of component developers? It seems to me that the configure.zcml looks almost as if it would basically be considered "hands off", once the application/component was coded and installed. Generally how much of any particular configure.zcml could - practically speaking - be modified in a usefull manner? Even for relatively smallish apps, such as the buddydemo and zwiki, the configure.zcml file seem quite large; I hate to imagine what a more involved and complex app would do. Am I just looking at it wrong? Perhaps the basic idea is small amounts of code, and large amounts of configuration/meta-programming via zcml? Many thanks, and again sorry if I'm judging things prematurely based on my limited experience with zope3. Cheers, Corey ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] woah... zcml O.D.
Hi Corey, What I can say, with my really limited Zope3 experience, is that this amount of ZCML is comparable to the amount of XML config files needed for Java J2EE development (Enterprise Java Beans, anyone?). So there's at least one other component-architecture which requires comparable sh**loads of configuration, for even less functionality (or perhaps I should say - different kinds of functionality?). And for J2EE too, all this config-data is really the domain of the app.developers only, not the domain of any admin. And in J2EE, you can really screw up your application by changing as little as 1 line in the config -- I imagine it's gonna be the same in ZCML. And you won't even notice that you screwed up your app until you start testing with more load, more users, and suddenly the output is all wrong and the database corrupt and oops, some developer forgot to set some property here on one EJB bean and the database-access is done in the wrong way and transactions aren't held ... etc... I'm not sure if this is typical for Component Architectures, but it is a trend seen in more places. And it requires you, as developer, to be coding simultanuously in two places: in the code, and in the config. cheers and much luck getting through it, --Tim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Corey Sent: Thursday, June 23, 2005 8:32 AM To: zope3-users@zope.org Subject: [Zope3-Users] woah... zcml O.D. Appologies if some of these questions seem naive, I'm just beginning to more thoroughly delve into zope3 - of which I've been very impressed so far. However - is it just me, or does zope3 seem to require a rather massive amount of configuration? Is that specifically an artifact of Component Architectures in general? Or is this by design? Are "site administrators" really supposed to understand all that zcml in the configure.zcml files, or are they more realistically the domain of component developers? It seems to me that the configure.zcml looks almost as if it would basically be considered "hands off", once the application/component was coded and installed. Generally how much of any particular configure.zcml could - practically speaking - be modified in a usefull manner? Even for relatively smallish apps, such as the buddydemo and zwiki, the configure.zcml file seem quite large; I hate to imagine what a more involved and complex app would do. Am I just looking at it wrong? Perhaps the basic idea is small amounts of code, and large amounts of configuration/meta-programming via zcml? Many thanks, and again sorry if I'm judging things prematurely based on my limited experience with zope3. Cheers, Corey ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] woah... zcml O.D.
On Thursday 23 June 2005 02:32, Corey wrote: > Appologies if some of these questions seem naive, I'm just beginning to > more thoroughly delve into zope3 - of which I've been very impressed so > far. > > However - is it just me, or does zope3 seem to require a rather massive > amount of configuration? It is not massive. The reason that it seems massive is because a lot of the complexity that is usually in the Python code is moved to ZCML. Configuration is not an easy task. > Is that specifically an artifact of Component Architectures in general? Or > is this by design? If you want to ask this way: Any very flexible and component-oriented code base will have similar configuration. > Are "site administrators" really supposed to understand all that zcml in > the configure.zcml files, or are they more realistically the domain of > component developers? It seems to me that the configure.zcml looks almost > as if it would basically be considered "hands off", once the > application/component was coded and installed. They are not meant for site admins. And you are right, one should not modify a given ZCML. However, one can use overrides.zcml to override any ZCML of other configuration files thus enabling you to change the configuration. This would be only possible in Python via Monkey patching, which you will agree is a bad practice. > Generally how much of any particular configure.zcml could - practically > speaking - be modified in a usefull manner? All of it via overrides.zcml. > Even for relatively smallish apps, such as the buddydemo and zwiki, the > configure.zcml file seem quite large; I hate to imagine what a more > involved and complex app would do. The complexity of ZCML is not that bad, if you have written the ZCML yourself. Just looking at it without a particular goal is usually overwhelming, but such is looking at stars at night, even though you can see at most 2000 at any given time (in a very dark area). > Am I just looking at it wrong? Perhaps the basic idea is small amounts of > code, and large amounts of configuration/meta-programming via zcml? I would rephrase that: In order to produce clean, concern- and function-separated Python code, you need a fairly sophisticated configuration language to put all the pieces together. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] woah... zcml O.D.
Corey wrote: Appologies if some of these questions seem naive, I'm just beginning to more thoroughly delve into zope3 - of which I've been very impressed so far. However - is it just me, or does zope3 seem to require a rather massive amount of configuration? Zope has always required a fair bit of configuration. In Zope 2, this has largely been burried in the Python code, making Zope 2 Python code especially Zope specific. Is that specifically an artifact of Component Architectures in general? Or is this by design? The component architecture adds some configuration. Also, a goal of Zope 3, especially the Zope 3 application server is to make it possible to override components without changing Python code. Having said all of that, zcml also reflects the unavoidable process of getting things at least somewhat wrong at first. Over time, zcml has evolved and gotten easier to deal with. In particular, we are now in the process of simplifying zcml in a number of ways: - Zope 3.1 has many fewer component types and thus fewer zcml directives. Most components can now be registered with utility and adapter directives. Old directives are still supported for backward compatibility, but over time, I expect the vocabulary of ZCML directives to shrink quite a bit. - Starting in Zope 3.1, it is possible to declare interfaces adapted in Python and adapter and utility directives can use information defined in Python for required and provided interfaces. For example, most of my adapter directives now look like: I can make declarations in Python that aid interpretation of the Python code and I don't have to repeat those in zcml. - zcml was intended for configuration, but, in our attempts to make things easier, zcml has taken on a definition role in many areas. For example, a number of common directives, like browser:page, browser:editform, browser:addform and so on *define* new components as well as registering them. Our (ZC's) zc.page package is a rection to that that moves definition back into Python, where it belongs, allowing much simpler configuration. Are "site administrators" really supposed to understand all that zcml in the configure.zcml files, or are they more realistically the domain of component developers? They are the domain of component developers, who develop base configurations, and integrators who might overide configuration when integrating a package of components into an application. > It seems to me that the configure.zcml looks almost as if it would basically be considered "hands off", once the application/component was coded and installed. > > Generally how much of any particular configure.zcml could - practically > speaking - be modified in a usefull manner? In particular, a consumer of a package never modifies the zcml, however, as mentioned above, an integrator might override some of the configuration in theor own zcml. How much gets overridden depends on the needs of the integrator. Even for relatively smallish apps, such as the buddydemo and zwiki, the configure.zcml file seem quite large; I hate to imagine what a more involved and complex app would do. Am I just looking at it wrong? Perhaps the basic idea is small amounts of code, and large amounts of configuration/meta-programming via zcml? For both of these apps, there is much less zcml code than Python code. The zwiki app has an unusual amount of security policy in it. In fact, it has way too much, IMO. For one thing, it depends on a particular security policy. If a site uses a differeny security policy, they will have to actually rewrite the zwiki zcml file. The buddydemo application has *very* little application logic, which tends to inflate the configuration/code ratio. For 3.1, both of these packages zcml files could be shortened a fair amount. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] woah... zcml O.D.
On 6/23/05, Corey <[EMAIL PROTECTED]> wrote: > Appologies if some of these questions seem naive, I'm just beginning to more > thoroughly delve into zope3 - of which I've been very impressed so far. > > However - is it just me, or does zope3 seem to require a rather massive amount > of configuration? Well... no. And yes. *Developing* requires a lot of configuration, yes. > > Is that specifically an artifact of Component Architectures in general? Or is > this by design? This is by design, and it's an artifact of many component architectures. At least the good ones. The idea is that you take components, and configure them for use. This idea, which came to general notice with visual basic, has in Zope3 been merged with similar ideas in development, known as "aspect oriented development", where you make little objects that implement an "aspect" and the use configuration to tie them together. It is, I must say, all in all fucking brilliant. Excuse my french. > Generally how much of any particular configure.zcml could - practically > speaking - be modified in a usefull manner? Most of it. > Am I just looking at it wrong? Perhaps the basic idea is small amounts of > code, and large amounts of configuration/meta-programming via zcml? Exactly. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] woah... zcml O.D.
Thanks everyone for your responses - they were very informative. I feel I've got much better insight on the subject now, it's great to watch how the patterns begin to emerge and become recognizable - moments of "aha!". ( as an aside: I have to say - the condition of the codebase, the organization of the APIs and the quality of the documentation is absolutely beautiful - well done! It quickly becomes very clear how much thought and effort went into the whole framework. ) Cheers, Corey On Wednesday 22 June 2005 11:32 pm, Corey wrote: > Appologies if some of these questions seem naive, I'm just beginning to > more thoroughly delve into zope3 - of which I've been very impressed so > far. > > However - is it just me, or does zope3 seem to require a rather massive > amount of configuration? > ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users