2

I'm very new to the principle of Service Component Architecture and Zope in general, but the more I look, the more ZCA seems to be a good solution for a certain class of problems I often encounter.

I have read through most (if not all) of the zope.interface and zope.component tutorials, and I'm left with the feeling that I understand the library's constructs and terminology (e.g. I understand how interfaces relate to adapters), but not how the framework, on the whole, is intended to be used.

What's more, the ZCA seems to be built around the principle of Service Component Architecture, but I don't understand how to go about employing Zope tools to implement SCA-compliant software.

My questions are as follows:

  1. To what extend does ZCA want me to adhere to "the SCA way of doing things"?
  2. What are the fundamental assumptions/concepts of SCA I need to bear in mind? (please see below for information on what I think I understand)
  3. What is the relationship between the Zope component registry and importing things from submodules? Is the former meant as a replacement for the latter in most circumstances?
  4. I think I have a problem that would benefit from the ZCA. What are the usual features of a problem that make the ZCA the correct answer?

Supplementary Information:

Familiarity with Zope Constructs

I have read through the Comprehensive Guide to Zope Component Architecture, but I'm left with a feeling similar to when I learned my first programming language: I know the names of things and what they do, but I don't understand how to orchestrate all the various pieces into a useful thing.

By analogy, a python newbie might know how to define a function and make a loop, but he doesn't know how to make a program.

I read through the above guide's case study, but I frankly didn't find it very elucidating. I see how ZCA helps in that particular context, but I'm struggling to generalize.

Familiarity with Software Component Architecture

I only have a very superficial understanding of SCA, most of which stems from the Wikipedia articles on SCA and Service Oriented Architecture, along with this article from my (distant) past life as an indie game developer.

Perhaps I'm missing something crucial, here? I've been trying to reason in terms of implementing the ideas in the "Cowboy Programming" article above (the gamedev one) with ZCA, but maybe I'm only confusing myself?

A Solution in Search of Problem?

I don't want my fellow stackexchangers to think that I'm hell-bent on using ZCA for my next project. I'm not. I'm simply struggling to understand The Right WayTM of using ZCA.

Again, I'm unable to:

  • generalise from the examples provided in the documentation
  • imagine the high-level structure and organisation of a ZCA code base.
  • 2
    I've never used the term SCA in context of the ZCA; a quick glance at the WP description tells me SCA is far higher level (and includes support for the components to be implemented in different languages). – Martijn Pieters Feb 21 '15 at 16:49
  • @MartijnPieters, this surprises me. ZCA seems to have a notion of "services" (in the SCA sense) and is all about making highly-independent things talk to each other through strictly-defined interfaces. Is there a "Zope paradigm" of any sort? Could you address questions 3 and 4? Thanks! – blz Feb 21 '15 at 17:40
  • @MartijnPieters, I would also like to point out that the official Zope site seems to endorse "component architecture" (wiki.zope.org/zope3/ComponentArchitectureOverview) although perhaps this is distinct from SCA? wiki.zope.org/zope3/ComponentArchitectureOverview – blz Feb 21 '15 at 18:03
  • 1
    There are several such patterns. See Component-Based Software Development for a description of some of them. See also MEF. All that's really required is an Interface and registration mechanism. – Robert Harvey Feb 21 '15 at 20:17
  • 1
    FWIW, I don't use Plone on client projects, but I found studying how Plone uses the ZCA to be very valuable in learning how to use the ZCA effectively. Plone viewlets as multi-adapters really made it click for me. – Iain Duncan Jul 19 '17 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.