开发者

Help selecting java component-based web framework

开发者 https://www.devze.com 2023-02-07 22:18 出处:网络
I\'m interested in trying and learning a component-based web framework. Currently, I only have experience with action-based frameworks like Spring MVC and Grails. I\'m deciding between: JSF 2.0, Wicke

I'm interested in trying and learning a component-based web framework. Currently, I only have experience with action-based frameworks like Spring MVC and Grails. I'm deciding between: JSF 2.0, Wicket, and Tapestry.

I'd appreciate help in understanding:

  1. Which of the three is "easiest" to learn?
  2. Which o开发者_开发技巧f the three has the best/most resources (books, websites, books) available?
  3. Which of the three has the most stability in terms of code (past-future compatibility) and community
  4. Which of the three offers the most performance/least resource (cpu and memory) hungry?

Thanks!


My personal preference is for Tapestry. However, programmer efficiency is my primary criteria. If these are the most important criteria to you, you probably want to go with something else like JSF 2.0.

  1. I found Tapestry reasonably easy to learn, but I had a background in WebObjects. If, for example, you've only done Struts programming, you'll probably find it a bit more difficult.

  2. Most people learn Tapestry via the mailing list. The community is very helpful and the archives are very useful. (http://tapestry.markmail.org) There has just been a big push to really improve the Tapestry user documentation at http://tapestry.apache.org and the results are outstanding. If you want to know about the quantity of books, do a search at Amazon. JSF 2.0 and Spring MVC are likely to have the largest quantity of books.

  3. Tapestry 5 has been very stable in terms of letting you upgrade applications from 5.0 to 5.1 to 5.2 with minimal issues. A few (vocal) people complain that they couldn't upgrade Tapestry 4 applications to Tapestry 5. Personally I'd rather deal with a framework that had a clean starting point and built on the experience of previous versions rather than the code base of previous versions. If your goal is to choose a framework with lots of legacy code out in the wild (for example, if you are wanting to do consulting to help companies with their existing code) then you should probably look at Struts.

  4. Performance usually depends a lot on what you want to do with a framework, so I can't give you a specific answer. I have yet to see any framework comparison where all the code is written by people who specialize in that particular framework. This means that tests are so basic that they tell you nothing about actual practice or they are complicated enough that the results skew toward the frameworks the tester is most experience in using.

    Unless you are trying to create something like eBay, you can probably get any of these frameworks to perform well. Considering how cheap hardware is, you are probably better off choosing the one that gives you the best programmer efficiency.


I think, You should start by checking java web framework shootout that Matt Raible has compiled and updated recently:

  • Here is a direct link to comparison: http://spreadsheets.google.com/pub?key=0AtkkDCT2WDMXdC1HOEtnUHpCejJMbUhGeGJWUmh5dVE&hl=en&output=html
  • Here is a story about it http://raibledesigns.com/rd/entry/how_i_calculated_ratings_for

Personally, I am Tapestry user since version 3 :) and have used all of them. While, making Tapestry 4 backwards incompatible with 3, then 4.1 incompatible with 4 and finally 5 incompatible with rest of them was very hard on developers, I think that it was for the best. Tapestry 5 is better than any previous version in every aspect and now contributors keep on adding cool features along with hardcore improvements without breaking backwards compatibility at all.

What I like about Tapestry 5 the most is that you can substitute almost any part of the framework with your own implementation - it is that flexible and customizable.

Another thing that keeps me warm is that Tapestry contributors are very focused on making me more productive (as a developer) by implementing all sorts of nifty components/features.

But these are just my emotions, and after all, I'd say that it doesn't matter which one eats less memory or has more books. What matters is which one makes you/your team happier, more motivated and more productive and only way to find this out is to give a try to each one of them :)


Only proper answer is: go and try all of them in some small example application. But as my preferences I would choose Tapestry 5.

Ad1. It is reasonably easy to learn. Over time it gained enough materials to learn how to use it. Also user list is great and people are very responsive.

Ad2. Probably JSF will win in the end in category of learning materials as it is java standard.

Ad3. I wouldn't count tapestry 5 as backward incompatible. It is different framework than t4 and t3. It just happens to have same name ;) And t5 is stable and honors previous versions for over 2yrs.

However that will be also won by JSF. It is java standard and same as java, it will be backward compatible for next 100 years.

Ad4. That depends on who tests application and how he implements features. But here JSF comes last as fair I remember.

Benefit of T5 is that any component library will be compatible with any other lib. That may not be true for JSF. I believe that primefaces can't be combined with icefaces or any other implementation.

But from those 3 I used only tapestry in real project. Wicked looked nice but I just prefered Tapestry. As for JSF after 1.2 I don't wanna try new version till I will have to. Also Tapestry is just great framework that fits my need.

Also think about your boss. They always want something with a badge of standard. That's why choosing oldest version of Struts, java 1.4 and JSF is always a good idea :/

Regards Michal


I would say Wicket or Vaadin.

https://cwiki.apache.org/WICKET/wicket-reference.html

http://www.vaadin.com/

  1. Easiest to learn : If you know swing, it will be easier to understand. valid for both.

  2. Wicket probably has more resources than vaadin. The user list is also very active and helpful.

  3. Both are pretty mature projects. Future compability is sth in the future but I guess commiters will be doing their best to release with best possible backward compabilities.

  4. This is only a guess and is not based on actual performance testing : Probably wicket will be doing better than vaadin.

One final thing is, getting cool/nice looking UI is much easier with vaadin.

For Tapestry, see the below link:

https://stackoverflow.com/questions/1303438/why-did-you-stop-using-tapestry


Those are interesting criteria for selecting a framework. Usually your actual programming experience is going to be more important than how many books. An "easy to learn" criteria may make some sense, but if a framework requires 10 hours more of up front investment, but it saves you 10 hours per week of programming, it is well worth the beginning investment.

If you really want to find a good fit for you, it is probably best to go ahead and write a small application in a number of different frameworks.

The problem with this approach is that unless you have time to become at least partially proficient in each framework, your opinion is going to be skewed based on what you are most familiar with.


I have spent some time reading about Tapestry. I find that is a bit better than I thought about it before. In fact there are very many in common in approach between Tapestry and HybridJava. It will take some time but I hope to give a more detailed comparison here later.


First of all (and most important) those frameworks that claim they are component-based in fact may be very different in what they mean by components. It is one thing in Wicket, another in JSF and something absolutely different in Struts and so on. The most strong definition of components of web application you may find in HybridJava. Other frameworks simply do not catch up.

By the way - HybridJava is about 5 times easier to learn than Wicket - only about 15 pages to read. It also works very fast with less than 19k of run-time jar.

0

精彩评论

暂无评论...
验证码 换一张
取 消