jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes Why struts framework not any other? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Why struts framework not any other?" Watch "Why struts framework not any other?" New topic
Author

Why struts framework not any other?

Niranjan Mysore
Greenhorn

Joined: Dec 14, 2006
Posts: 6
Why should I use struts in my web application ?


Thanks & Regards<br /> Niranjan
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hi keshab,

That's very true. Please keep in mind that there are two MVCs floating around. MVC1 or plain MVC and MVC2 and struts is believed to be a good and strict implementation of MVC2 architecture.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Raghavan Muthu:
Hi keshab,

That's very true. Please keep in mind that there are two MVCs floating around. MVC1 or plain MVC and MVC2 and struts is believed to be a good and strict implementation of MVC2 architecture.


There are not two MVC architectures.
There is one.
You're confusing terms.
There is Model 1 which is not MVC and there is Model 2 which is.
Struts implements MVC, but so do plenty of other frameworks.
MVC can also be implemented without Struts (or any other framework for that matter).

A lot of us don't think Struts is the best way to go.
Much of its functionality was designed to overcome deficiencies in older versions of JSP. In JSP 2.0 (with EL and JSTL) a lot of Struts had become redundant.

If you're just starting out, you'd do well to learn how to write MVC applications using JSTL, and EL in your JSPs; without the use of a framework. Once you're comfortable with the concepts, then start to look at all the different frameworks available and see which one, if any, would would really be helpful. I've been using Bear Bibeault's FrontMan lately.

One reason to learn or become familiar with Struts is that it was an industry standard for a few years. This means that a lot of existing projects were written with it and having experience with it could be helpful in finding work.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Thank you Ben for correcting me. But i have come across that way.

The so called MVC is not called as MVC1 then? If so how come the name MVC2 ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Raghavan Muthu:
Thank you Ben for correcting me. But i have come across that way.

The so called MVC is not called as MVC1 then? If so how come the name MVC2 ?


I'm fairly certain that it came about by being confused with the terms Model1 and Model2. Another explanation that I've heard is that some people wanted to make a distinction between MVC for Servlet apps and the earlier uses of MVC for Smalltalk (and later Swing). If I had to bet though, I'd put my money on a mixup between the terms Model2 and MVC.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Ben Souther:


I'm fairly certain that it came about by being confused with the terms Model1 and Model2. Another explanation that I've heard is that some people wanted to make a distinction between MVC for Servlet apps and the earlier uses of MVC for Smalltalk (and later Swing). If I had to bet though, I'd put my money on a mixup between the terms Model2 and MVC.


The term is mentioned once in this article by a particular framework (PHP Dragon) vendor.
http://en.wikipedia.org/wiki/Model-view-controller

The important thing is that there aren't two types of MVC for servlet/JSP apps. There are several variations on the implementation but the basic principal is the same.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You might also find this FAQ entry useful.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Thank you Ben for the clarifications. I would go through and get back for any clarifications!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why struts framework not any other?
 
Similar Threads
Comparing issue in JSP
struts
AutoSubmit When a Page is Called
Struts - tiles
javax.servlet.jsp.JspException: Cannot find bean: "testList" in any scope