Exploring Zope and ZPatterns [WEB] [IDEA]

goran.krampe at bluefish.se goran.krampe at bluefish.se
Fri Oct 24 12:27:28 UTC 2003


Avi Bryant <avi at beta4.com> wrote:
> On Fri, 24 Oct 2003 goran.krampe at bluefish.se wrote:
> > Aah! And you all stole it from HttpView! Muuahahaha!
> >
> > Well, not exactly true of course - but I think Avi was "inspired" by the
> > HtmlBuilder etc in HttpView.
> 
> ;)
> 
> Yes, true - HttpView inspired me to ditch templates and focus on
> programmatic HTML generation, a decision that I'm extremely happy with.
> The actual mechanics of the HtmlRenderer that Seaside and SmallWiki use,
> however, are quite different from HttpView's.

As with many things I should of course look at it sometime... :-)
 
> > And no - HttpView is not as advanced as Seaside, but it is pretty nifty
> > in itself. And soon there will be a nice article to read with samples
> > etc! :-)
> 
> I know competition is a useful force and all, but it feels like we ought
> to be able to share more code than we do... what would you say is the
> "essence" of HttpView, and mightn't we be able to plug that into Seaside
> at some level?

We should probably be able to plug it in somewhere, yes.

The essence... Hmmm, something like this I think:

1. Very simple url mapping logic. Each "directory" in a url maps
directly to a selector in the View classes. I came to the conclusion
that setting up mappings etc is just "silly work" - for me, 99% works
just fine with selector names. Actually - I haven't felt the need yet to
NOT have this 1-1 mapping. Just create the method - and bam, immediately
addressable from the browser.

2. HVHtmlBuilder with the "Form smartness". It relies on the fact that
most Forms are statically built (=don't suddenly have other fields
depending on context) and that most POSTs will return more or less the
same page again (with the same form in it, but typically with entered
values in the fields etc). These two things can be taken advantage of to
avoid having to deal with ids on fields (autogenerated) and to get
"widgets" that you can send #value/#value: to.

>  Or is the essence of HttpView that it has very few
> dependencies? ;)

Hehe! Well... currently it just needs a Comanche of some kind. I just
got it working with Stephen's new KomHttpServer. 

> Avi

regards, Göran

PS. Since I am cleaning it up now and writing some samples etc, and will
also write an article - this is a good time to start thinking about
"connecting" with Seaside. Though I am not sure "how".



More information about the Squeak-dev mailing list