[Zope3-dev] Re: Separate presentation packages

Garrett Smith garrett at mojave-corp.com
Wed Feb 18 09:57:03 EST 2004


Another repost...

Jim Fulton wrote:

> plus:
>
>    modfoo/*.pt (template modules)
>    modfoo/*.jpg (images)
>    configure.zcml
>
> And I think that this provides less separation than we should have.


Per the nontrivial UI clause, these files should go into the browser
package:

  modfoo/browser/*.pt
  modfoo/browser/*.jpg
  modfoo/browser/configure.zcml

> People who *just* want to focus on presentation need to sort it
> out from the other code.  People who just want the application code
> have all this extra browser code.
> Jim
>

I think there's agreement on the separation of presentation logic from
interfaces and implementations.

I've seen three salient arguments for modfoo_browser:

1 - Flattens the package hierarchy

2 - Gives developers/users more flexibility in 'getting' 'stuff' (i.e.
when you 'get' modfoo, you don't automatically 'get' the browser code)

3 - Makes it easier to plug in new UI

Re flattening, I'm in the "deep hierarchies bad" camp. But using
underscores to flatten goes too far. As I pointed out before, this
argument could be applied to flatten everything. Seriously, we'd only do
this if there was a really, really compelling reason, no?

Re the second point, I think we're confusing package structure with
software distribution. The term 'get' is loaded (thus quoted) - what you
'get' depends on what's been packaged and for whom.

If someone wants to package their modfoo to decouple the UI from the
core, create two packages (RPM, source dist, etc.).

But we're talking about CVS here. As Jim pointed out, CVS should not be
the packaging/distribution mechanism. But the modfoo_browser proposal
does exactly that, per argument two above.

Re argument 3, I'm still not getting it. I've plugged in ooodles of new
UI over existing Zope 3 application logic/content using skins. If I
wanted to totally replace the existing Zope 3 UI, I'd create my own
distribution that didn't ship/use the 'browser' packages. I'm looking at
the same exact options with 'modfoo_browser', am I not?

 -- Garrett



More information about the Zope3-dev mailing list