Sorry, I am getting way to busy to think about the specifics.  One thing
though.  Please keep this general it would be nice to be able to use it with
any template system:  WebMacro, FreeMarker, JSP, without having to recreate
the same thing for each.

----- Original Message -----
From: Dave Bryson <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Tuesday, April 11, 2000 8:07 PM
Subject: Re: Even More - Webmacro dynamic uri


> John McNally wrote:
> >
> > I have used two ways to avoid this.
> > 1.  In an application where you are going to have a Screen per template,
it
> > is better to have the screen set its template.
>
> Agree.
>
> >
> > An alternative to (2) would be to set up a service type object that is
keyed
> > from a pathinfo parameter and then it returns the path to the template,
the
> > associated screen, etc.  I originally rejected this idea in favor of the
> > above folder analogy. But I can't seem to remember any really good
reason
> > against it.  It strikes me a bit as a "God" object, but maybe not
everyone
> > will agree.  Frank and I were just discussing this same sort of idea,
but he
> > was thinking of using xml to spell out the relationships, and I was
> > originally thinking database when I rejected it.  It does seem better as
an
> > xml solution.  This solution also has the small advantage of a better
> > looking url as it is ugly to pass the path to the template within
Turbine's
> > use of the pathinfo.
>
> For the above: ( I like your suggestion... I'm trying to understand it...)
>
> So, are you saying then that you could have one WMScreen that would
process a
> set of WM pages.  This WMScreen may include a Security check.
> It could then look up a name (via an XML file) that a page author puts
into the
> WM page.
> The page author could use something like you suggest  - $link(MyForm) in
the
> page.
> The name(s) passed in $link(...) are agreed upon between the programmer
and page
> author.
>
> $link resolves to the WMScreen created that has the security check.
>
> In the WMScreen it grabs the name passed by $link ( $link(MyForm) - in
this case
> MyForm )
> looks up the associated WM page mapped in the XML file and creates a
> DynamicURI based on that and puts it into the WebContext
> (DynamicUri().toString()).
>
> In the Central Screen
> file://Something along these lines (this is *very* abstract)
> String screen = WMMap.getMappedScreen("link");
> String page = WMMap.getMappedPage("MyForm");
> DynamicURI uri = new DynamicURI(data,screen).addPathInfo(page);
> context.put(link,uri.toString());
> buildTemplate(context,page);
>
> Maybe the XML file would look something like this:
>
> <MappedWMpages>
> <Screen wmname="link" value="MySecureWMScreen">
> <link name="MyForm" wmpage="/forms/addform.wm"/>
> <link name="AddSomething" wmpage="/forms/additem.wm"/>
> </Screen>
> <!-- More Screens here if desired -->
> </MappedWMpages>
>
> The WMservice then would include a way of parsing this XML into a quick
lookup
> table
> that is held by this "GOD" like WebMacro Service object (WMMap) and used
by
> possibly
> several of these WMScreens.
>
> Conceptually, I really like this better than the $dynamicuri I suggested
> earlier.
>
> Please let me know if I'm missing your point!
>
> --
> Dave
> [EMAIL PROTECTED]
> your flame > /dev/null
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to