I think XDoclet is very nice. Thanks, Mark. - Robert.
----- Original Message ----- From: "Turansky, Mark" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, December 04, 2003 10:56 AM Subject: RE: Disadvantages of Struts? Robert Tran, you were griping about config files and the need to go between code (your Actions) and the xml config files. Other developers have scratched that itch already. Check out XDoclet: http://xdoclet.sourceforge.net/ This piece of software will generate your configuration files for you via an ant task. You can keep everything relative to an Action in one place, inside your Action class itself. You use JavaDoc-like tags to define your config files. The following is an example from a real application I maintain: /** * @struts:action name="GetMessageAction" * path="/GetMessage" * @struts:action-forward name="editMessage" * path="/EditMessage.jsp" */ The Action associated with the above JavaDocs is responsible for retrieving a bean, putting it in request scope, and forwarding to the proper page for editing. Having everything in a single file (the Action) is useful and is easy for me to keep in my head. When the WebDoclet Ant task executes, it will parse those tags and generate Struts-config.xml for you. It can generate ActionForms, Validator xml files, and more. It can also be extended to generate other code of your choosing. It works very well and there only a slight learning curve. something to look at and think about, perhaps. mark > Take Action for example, to > > write an Action, one has to paddle back and forth between the code and the > > configuration. It is like an executable having to configure each of its > > dlls. The visibility of the mappings is nice to have but the mappings can > > be generated after the fact as in a debugging view. When the application is > > finished, configurations become static. But since configurations are > > required, they will be like loose ends of the application. Another issue: > > how can one componentize his code and deploy it in a self-contained plug-in, > > as with Eclipse? Please forgive my novice. -----Original Message----- From: Robert H. Tran [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:45 PM To: Struts Users Mailing List Subject: Re: Disadvantages of Struts? Thanks, Ted. I agree that Struts is the best option available today. Like you said, there are areas that Struts can, and probably should, improve. I am delighted to hear that some of them will be addressed in 2.0. - Robert. ----- Original Message ----- From: "Ted Husted" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 04, 2003 4:40 AM Subject: Re: Disadvantages of Struts? > Yes, we should be passing an API context object instead of tucking > things away here and there in the various contexts. We started work on > one during the 1.1 march, but it was sidetracked by the module > initiative. At this point, it will probably be slated for Stuts 2.0. > > The other questions speak to whether you want to take a declarative > approach to writing a web application. If you are writing a small > application, the strategy of using XML configurations to deploy object > graphs can be more trouble than it's worth. But if you are writing a > larger application, most developers believe it is much better than the > alternatives. (Been there, done that.) Of course, your mileage may vary. > > There are several other web application frameworks available, most of > which are tracked by the wafer project. > > Choosing a framework is like choosing shoes. You really need to try them > on for yourself to be sure. > > Like most software products, Struts is far from perfect. But, like Java > itself, for complex enterprise applications, many developers find it's > the best alternative available today. Neither Struts nor Java is the > best choice for all applications and all teams, but most people do find > that it is a good choice for larger applications that need to be > maintained and improved over time. > > If there is a disadvantage to using Struts, it's that the underlying > design is so darn useful that people try to use it as an application > framework rather than a WEB application framework. Many teams invest > *way* too much business logic in ActionForms and Actions. Why? Because > most large application do need to utilize the Context and Command > patterns. But because they don't have a distinct business framework, > people usurp the Struts classes. > > The Chain of Responsibility package in the Commons Sandbox is a first > step toward creating a business layer framework. Webwork is doing > something similiar with their xwork package. > > -Ted. > > Robert H. Tran wrote: > > I am not sure that is true. Struts seems to lack of an API. IMO, there are > > more required configurations than necessary. Take Action for example, to > > write an Action, one has to paddle back and forth between the code and the > > configuration. It is like an executable having to configure each of its > > dlls. The visibility of the mappings is nice to have but the mappings can > > be generated after the fact as in a debugging view. When the application is > > finished, configurations become static. But since configurations are > > required, they will be like loose ends of the application. Another issue: > > how can one componentize his code and deploy it in a self-contained plug-in, > > as with Eclipse? Please forgive my novice. > > > > - Robert. > > > > ----- Original Message ----- > > From: "Rick Hightower" <[EMAIL PROTECTED]> > > To: "'Struts Developers List'" <[EMAIL PROTECTED]> > > Sent: Wednesday, December 03, 2003 6:24 PM > > Subject: RE: Disadvantages of Struts? > > > > > > > >>Don't be silly. Struts is perfect. > >> > >>-----Original Message----- > >>From: Robert H. Tran [mailto:[EMAIL PROTECTED] > >>Sent: Wednesday, December 03, 2003 2:10 PM > >>To: Struts Developers List > >>Subject: Disadvantages of Struts? > >> > >>I just wonder if Struts comes with any significant drawback. I mean not in > >>terms of when to use Struts and when not to use it necessarily, but more > > > > in > > > >>the line of anyone's wishes that it had been better. Any advice is very > >>appreciated. > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

