On Mon, 2003-03-03 at 23:05, Huy Do wrote: > I've been using Webware for the past 6months and have had no trouble > with many of the issues you describe below. I have gained a lot of > knowledge from the apache Turbine project, and have tried to use Webware > + Cheetah (containment approach) in the same way as the Turbine + > Velocity approach. This has worked extremely well.
I should say that I'm also happy with writing Webware applications. My concern is more with sharing parts of those applications with others. > This is my basic servlet inheritance picture. > > Page -> BaseApp -> SecureApp -> GenericApplications (this last one is > the one all programmers will write). This is the problem I see -- we're all creating mini-frameworks inside of Webware. I have my own, and you have yours -- which is fine until one of us tries to share something with the other. My servlets will expect certain facilities which won't be available in your framework, and vice versa. I feel we need to bulk up the framework so that we won't each be creating our own frameworks, and we'll all be on the same page. Right now about the only framework we have for servlets is Page, and it's just not enough. > If you look at how Turbine separates their web page, I have followed > them in this department. > > Look under "Module Object Encapsulation" at > http://jakarta.apache.org/turbine/turbine-2.2.0/fsd.html Thanks for the link, I'll read that. There's several concepts from the Java world that in some way will probably be very helpful for this. Tag libraries are probably also dealing with the same issue. > > Lastly, there's the matter of specializing the generic > > servlet, which is really just another way of looking at the > > other two issues, though in this case there's the presumption > > that the servlet has a basic understanding of what to do, but > > you want to change that. > > I'm not sure what you mean here ? Do you mean to dynamically change the > flow of the program using some sort of configuration (please not xml) ? No, I usually don't like "configuration" per se, though the line between program and configuration can be fuzzy sometimes. For instance, say you have a reusable login screen (boringly simple, but easy example). That servlet could display the login form just fine in a generic fashion, but you might also want to be able to override the form display while still using the rest of the page. > A cool idea we have played with is to create components which can be > reused in different servlets. To use them, a programmer will just need > to create an instance of this component. This component will then > automatically/dynamically attach itself to the current servlet i.e > insert it's own actions into the servlets action list, dynamically > create new action methods, add itself to the search list etc. Again, the > trick is to come up with a good api for these components. This way, we > avoid having to create mixins, or use inheritance which I agree with you > does not work very well for this purpose. Yes, that's the sort of thing I've been thinking about > My only complaint so far is not having an integrated resource loader > (think java) type module. I've had to create a module global which I > load in __init__.py. Is this the correct way of handling stuff like this > ? Yes, that's about it. We should add some helper classes to MiscUtils to make this easier (and just to make it clear that's what you're supposed to do), but it would all boil down to the same thing anyway. Ian ------------------------------------------------------- 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 _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
