File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Why should i use struts ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Why should i use struts ?" Watch "Why should i use struts ?" New topic
Author

Why should i use struts ?

Dharmin Desai
Ranch Hand

Joined: Feb 28, 2002
Posts: 81
Dear Friends,
I m J2EE programmer, learning MVC - Architecture !
I would like to know following answers !
1. Why should i learn and implement Apache's struts, AS it is possible to implement MVC - even without it ?
2. Is that manadatory for every J2EE - programmer to learn and implement struts, to develope good program ?
3. How is the market about Struts, I mean, is it well - known at developers and is that good to mention struts at Resume ?
Any struts - master can reply these que.
Please reply !
Thanks, Dharmin
[ July 30, 2002: Message edited by: Dharmin ]

SCJP2 (93%),SCWCD(88%)<br />-------------------------------<br />Never under estimate yr self, just represent yr profile in proper manner.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Dharmin,
JavaRanch has a naming policy which is strictly enforced. Please read the policy and change your display name if you wish to continue posting here. Thanks.


Matthew Phillips
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
In answer to your questions:
1. You can certainly implement the MVC without Struts, by why reinvent the wheel. Struts provides a proven implementation of MVC so that you, as the programmer, can concentrate on business logic.
2. It certainly won't hurt to know it. I have seen a couple of job adds requesting Struts knowledge. The more important thing to know is when MVC is an appropriate design pattern to use.
3. See my answer to #2.
john hedden
Greenhorn

Joined: Jul 20, 2002
Posts: 10
Another point about Struts is that if you are developing a heavily data driven web app then it is not likely you will be using Struts.
Also, I've heard, maybe someone can verify. Custom tag libs are becoming more popular?
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Custom tag libs are definitely becoming more popular with people developing in JSP.
However, I have become more and more disappointed with JSP recently. It just seems such a complicated and bug-inducing way to get things done for anything except trivial applications.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Frank Carver:
However, I have become more and more disappointed with JSP recently. It just seems such a complicated and bug-inducing way to get things done for anything except trivial applications.
Which is what I have been saying for 3 years! Surely a servlet based template could be developed without the use of JSPs. I more and more like the idea of using servlets to generate XML and then using XSLT to form the XML into HTML, WML, or whatever else is needed. (Don't let Map hear this! )


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Actually, you can't do "true" MVC over HTTP. The coupling's just not tight enough and there's no way to do asynchronous display updates. Which is why the J2EE equivalent is known as Model 2. It took 2 tries to get something reasonably quivalent.
When I first got into what is now J2EE, JSPs hadn't been invented yet. I thought they were wonderful after having to code all that content into servlets.
Problem is, a JSP full of active logic is just as nasty as a servlet full of display data. Each has their strong suit. This is what has made Struts and other such Model 2-based architectures so popular - they have a place for the code and a place for the view and a place for the data.
Of course, there's STILL a downside - now you have 2, 3, 4, 5 or more components required just to do something like pull a record from a database, edit, validate, and update it.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Don't get me started about those stupid light bulbs.
 
subject: Why should i use struts ?