HttpView overhaul was: Re: Exploring Zope and ZPatterns [WEB][IDEA]

Jimmie Houchin jhouchin at texoma.net
Fri Oct 31 16:15:54 UTC 2003


goran.krampe at bluefish.se wrote:
> Jimmie Houchin <jhouchin at texoma.net> wrote:
> [SNIP]
> 
>>Just thinking outloud. :)
>>I am not a web framework expert. How to go about reconciling and making 
>>both parties happy? I don't know.
> 
> I don't know either - I probably need to play with Seaside first. But
> note that HV is very simple, I am not sure it adds much by putting it
> inside Seaside - perhaps Avi has more to say on that matter.

I like simple, simple but capable.

In the end it may be that Seaside and HV coexist side by side happily 
complimenting each other. People can choose which best meets their needs.

> Also HV uses a few tricks that affects how you build your apps - the
> trick on my mind is the "building forms twice"-trick. The trick is IMHO
> neat, but it does affect how your apps look/work.
> 
> Example (using latest unreleased HV, the #ifPressed: is new):
> 
> simplefield
> 	"This method is called when accessing http://localhost/hello.
> 	It is first called with a GET thus building the form with an empty
> 	text field and showing it. The #postForm defaults to an POST url
> 	pointing to this method again. So when the user press submit
> 	we end up here again and the form is built the second time.
> 	This time around the builder object sees that there is a value
> 	for the textfield and puts that into the HVHtmlInputText instance -
> 	this happens when the widget is created using the #inputText method,
> 	so that we can get it by sending #value to it later in the method."
> 
> 	| builder field button |
> 	builder _ self builder.
> 	builder start; h1: 'Howdy!'.
> 	builder p: 'What is your name?'.
> 	builder postForm.
> 	field _ builder inputText.
> 	button _ builder submit.
> 	builder endForm.
> 	builder p: 'Your name is ', (button ifPressed: [field value]
> ifNot:['unknown!']), '!'.
> 	builder hr; srcLink; end.
> 	^builder

Looks interesting. I look forward to seeing it and your other 'tricks' 
in action.

Jimmie




More information about the Squeak-dev mailing list