[Zope3-dev] Portlets vs Pagelets

Shane Hathaway shane at hathawaymix.org
Wed Dec 8 00:53:51 EST 2004


On Tuesday 07 December 2004 06:44 am, Joachim Werner wrote:
> - For really advanced web-based UIs the framework should simulate a
> long-running session/process, so I can do things like this as easily as
> they can be done in, let's say, PyQt:
>
>     answer = MessageBox.question('Do you want to proceed?',
>              'Yes', 'No')
>     if answer == True:
>      self.doSomething()
>
> "MessageBox" would display a web page with the message and a "Yes" and
> "No" button. As soon as the user has made his choice the result would be
> returned to the main application process.

Stackless Python (and good session tracking) is a great way to achieve that.  
Stackless allows MessageBox.question() to store the call stack and finish the 
request without returning.  In a later request, you can restore the former 
stack and proceed along the original path.  Pretty cool stuff, even though it 
breaks assumptions like "finally" clauses.

>   - "widgets" on a web page would automatically get unique ids for their
>     form actions and field names, so things don't get mixed up if there
>     is more than one "applet" (portlet) on the page. The developer would
>     be able to use non-globally-unique identifiers when he writes his
>     application logic.

The current HTML forms framework actually seems to be quite good at this; are 
you talking about something more?

> What I am hinting at is that we'll need larger building blocks and hide
> more of the implementation issues from the casual application
> programmer. Let me compare this with Lego: We shouldn't require the
> children to carve their own lego blocks from wood and decide on the size
> and design of the connectors on an individual basis. They should get a
> box with all kinds of blocks in all colors and start building things
> from them ;-)

I guess you're saying a component framework is pretty boring unless there are 
components built for it. :-)

Shane


More information about the Zope3-dev mailing list