views:

3242

answers:

8

Which of the following frameworks is the most commonly used in Java right now and, if different, which framework is growing in popularity the fastest in terms of adoption?

  1. Stripes
  2. Spring MVC
  3. Struts
  4. Struts 2
  5. Tapestry
  6. Wicket
  7. JSF
  8. No Framework - Pure JSP/Servlet
  9. Grails
  10. Some other framework not mentioned here
+3  A: 

Spring:

http://www.indeed.com/jobtrends?q=java+struts%2C+java+spring%2C+java+stripes&l=&relative=1

Baker
I suspect those results are very misleading as most of the references to Spring probably refer to the Spring core container, NOT the Spring MVC framework.
Don
+5  A: 

I think struts is the most commonly used one. It has been around for a long time and has a very good developer community behind it.

Spring is also gaining a lot of momentum because of its POJO style programming through Dependency Injection.

Faisal Feroz
+3  A: 

I think you need to make your question a bit clearer. By popular, so you mean "is most likely to be used in a project starting today" or "is used in the greatest number of projects"?

I have absolutely no data to support this, but based on experience, hearsay and conjecture, I suspect that (of the frameworks you've listed) the relative popularity is:

  1. Struts
  2. Spring MVC
  3. Stripes

I'm not sure how you came up with this list, but there are several other popular frameworks that you've omitted, such as:

  • Tapestry
  • Wicket
  • JSF

Grails is a framweork which seems to be growing very quickly in popularity, though it's debatable whether it's a Java web framework.

Don
Thanks. I updated the question to include Tapestry, Wicket and JSF.
karl
Also, is it correct to distinguish between Spring and Spring MVC?
karl
One more question - when you say Struts is the most popular based on your experience, do you mean Struts 1 or Struts 2 or both together?
karl
One more question - If you were to include Tapestry, Wicket and JSF in your list, would it change the order of popularity at all?
karl
Spring and Spring MVC are two very different things. Spring MVC is a web framework, whereas Spring is a collection of APIs for enterprise Java development based on dependency-injection, AOP, and testatbility.
Don
+2  A: 

Struts 1.x is the most commonly used Web Framework, there's no doubt about it as Faisal mentioned. Too many lines of code written with it. Most companies are trying to upgrade to Struts 2.x to avoid complete rewrites.

For new or not so old projects, you might see something like Seam, Spring, JSF, Wicket, GWT are probably popular. I am not mentionning all the other existing frameworks such as Stripes as there's not tons of documentation for it yet.

Is GWT used as a web framework by itself or usually in conjunction with another framework. I had the impression it was primarily for Ajax-ifying an existing site. It does seem to be experiencing a lot of growth based on the job posting statistics on Indeed Job Trends. Thanks for that tip.
karl
There's indeed more requests for GWT experience lately on job boards. Employers ask for about 1 year of experience usually. As far as I am aware of, people mix GWT with other technologies most of the time.Regards
+3  A: 

Spring MVC is a good way to go if you already have a Spring Java App. But you might also look into Apache Wicket which seems to be kind of a "rising star". Both are wide spread ( Spring MVC is and Wicket seems to be soon ) so that learning one of the might help you in future.

Using Spring MVC requires some Spring knowledge. So if you start from zero you might be faster with Wicket.

Nico Heid
Yes, thanks, I'm going to take a look at Wicket.
karl
+8  A: 

To me it goes like,

  • Stripes, makes perfect sense for a small-to-medium web application. You might get a hard time to get help, though.
  • Spring MVC and Webflow, is the most suitable if you are already using Spring IoC, IMO. Otherwise, I don't see how it fits without.
  • Struts, makes sense to an existing application already implemented using Struts.
  • Struts 2, makes sense to upgrade existing Struts application
  • Tapestry, I have seen every new project consider it, and then decide to go with something else.
  • Wicket, great framework. lots of folks adopted it to build new apps.
  • JSF, great job market, plenty of books, lots of support. But Seam gave a compelling reason to adopt it. Otherwise, few developers need to fold their mind to digest it.
  • Seam, great framework, especially if you already decided to go with JSF as a web framework. Lots of folks doing Seam these days.
  • No Framework - Pure JSP/Servlet, there are some hardliners who still argue why need a framework, when simple Servlet/JSP and Filters can do that. One of them is Bear Bibeault author of JQuery in Action.
  • Grails, not a Java web framework. Groovy is not Java, yes it runs on JVM but thats also true with Scala and Jython and few other scripting languages.
Adeel Ansari
When you say JSF has plenty of support - do you mean here on S.O.? If not, where? I've noticed that the .Net activity on S.O. is much greater than the Java discussions so I wasn't sure if that means it's hard to get support here. I'd be curious what your experience has been.
karl
It sounds like, if you had to choose, you would start a new project with Wicket, Seam or JSF. Of those three, how would you rank them, top to bottom, or is it possible/meaningful to do so?
karl
No, I don't mean S.O. merely. From plenty of support, I meant, many books, examples, tutorials, java forums. Here we have more .NET users than Java users, may be merely because most of us got here from codinghorror blog and there you will find Microsoft techs more. So, I think it makes sense.
Adeel Ansari
No I don't necessarily. Its actually depends on the type of application I am gonna do. May be if I need not anything Seam, Spring provide me, I would simply go with Stripe or Wicket. Or may be when I need to make few simple pages then I would rather go with JSP/Servlet.
Adeel Ansari
I would definitely go with Seam or Spring, when I need what they provide. Like IoC, AOP, Webflow, EJB support, remoting support, timer support and many more. And you may think of scaling Spring and Seam scale well and you will find lot of material which exclusively discuss scaling in Spring or Seam.
Adeel Ansari
I discovered Wicket after using Struts for years and will never go back. Wicket is really straight forward (several colleagues could learn it quite fast) and you get a lot of stuff for free.Especially in combination with Hibernate and databinder (databinder.net) developing database centric web applications is fun.
jkl
+1  A: 

As far as Job postings are concern, the ranking goes like this, top to bottom, AFAICS.

  • JSF
  • Spring, Spring MVC, Spring Webflow
  • Struts 2
  • Struts
  • Wicket

Others I am not sure.

Adeel Ansari
karl
karl
Thanks for this feedback. I am interested in how all of this relates to the job market and no one else addressed this.
karl
May be, but you can see Spring, not Spring MVC may be. JSF is web framework, whereas Spring is an application framework, where web is just a part of it. You can go with JSF + Spring. But in that case I will suggest Seam. Because it fits better with JSF. In fact JSF is its answer for web.
Adeel Ansari
Again, may be your results merge Struts and Struts 2. Then obviously you will get higher results for it. And don't forget Struts enjoyed the height at that time, when there was none or few niches. So, there are many applications already built on that.
Adeel Ansari
That's true, yes, it may be Spring, not Spring MVC that's driving those numbers - I forgot about that.
karl
Does that mean Wicket is the most efficient and JSF the least?
Stephan Eggermont
@Stephen: Couldn't see much about efficiency here. I assume, you mean efficient in terms of development time. Then, it would depend on the skill, knowledge, and experience of the team in either of the frameworks.
Adeel Ansari
+1  A: 

Agree that Struts is the most commonly used but not necessarily the most popular now.

ziggy