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.
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.
Joined: Mar 09, 2001
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.
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?
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.
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! )
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.