Should I choose Apache Click or Tapestry 5?

六月ゝ 毕业季﹏ 提交于 2020-01-23 01:12:05

问题


I am to decide whether to use Apache Click or Apache Tapestry 5 framework. Which one I should choose? I'm looking for a framwork that I could use for building Java EE web applications for the next few years. The next few days I'll be testing them both running sample and custom projects, but I'd like to know in advance if one of them is not stable or big enough for large scale enterprise applications. I need it to work without any difficulties with Maven, various AJAX and Eclipse.

Thank you in advance, StackOverflow comunity :)


回答1:


Well, thanks Dragan. I think the essential question is are you comfortable with a component oriented framework (Tapestry) vs. an action-oriented framework (Click). The nature of components, as least the Tapestry way, is that the framework can take over lots and lots of work from you; thing like how to form URLs, what to name query parameters, or session attribute names. In addition, Tapestry has a lot of room for meta-programming, and the general programming model, which centers on mutable objects rich with data and operations, is a lot more fun than dealing with typical servlets. I don't know enough about Click to say how or if it addresses these issues, but I'm very comfortable recommending Tapestry over any other framework I'm aware of.




回答2:


Tapestry is THE web framework for complex JavaEE projects. I've been using it fro 3 years now and it just never fails.

You can be effective in Tapestry5 quickly, but if you are new to IOC concepts etc. it may take a while to get used to.

I would say tapestry has some moderately steep learning curve, but it has no limits in what you can do, and pretty much all things are done quite elegantly, with the framework helping you in many ways and not stepping your feet.

Cheers




回答3:


I have been using Tapestry for a little over a year now, and following are some points that I thought I would throw in that haven't been mentioned here:

Pros:

  1. Tapestry needs very little xml configuration, so if xml is not your cup of tea, you will be very pleased. For example, no more defining tons of navigation rules in xml, if you want to send your user to a page, just return the page class from the action handler and you are done.
  2. Since you mentioned "Enterprise" apps, it is worth noting that Tapestry 5 plays very well with Spring and Hibernate. You can easily inject Spring beans into tapestry pages and Tapestry services into Spring beans. If you need to inject EJBs, you could wire them up as Spring Beans and inject them the same way you would inject a Spring bean.
  3. Tapestry is really fast, with response times in the tens of milliseconds even with moderate load.
  4. Plenty of components available from various sources, so you can just plug and play instead of re-inventing the wheel, saving you tons of time.
  5. Very helpful and responsive community.
  6. Works well with eclipse, and code completion is available for templates when setup right.

Cons:

  1. Its takes a little more effort to learn the finer points of the framework than say, Struts, but is IMO much easier than JSF.
  2. Rapid development causes older versions to get obsolete too quickly, although promises have been made (yet again) to maintain backwards compatibility this time around.

I don't have much to say about Click as I have never tried it, but do let us know what you decided on!




回答4:


I've used Apache Click, and was rather disappointed... simple things were difficult to do, and while I initially found the framework elegant in concept, in reality it quickly became anything but elegant to use -- basic state management of components was awfully cumbersome in anything but the simplest cases.

I also was disappointed to learn that Click's claim of "full JSP support" was simply not true -- for example, their Panel component, one of their central components used for layout, cannot be used with JSP templates, it only supports Velocity or FreeMarker (true as of Click 2.3, the last version I evaluated). Furthermore, they are not interested in fixing this -- I actually submitted a patch to allow Panels and other components to work with JSP templates, but they expressed limited interest and never took it in.

I cannot speak knowledgeably about Tapestry, but I can say that the day I abandoned Click in favor of the Play! 1.x framework was a happy one (though incidentally now after the disappointing Play! 2.0 was released I'm once again in search of a decent statically compiled web framework).




回答5:


I would suggest that you try them both. Start with apache click. It will take your a couple of days if not a few hours to get started and write an application. After doing a small application , now turn to tapestry. This may take your quite sometime to learn. you may or may not like it. apache click is very simple and you can get going very fast. Tapestry is very complex and may have more features . In between them is wicket. Am more experienced with wicket and i have done several applications with it. I have tried tapestry5 several times. I have given up on it then went back to it later and given up again. Am now trying out apache click and it seems quite good. My point, spend sometime with the frameworks and you will pick the one that best suites your. Wicket, tapestry, click and JSF are among the most popular component based java web frameworks.




回答6:


Tapestery is such a great framework that I wish I go back in time and redo all my web projects using Tapestry. Just try the sample application and play with it. You will realize quickly why Tapestery is so awesome!



来源:https://stackoverflow.com/questions/6600729/should-i-choose-apache-click-or-tapestry-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!