Struts advantages and disadvantages in java

Hi, Can any one please send me the advantages and disadvantages of Struts frame.Regards,Sudhakar.
[125 byte] By [JavaSudhakara] at [2007-10-2 12:39:36]
# 1
Go to Struts website and read something and then get back to work.
Master_Consultanta at 2007-7-13 9:42:53 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

Advantages

Struts makes it easier to develop large web apps

The dominant (by far) framework - developers available, advice

available, books, etc.

Open source, freely usable

All components subclassable or replaceable!

Includes powerful JSP Tag libraries

Supported by third-party packages

Rather than hard-coding information into Java programs, many Struts values are represented in XML or property files. This loose coupling means that many changes can be made without modifying or recompiling Java code, and that wholesale changes can be made by editing a single file. This approach also lets Java and Web developers focus on their specific tasks (implementing business logic, presenting certain values to clients, etc.) without needing to know about the overall system layout.

Apache Struts has builtin capabilities for checking that form values are in the required format. If values are missing or in an improper format, the form can be automatically redisplayed with error messages and with the previously entered values maintained.

This validation can be performed on the server (in Java), or both on the server and on the client (in JavaScript).

Disadvantages

Bigger Learning Curve.

To use MVC with the standard RequestDispatcher, you need to be comfortable with the standard JSP and servlet APIs. To use MVC with Struts, you have to be comfortable with the standard JSP and servlet APIs and a large and elaborate framework that is almost equal in size to the core system. This drawback is especially significant with smaller projects, near-term deadlines, and less experienced developers; you could spend as much time learning Struts as building your actual system.

Worse Documentation.

Compared to the standard servlet and JSP APIs, Struts has fewer online resources, and many first-time users find the online Apache documentation confusing and poorly organized. There are also fewer books on Apache Struts than on standard servlets and JSP.

mohseen.masoor@suna at 2007-7-13 9:42:53 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
Thank U
JavaSudhakara at 2007-7-13 9:42:53 > top of Java-index,Other Topics,Patterns & OO Design...
# 4
JavaServer Faces is newer and more powerful then Struts. Look at the JavaServer Faces forum for more info.
amitteva at 2007-7-13 9:42:53 > top of Java-index,Other Topics,Patterns & OO Design...
# 5

Hi

Check the following,

Advantages of JSF (vs. Struts)

?Custom components

-JSF makes it relatively easy to combine complex GUIs into a single manageable component; Struts does not

?Support for other display technologies

-JSF is not limited to HTML and HTTP; Struts is

?Access to beans by name

-JSF lets you assign names to beans, then you refer to them by name in the forms. Struts have a complex process with several levels of indirection where you have to remember which form is the input for which action.

?Expression language

-The JSF expression language is more concise and powerful than the Struts bean:write tag.

?This is less advantageous if using JSP 2.0 anyhow.

?Simpler controller and bean definitions

-JSF does not require your controller and bean classes to extend any particular parent class (e.g., Action) or use any particular method (e.g., execute). Struts does.

?Simpler config file and overall structure

-The faces-config.xml file is much easier to use than is the struts-config.xml file. In general, JSF is simpler.

?More powerful potential tool support

-The orientation around GUI controls and their handlers opens possibility of simple to use, drag-and-drop IDEs

Disadvantages of JSF (vs. Struts)

?Established base and industry momentum

oStruts has a large core of existing developers and momentum among both developers and IT managers; JSF does not.

?Support for other display technologies

oJSF is not limited to HTML and HTTP; Struts is

?Hey! Didn't I say this was an advantage of JSF?

?Confusion vs. file names

oThe actual pages used in JSF end in .jsp. But the URLs used end in .faces or .jsf. This causes many problems; in particular, in JSF

?You cannot browse directories and click on links

?It is hard to protect raw JSP pages from access

?It is hard to refer to non-faces pages in faces-config.xml

?Self-submit approach

oWith Struts, the form (blah.jsp) and the handler (blah.do) have different URLs; with JSF they are the same. Many developers find this clumsy.

?Less current tool support

oStruts is supported by many widely used IDEs; JSF is not (yet)

?No equivalent to Tiles

oStruts comes with a powerful page layout facility; JSF does not

oBut you can extract Tiles from Struts and use it with JSF

?Much weaker automatic validation

oStruts comes with validators for email address, credit card numbers, regular expressions, and more. JSF only comes with validators for missing values, length of input, and numbers in a given range.

?But MyFaces has several powerful validators

?Lack of client-side validation

oStruts supports JavaScript-based form-field validation; JSF does not

?Worse installation

oJSF does not have equivalent of struts-blank to start with

?POST only

oJSF does not support GET, so you cannot bookmark results pages

JSF and Struts: The Future

?Possibilities

oJSF will fail and developers that want a framework will stick with Struts

?JSF will die

oNot impossible, since other MVC frameworks have failed already

oJSF will flourish and replace Struts

?Struts will die

oJSF will grow moderately, and developers will be split

?Both Struts and JSF will be widely used frameworks

?Prediction is difficult

oTechnical factors are not usually what decide these things

?Recommendations

oMigrate ongoing Struts projects to JSF: not yet

oStart real-world JSF projects: yes, but with some caution

Regards,

Milind Patil

milind_b_patila at 2007-7-13 9:42:53 > top of Java-index,Other Topics,Patterns & OO Design...
# 6

Although Struts has a number of significant advantages over the standard servlet and JSP APIs alone, due to its complexity it has some serious drawbacks as well.

Bigger Learning Curve.

To use MVC with the standard RequestDispatcher, you need to be comfortable with the standard JSP and servlet APIs. To use MVC with Struts, you have to be comfortable with the standard JSP and servlet APIs and a large and elaborate framework that is almost equal in size to the core system. This drawback is especially significant with smaller projects, near-term deadlines, and less experienced developers; you could spend as much time learning Struts as building your actual system.

Worse Documentation.

Compared to the standard servlet and JSP APIs, Struts has fewer online resources, and many first-time users find the online Apache documentation confusing and poorly organized. There are also fewer books on Apache Struts than on standard servlets and JSP.

Less Transparent.

With Struts applications, there is a lot more going on behind the scenes than with normal Java-based Web applications. As a result, Struts applications are:

Harder to understand

Harder to benchmark and optimize

Rigid Approach.

The flip side of the benefit that Struts encourages a consistent approach to MVC is that Struts makes it difficult (but by no means impossible) to use other approaches.

Now, if these disadvantages sound significant, they were meant to. Struts has some significant advantages, but the overhead and complexity of Struts can be a burden as well. Before you decide if Struts is right for your projects, you should try a simple Struts application to get a feel for it. Then, carefully weigh the advantages and disadvantages and decide if all of the Struts benefits outweigh the negatives. Sometimes they will; other times they won't.

sati08a at 2007-7-13 9:42:53 > top of Java-index,Other Topics,Patterns & OO Design...
# 7

> Although Struts has a number of significant

> advantages over the standard servlet and JSP APIs

> alone, due to its complexity it has some serious

> drawbacks as well.

>

> Bigger Learning Curve.

> To use MVC with the standard RequestDispatcher, you

> need to be comfortable with the standard JSP and

> servlet APIs. To use MVC with Struts, you have to be

> comfortable with the standard JSP and servlet APIs

> and a large and elaborate framework that is almost

> equal in size to the core system. This drawback is

> especially significant with smaller projects,

> near-term deadlines, and less experienced developers;

> you could spend as much time learning Struts as

> building your actual system.

> Worse Documentation.

> Compared to the standard servlet and JSP APIs, Struts

> has fewer online resources, and many first-time users

> find the online Apache documentation confusing and

> poorly organized. There are also fewer books on

> Apache Struts than on standard servlets and JSP.

> Less Transparent.

> With Struts applications, there is a lot more going

> on behind the scenes than with normal Java-based Web

> applications. As a result, Struts applications are:

> Harder to understand

> Harder to benchmark and optimize

> Rigid Approach.

> The flip side of the benefit that Struts encourages a

> consistent approach to MVC is that Struts makes it

> difficult (but by no means impossible) to use other

> approaches.

> Now, if these disadvantages sound significant, they

> were meant to. Struts has some significant

> advantages, but the overhead and complexity of Struts

> can be a burden as well. Before you decide if Struts

> is right for your projects, you should try a simple

> Struts application to get a feel for it. Then,

> carefully weigh the advantages and disadvantages and

> decide if all of the Struts benefits outweigh the

> negatives. Sometimes they will; other times they

> won't.

anything else you'd like to plagiarize from [url=http://www.google.com/notebook/public/04204639216650450147/BDRihIgoQ8Onw2r0h]here[/url] or anywhere else, while you're at it?

georgemca at 2007-7-13 9:42:53 > top of Java-index,Other Topics,Patterns & OO Design...