Friday, June 18, 2004 06:22 AM
To me it is a way of writing a lot less code, to get things done, because you use a framework that has a lot of code already in it which does a lot of things for you.... IF you structure things the way the framework expects.
Servlets and JSP's are the same thing, by the way -- otherwise you would be writing a Web server for each of your web applications, etc.
Struts adds the assumption that you will have a bunch of things in your web application, which all have a jsp form page, a bunch of form fields to submit and validate as properties, an "action" to process them, a "forward" to a new jsp to display the results, and so on.
If you do, as most web apps do, and IF you can use the best practice and follow the "front controller" design pattern, Struts has a lot of things ready made for you. (the ActionServlet is the "front controller", there are jsp taglibs tied to "form-beans" for the properties, plus miscellaneous other tools, etc.)
So, you can concentrate on writing the code in the actions, etc. instead of having to design your own "front controller" servlet etc. to dispatch them all the time....
Of course then you have limited yourself, because you are depending on yet another framework (on top of servlet/jsp, on top of http and java, on top of the server OS, etc.)