Fastest way to mock up web UI?

goran at krampe.se goran at krampe.se
Tue Mar 27 08:12:28 UTC 2007


Hi!

Giovanni Corriga <giovanni at corriga.net> wrote:
> Il giorno lun, 26/03/2007 alle 20.15 -0700, Andreas Raab ha scritto:
> > Folks -
> > 
> > I have the need for mocking up a bit of a web UI as an administrative 
> > interface to some domain objects living inside Squeak. What is the 
> > easiest[*][**] framework to use for that purpose?
> > 
> > I'm sure one of the options is Seaside but I'm not sure it is the only 
> > game in town, neither am I sure if it's the right thing for the task at 
> > hand. Since I remember that various people had used a number of 
> > frameworks I'm curious about alternatives and tradeoffs. Any opinions or 
> > recommendations?

Well, I initially wrote HV2 and now I have been working with Seaside in
Gjallar quite a bit. I have written a bunch of apps using HV2 (World Cup
Betting site, SqueakMap server, some other odds and ends)and HV2 has a
few things going for it IMHO:

-Trivial to learn and debug, it is very small. No continuations or
"magic stuff" going on.

-Nifty URL "directory" to selector mapping. You just add a method in a
View class and tada - you can instantly "call it" by typing it in as a
URL. (HV2 uses a special method category for such selectors)

-Uses the same HTML generation model as Seaside did before Seaside
changed to the canvas model. Not sure if Giovanni has had time to move
HV2 in the same direction yet (he was working on it).

-Uses "real" URLs instead of Seasidish "weird" URLs.

Seaside of course offers a true component model where each WAComponent
can "live" on its own and removes all the need for state management
using url args, hidden fields and so on. And then there are tons of
other useful things in Seaside like Scriptaculous integration etc.

> > [*] easiest = least painful install, reasonably quickly to learn, fast 
> > intermediate results, open to future extensions (in case that UI needs 
> > to become "not-so-mockup" anymore ;-)

I guess HV2 fulfils this, but on the other hand so does Seaside IMHO.

> > [**] One strict requirement though: It must work under 3.8/Croquet.

Can't see any problem with either Seaside or HV2 - I use 3.8 in Gjallar
and I can't imagine HV2 to not work in 3.8. And I can't imagine Croquet
has any effect.
 
> I'm currently using (and extending) Goran's HV2, the web framework used
> for the SqueakMap server. It's not as advanced and innovative as
> Seaside, but I think it's a nifty little framework.
> 
> 	Giovanni

Right, the SqueakMap server code might serve as a useful "larger"
example to look at. HV2 also has some small examples in it.

HV2 invites you to write each "page" in a single method - sure, they can
get pretty large, but it works pretty nicely in practice. This is
because of the trick commonly used in HV2 by letting the same method
handle the GET and the Form POST giving automatic mapping of fields etc.

regards, Göran



More information about the Squeak-dev mailing list