>
> werkzeug already allows you to wire independent middlewares together.
>

Yes -- it's a question of ease of use.
Since whiff is almost exclusively concerned
with wiring applications together into a configuration
it helps reduce the focus to just wiring.
For example consider this configuration for adding a
wiki page on a form submit

{{include "addItem"}}
        {{use-include successPage "viewPage"/}}
        {{using failurePage}}
                {{cgi-default Name}}{{/cgi-default}}
                {{cgi-default Title}}{{/cgi-default}}
                {{cgi-default Summary}}{{/cgi-default}}
                {{cgi-default Text}}{{/cgi-default}}
                {{include "editForm"}}
                        {{set-id Name}}"{{get-cgi Name/}}"{{/set-id}}
                        {{set-id Title}}"{{get-cgi Title/}}"{{/set-id}}
                        {{set-id Summary}}"{{get-cgi Summary/}}"{{/set-id}}
                        {{set-id TextSource}}"{{get-cgi Text/}}"{{/set-id}}
                {{/include}}
        {{/using}}
{{/include}}

(From http://aaron.oirt.rutgers.edu/myapp/docs/W1100_1200.wwiki
-- this invokes the "addItem" middleware to attempt to insert
form data into a wiki data storage, passing the "viewPage" application
as the application to deliver the response if successful
and the "editForm" application to deliver the response on failure.)

You could implement the same thing including the
"addItem" and "viewPage" and "editForm" middlewares
in a single largish Python module, but the wiring would
be hard to see hidden inside lots of method calls.
I think the configuration template above brings the wiring
into the daylight (of course, once you know how to read it).

   -- Aaron Watters

===
Eight Megs And Constantly Swapping

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to