If you're bound to using the Struts dispatcher, it's fairly painful to integrate any other tools. Basically, Struts has one and only one way of "modularizing" views - a RequestDispatcher.forward().
I suppose this does make it possible to use Maverick views, but it's ugly: You can forward to maverick commands. This would require maintaining both config files, although the maverick one would be very simple, defining no controllers and only one view per command. Using Domify and XSLT would be a little tricky - you would have to write your own ViewFactory. The normal DomifyView expects to get the model from the controller, but you need to obtain the model from the request attributes (where Struts places it). So basically, it can be done, but it will be a hassle. Of course, if you're working on the 1.1 JDK, maybe this isn't the biggest obstacle you've had to overcome :-) Jeff Schnitzer [EMAIL PROTECTED] > -----Original Message----- > From: Ed Ward [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 8:32 AM > To: Jeff Schnitzer; [EMAIL PROTECTED] > Subject: Re: [Mav-user] Maverick to Struts > > I suppose I should have been more explicit in my previous email, which was > posted in part to help me let off some steam. :-o > > I'm aiming at reusing the View mechanism and the controllers (with a few > modifications to overcome the singleton nature of Struts). The general > idea > is to have the Struts actions forwarding to Maverick style views to > provide > the transforms etc. > > I've been working on an implementation that works with a servlet 2.1 API > and > jdk1.1.x (It's currently running in VisualAge 3.02 (urghh)). I'm using the > TrivialView and Transforms along with a DispatchedView. The configuration > is > hard-coded rather than driven from a configuration file. I've ported the > Jakarta Commons packages to the 1.1.x platform. The eventual platform will > be WebSphere 4.0, so there'll be a few changes when that happens. > > One good thing from my point of view though, is that although the use > Struts > has been mandated on this project, its use is mainly as a dispatch > mechanism. Use of the Struts tag libraries has been discouraged, so a > Maverick style view mechanism will be really cool and will hopefully be > good > publicity for Maverick on other projects which will hopefully be able to > make use of the view mechanism. > > Ed. > > ----- Original Message ----- > From: "Jeff Schnitzer" <[EMAIL PROTECTED]> > To: "Ed Ward" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, April 23, 2002 1:36 AM > Subject: RE: [Mav-user] Maverick to Struts > > > > The question is, which part? > > > > I can identify three discrete pieces of an MVC framework which could > > conceivably be mixed and matched: > > > > 1) The controller/action part, including bean population, form > > validation, etc. > > 2) The view part, including jsp taglibs and (for Maverick) > > transformation, etc. > > 3) The core, which basically covers everything else. In particular, it > > includes the Dispatcher/ActionServlet, the configuration file, and how > > the components are put together. > > > > Which parts of Maverick do you want to work with which parts of Struts? > > > > A lot of interoperability with Struts is possible if you use the > > Maverick core. It is even possible (although I haven't tried it yet) to > > use Struts Actions and Struts views (with their own JSP taglibs), > > getting transforms, shunting, and the flexible config file from > > Maverick. This would require building fairly simple implementations of > > the ControllerSingleton base class and ViewFactory. > > > > Struts however is not very modular, so if you need to use the Struts > > core (including their ActionServlet), I don't know what you can do. > > You're going to have a rough time with XSLT, too, because it'll be very > > difficult to get more than a single transform configured. > > > > Jeff Schnitzer > > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > > -----Original Message----- > > From: Ed Ward > > Sent: Sat 4/20/2002 9:31 AM > > To: [EMAIL PROTECTED] > > Cc: > > Subject: [Mav-user] Maverick to Struts > > > > > > > > Hi, > > > > Hold on to your hats whilst I ask what might sound a really dumb > > question. > > How easy is it to wrap a Maverick application with Struts? > > > > The reason I ask... The client I'm working for recently made an > > announcement > > that all their future webapps will be developed with Struts :-(( > > I did what > > I could to make them see the error of their ways, but AFAIK they > > haven't > > even taken a brief look at Maverick and the lead architect > > hadn't even put a > > working Struts app together when the decision was communicated! > > I don't have > > much knowledge of Struts myself, hence the question. > > > > Suffice it to say I'd still like to rework our UI using Maverick > > and XSLT, > > but now I have to consider the implications of my client's > > Struts > > requirements. > > > > The presentation layer of the app I'm working on requires > > extensive rework > > to enable it to use either Maverick or Struts, but I've already > > started > > rewriting with Maverick in mind. Any advice as to how I can keep > > the > > client's Struts fans happy and not lose my changes based on the > > use of > > Maverick? My guess is that it's going to be easier port a Struts > > application > > to Maverick than the other way around. > > > > Ed. > > > > > > > > _______________________________________________ > > Mav-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/mav-user > > > > > > > _______________________________________________ Mav-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mav-user