aspose file tools*
The moose likes Struts and the fly likes Pros and Cons of Using Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pros and Cons of Using Struts" Watch "Pros and Cons of Using Struts" New topic
Author

Pros and Cons of Using Struts

Ruchi Gupta
Greenhorn

Joined: Sep 09, 2000
Posts: 11
Dear All,
I am evaluating the Apache Struts Framework to be used for our new Project.
What we are looking at is:
"A framework that allows us to focus on building application without spending a lot of time writing the code, a framework that is organized and result to coordinated processing."
Telling you about the Project:
- J2EE platform
- Oracle 9i as Database
- Its an intranet based application ( Browser based ), but one functional module would be a Java Swing application.
To meet the above requirement, I have two Choices:
- Use Struts Framework ( cost is not a big issue )
- Use an in house framework
Advantages of inhouse framwork [ MasterCraft ] are:
- Based on MVC pattern
- Provide Client server enviornment for Development
- Providees with Data Modelling (results to persistent EJB)
- Tool to create Front end View ( JSP or Java Swing )
- Unit testing of front end and backend, before integartion
- version Control
- Automatic code generation
- Few generic ones, that are in strust too
Using Mastercraft seems very lucrative, but still before taking any decision we need to look at other options too...
Can you suggest any great advantage or Disadvantage of Struts....... which is specific to it.
Thaks in Anticipation.....


Ruchi<br />_ _ ___________________________ _ <br />Tata Consultancy Services,<br />New Delhi, India
alzamabar
Ranch Hand

Joined: Jul 24, 2002
Posts: 379
Originally posted by Ruchi Gupta:
Dear All,
I am evaluating the Apache Struts Framework to be used for our new Project.
What we are looking at is:
"A framework that allows us to focus on building application without spending a lot of time writing the code, a framework that is organized and result to coordinated processing."
Telling you about the Project:
- J2EE platform
- Oracle 9i as Database
- Its an intranet based application ( Browser based ), but one functional module would be a Java Swing application.
To meet the above requirement, I have two Choices:
- Use Struts Framework ( cost is not a big issue )
- Use an in house framework
Advantages of inhouse framwork [ MasterCraft ] are:
- Based on MVC pattern
Struts is based on MVC
- Provide Client server enviornment for Development
Struts is not a development environment, but a framework to make web applications more mainteinable and easy to implement
- Providees with Data Modelling (results to persistent EJB)
- Tool to create Front end View ( JSP or Java Swing )
As told before, Struts is a framework, not a development environment. You can build some Struts components by using xdoclet and ant together
- Unit testing of front end and backend, before integartion
You can use ant and junit(together with httpunit)
- version Control
No development environment
- Automatic code generation
No development environment
- Few generic ones, that are in strust too
Using Mastercraft seems very lucrative, but still before taking any decision we need to look at other options too...
Can you suggest any great advantage or Disadvantage of Struts....... which is specific to it.
Thaks in Anticipation.....

The main advantage of Struts, IMHO, is that it allows to easily separate different layers(The view, model and controller) making application more maintenable and scalable. The reason is that all the requests pass by a Servlet Controller and then addressed to various 'Actions' to be executed. It comes with a series of tag libraries useful if you're using the JSP as presentation technology. The maintenability is due to the high quantity of set-up information provided to the application, which allow to avoid hard-coding in programs.
My 2 cents.
Marco


Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD
tonyqu
Greenhorn

Joined: Sep 02, 2002
Posts: 2
If most ones of your team are not familar with Struts and no available Tutor for it, you should not take Struts as frameworks.
As you have said, MasterCraft is good one for your team. Maybe you can have a research on Struts first but not using it in this project.
Pros:
1.Open source framework
2.Good example for understanding J2EE Design Pattern
3.Excellent Tag lib
4.Make application more configrurable
5.Supported by many tools & popular IDEs
Cons:
1.Still in development
2.Taglibs are hard to grasp
3.Add complexity to application
If your team uses XP as process, you can hava a spike on it first. And then applying Pair Programming to teach blue ones.
Hope that it can help u!
[ February 26, 2003: Message edited by: tonyqu ]
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I think the hardest thing about Struts is that everything has to be set up perfectly or you end up getting non-helpful error messages. There are so many pieces that have to integrate together that it is very easy to misconfigure Struts and have nothing work.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Pros and Cons of Using Struts