I am looking at potential frameworks for a new project. I've heard about Struts and have researched it over the last few hours. The MVC approach makes sense, but I'm still not sold on it yet. Here are some doubts I have.I think you don't have to validate the fields in your bean. You can use the validator plugin(?) to do javascript validation if
1) I think the separation of presentation (view) from the model and controller has gone too far (or probably is not done well in Struts). For example, I like to have my front end developers do form (field) validation. These developers should not have to write beans to do this (all examples I've seen so far do form validation in Java beans). This somewhat contradicts the J2EE development model where "application developers", who are basically scripters (not OO developers), do the front end work.
you wish.
2) There is just too much junk to write to do a simple form. The samples I've seen have involve too many files to do a simple form. Plus, why should I have to write a new bean for each form. Why can't the bean either be generated automatically or there be a general purpose bean (with properties that are created dynamically) that works for all forms?See the link here : http://jakarta.apache.org/struts/faqs/newbie.html#separate
Well the whole idea is to avoid the scripting that you mentioned.
3) We already separate business logic nicely, usually by encapsulating the logic in beans or EJBs. By the time the "application developers" get to work writing JSP/HTML, they are not writing any business logic. So why add the overhead of Struts (or any other framework)?
4) Because we separate out business logic into beans and EJBs, Java is simply used as a scripting langauge in our JSPs - in just the same way that VBScript is used in Active Server Pages. We try not to confuse the object oriented language called Java, with the scripting language called Java that we use in JSPs. We use a very small subset of Java in JSPs.
5) Based on #4, I don't particularly care for taglibs either. Again, we are simply using Java to do simple scripting. Loops are probably the most complex thing we do. So why add the extra overhead of taglibs. A loop is a loop whether it has the syntax of Java or a taglib. Plus, if I want my front-end developers to get any experience with serious development,True; a loop is definately a loop, but consider the use for taglibs in this case, would you want to write a loop in a jsp page if there was
a taglib that did what you wanted?
I'd rather have them dealing with Java as opposed to taglibs, which have no value in the real world of programming.Really? What do you think a taglib is made of?
Mike
--------------------------------------------------------------------- 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]