[Zope3-dev] Allowing views to be registered for classes rather than interfaces.

Martijn Faassen faassen@vet.uu.nl
Fri, 18 Jul 2003 18:27:02 +0200


Stephan Richter wrote:
> On Wednesday 16 July 2003 17:50, Martijn Faassen wrote:
> > The point is that I think they can hamper development under certain
> >
> > circumstances, and can be discouraging. I suspect I am not the only
> > Python programmer who thinks this way; after all we're programming
> > in Python, not using Java or C++.
> 
> I think that you are implying that interfaces must be perfectly designed as 
> soon as you start writing them, but I disagree. Interfaces will involve in 
> the same way code does, just slower, since much more depends on them.

Of course interfaces can evolve, it just can also hamper initial development
to have to maintain an interface separately. At least I think so. It just
can slow me down.

> But also during the initial development, my experience tells me that I usually 
> start writing an empty interface and place some fields in them (because you 
> certainly know **something** about what you are about to do). Then I think 
> about some initial methods and add them. Then I start coding to see whether 
> my concepts work and I often restructure the methods or method arguments many 
> times in the interface during development. But the interface serves as a 
> central point of my design. It always gives me a quick overview of how 
> everything is going to work, without worrying about implementation details. 

Sometimes I work like this. Sometimes I start out with classes and
my code evolves from this, then later I add a few interfaces. This
has been mostly the case for Forest (the interfaces that are there
are really really out of date). It depends.

> As I said yesterday on IRC, I really, really like developing in Zope 3; it is 
> a great programming experience. I found this especially enjoyable during the 
> messageboard demo product. If you look at the different steps you will see 
> how an iterative process approach can be done in Zope 3. I also understand 
> now why Adapters were called Features at the beginning. Because whenever I 
> add a new feature to my content component I write an Adapter for it, which 
> keeps the code very clean.

This is definitely good news to hear. :)

Regards,

Martijn