On 2/12/02 10:05 PM, "Ted Husted" <[EMAIL PROTECTED]> wrote:
> Nathan Bubna wrote: >> overall my impression of the vel-struts package so far is that it is written >> to mimic the functionality of the struts taglibs. frankly, i think that is >> the wrong approach. > > I agree. > > The focus should be on the controller's API, which flows from the > elements defined in the Struts configuration. > > ActionForward - provides a logical name for an URI, so it is not > embedded in the page. > > ActionForms - a JavaBean "buffer" for HTML controls, with a hook for > automatic validation. > > ActionMappings - a configuration object for a server-side Action. Most > often the target for a HTML form. > > MessageResouces - provides localised messages and labels. > > The Struts taglibs are one way to access this API ... among other > things. The vast majority of the Struts tags are not even relevant to > the controller's API, but strive to provide generic functionality > already built into Velocity. > > Personally, I believe it would be better to provide a "flat" object to > access the core controller API, which is what I started to do here: > > http://husted.com/struts/resources/velservlet.zip > > Once you remove the HTML-generation, bean-access, and logic-access > features of the taglibs, which are not relevant to Velocity, there is > not so much left. Most of it is encapsulated in this (demo-grade) helper > class, designed to be created by the controller and inserted into the > rquest. Inserting into the request is problematic, as this makes some assumptions. What I think would be nice is if there was a map of the data elements in the servlet scopes, so anyone could write a tool to access what they needed. You also then don't have to have agreement on what this tool is called, what the interfaces look like, etc. In Velocity, since we don't have any trouble accessing things that aren't simple property getter/setter methods, we can access a really rich API, and therefore would be pleased to avoid a lowest-common-denominator object provided by the controller. Geir -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting The question is : What is a Mahnamahna? -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
