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

Garrett Smith garrett@mojave-corp.com
Tue, 15 Jul 2003 09:13:13 -0500


Phillip J. Eby wrote:
> At 04:22 PM 7/14/03 -0500, Garrett Smith wrote:
>> Stephan Richter wrote:
>>> On Monday 14 July 2003 16:40, Jim Fulton wrote:
>>>> I'm quite open to this proposal and would be curious to here what
>>>> other people think.
>>>=20
>>> YAGNI for the limitations you state in your E-mail. If someone is
>>> not using schemas for their content objects, they are not
>>> understanding the framework. ;-) Isn't it beautiful not to write
>>> tedious HTML forms=20
>=20
> If I have a corporate design department that is going to write the
> "tedious HTML forms", this isn't an issue.  Further, if that design
> department requires that I use precisely their HTML, altered not one
> iota, it's not clear that having the schema and generated HTML is a
> benefit.=20
>=20
>=20
>> I think this is the right answer. If a developer wants to developer
>> simple and iteratively, he's best off using schemas. Subsequent
>> tweaks, improvements, etc. can be made with minor changes to
>> schemas, fields, widgets and add/edit/display view subclasses.
>=20
> Maybe I'm confused, but if I already have an *existing* class, and
> wish to publish it, why should I have to create a schema for it?

I thought the complaint was that interfaces are required too early --
that one might not know enough about the problem/solution to create an
abstraction at step 1.

If you have an existing class, I would think it very easy to pick apart
the interface you want to expose. Personally, I like this step -- it
gives me a (brief) moment to think about and express how my code
interact with others.

Re schemas, my point was that, for developers that want to get up and
running quickly and later have the opportunity to change, schemas are a
great place to start.

But, in the interest of a productive argument :-) what are the major
problems with supporting views directly to classes? That's still the
issue, right?

 -- Garrett