RE: Maverick - Multiple shunt-factories
Thomas Wheeler <[email protected]>
| Newsgroups | gmane.comp.web.maverick.general |
|---|---|
| Message-ID | <E1C964891306D6119CBE0008C79FB51A1C5D0B@DAL-EXCH1> |
Idioms, best practices, usage patterns (and anti-patterns), and suchlike are not made clear by reading the source. Especially for a framework that is as extensible and flexible as Maverick. What many people call documentation is similar to what many people call commenting. It's of the form, "To create a new file, select 'File', 'New' from the menu." I'm thinking Wow, that's great, I would /never/ have figured that out on my own. (End sarcasm.) I'm making no criticism or judgement of the existing mav docs here. I'm pointing out that all is not clear from looking at the code and that good documentation is worth its weight in gold. (When printed on gold sheets, anyway :).) Unfortunately, I don't have time right now to do anything but throw in my 2c. Hopefully this semi-rant will motivate someone else.... -Thomas -----Original Message----- From: Mike Moulton [mailto:[email protected]] Sent: Wednesday, April 09, 2003 10:32 AM To: [email protected] Subject: Re: [Mav-user] Maverick - Multiple shunt-factories I agree that the docs should be finished at some point, however documentation will never replace simply looking at the code. Maverick is a very small framework (lines of code) and rather easy to follow. -- Mike On Wednesday, April 9, 2003, at 12:32 AM, Stefan Beekman wrote: > That was exactly my idea as well. > It would help me a lot with expanding the standard Maverick > framework!!! > > -----Original Message----- > From: Eelco Hillenius [mailto:[email protected]] > Sent: woensdag 9 april 2003 9:23 > To: [email protected] > Subject: RE: [Mav-user] Maverick - Multiple shunt-factories > > > Maybe it's a good idea to complete the documentation (remove the > TODO's)? > > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Schnitzer, > Jeff > Sent: dinsdag 8 april 2003 23:12 > To: [email protected] > Subject: RE: [Mav-user] Maverick - Multiple shunt-factories > > > The mechanism is very simple - views can have a mode attribute, which > is > an arbitrary string of your definition. At runtime, the Shunt picks > one > of the modes based on characteristics of the request. Your Shunt > implementation can interpret modes in any way you choose. > > You might or might not want to try to build a composite Shunt. My > guess > is that you will probably be better off with a single custom shunt that > encompasses all of your logic. The problem with trying to generalize a > composite shunt is the defaulting logic: > > <view mode="lang:en,browser:ie" .../> > <view mode="lang:de,browser:ie" .../> > > ...what do you do if the browser is IE but the lang is ch? Maybe you > could just require a view to be defined for every default, but once you > hit 3 or more different variables then you have many many default > cases... > > Since Shunts are simple to write, you're probably best off just writing > a custom shunt anytime you need complex logic. > > Jeff Schnitzer > [email protected] > >> -----Original Message----- >> From: Stefan Beekman [mailto:[email protected]] >> Sent: Tuesday, April 08, 2003 1:01 AM >> To: [email protected] >> Subject: [Mav-user] Maverick - Multiple shunt-factories >> >> Hi, >> >> First of all I want to address that I am new to this list and > relatively >> new >> to Java. >> Before dropping this message, I searched the Maverick list archives, > but >> couldn't find satisfying answers. >> Hopefully you can help me. >> >> We want to use the Maverick framework to develop the presentation > layer of >> our application. >> >> Maverick comes with a LanguageShuntFactory, which enables you to make > a >> language dependend application. >> Depending on the preferred language in the http header this class > returns >> the appropriate view. >> >> What I would like to do now is to add an extra "shunt-factory" to make > the >> website also dependend on a second (or even third) paramater, for > example >> a >> customer or department name. >> >> Does anyone know how to achieve this and how to configure the > maverick.xml >> file? >> Do I have to extend(subclass) the standard LanguageShuntFactory with > the >> additional dependencies or should I create extra Factories for every >> dependency I want to use? >> How must the maverick.xml file be configured? Should I nest the > modules? >> Or >> create the two- or three-dimensional dependencies by transforming the >> maverick.xml file with a XSLT file? >> >> If anyone has hints or done this before, your help would be > appreciated! >> >> regards, >> >> Stefan Beekman >> Consultant >> _________________________________________ >> LogicaCMG >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: ValueWeb: >> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! >> No other company gives more support or power for your dedicated server >> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ >> [INVALID FOOTER] > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > [INVALID FOOTER] > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > [INVALID FOOTER] > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > [INVALID FOOTER] ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com [INVALID FOOTER] ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com [INVALID FOOTER]