This question already has answers here:
Closed 14 years ago.
I want to start a new project with Java;
In the past I used to start with Struts + Tiles; but tiles was very complicated; I don't know the latest version of Tiles;
I need your recommendations in details for a good GUI framework;
Thanks.
Duplicate of this question.
There is no "best" framework...
Indeed, "best" really depends on your needs, on your knwoledges (it can cost a lot of time to learn a new framework)...
At first when I read GUI framework I thought you meant Swing or SWT but I see you mention struts so I guess you mean presentation framework.
I agree that Tapestry is very good, but there are several others that are also quite good. Struts2, Stripes etc. Matt Raible has a very nice project going where he did all the initial integration work for several different technologies. It is quite easy to get up and running with struts+spring+hibernate or JSF or Tapestry and so on. He calls it AppFuse.
I use struts2 with spring and hibernate and sitemesh which was an AppFuse project to start with and it has served me well.
Stripes seems to be a great starting point for a Java web app too. I haven't used it as yet but I'm tempted.
I personally like Tapestry. I've only used version 4.1 but development time is way faster than JSP or JSF. It allows you to simply refresh pages to immediately see the changes you made without doing a deployment and uses actual HTML for the templates/pages so you can preview them without deploying any code at all. There is a little bit of a learning curve up front but its well worth it. Version 5.0 is in its final beta with a release candidate due out soon but I haven't tried it yet. It's also got pretty good and easy AJAX built in.
Related
Does anyone know if there is any equivalent to Microsoft's ASP.NET Model View Control Framework with Visual Studio/C# but for Eclipse with Java?
Or put it another way one could build a website in C# using MS Visual Studio with ASP.NET MVC, is there anything similar for Java using the Eclipse IDE?
I've built up good knowledge with Java and the Eclipse IDE creating some Android Apps that I'd like to leverage, now I need to turn my attention to web apps and I'd like to stick with Java and the Eclipse IDE. Cheers!
There are a bunch. I'd check out Play!
but there are also: Apache Wicket, Spring MVC and some others.
There is also a version of Play! for Scala which is a bonus if you intend on moving up from Java to Scala one day.
There is also a similar question with a more detailed answer here:
Choosing a Java Web Framework now?
Spring MVC is worth a look. Spring goes way beyond "just" MVC, with APIS for DB, JMS, and loads more, which may be a little offputting if you're just keen to get to grips with an MVC platform, but it's arguably worth it.
http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html
http://static.springsource.org/docs/Spring-MVC-step-by-step/
Tapestry or Wicket is worth trying.
Yes, there are a lot of them. Your problem is that there are too many, actually. Narrowing down the list can be a challenge. Everybody has their favorites (mine is Apache Tapestry, because it's actually fun to use, and very powerful).
My recommendation is to pick 3 or 4 (I'd go with Tapestry, GWT, Spring MVC and Wicket), and then spend a couple days working through the introductory tutorial that each of them offers. You'll soon know which one feels right to you, and you'll be basing your decision on your own experience rather than the strongly-worded opinions of strangers.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
We are starting to develop a web application using Java EE 6.
We got surprised with the complexity of the JSF's generated HTML. I mean even a simple link has some javascript handling code. and this is, in my opinion, a usability problem because browser's gestures (as "ctrl+click" over a link) simply doesn't work. Also, I'm suspecting this could get worse when we need to maintain that code or tweak the UI design with javascript frameworks like jQuery. it reassembles me: Webforms vs ASP.Net MVC. complexity against simplicity.
Anyway this is my first time with JSF. so I really would like to read your experiences with it.
Do you know a simpler rendering engine for Java EE?
How has your development experience with JSF been?
Have you developed a web app using JSF and lots of jQuery/Dojo/Script.aculo.us?
It is hard to define what "simple" means when you ask about a "simpler rendering engine". JSF is a very unique animal and I am afraid there isn't anything simpler that is also similar in the Java world.
My experience with JSF has been EXTREMELY positive, and this is coming from someone with years of experience developing under ASP.NET. The learning curve is still steep, and I can't imagine complex enterprise systems being possible without some form of custom Javascript and possibly even custom components, however in my opinion it is simpler than ASP.NET and much less heavy as well. They addressed a lot of the issues that made ASP.NET so difficult to work with, (Eg. simple client ids for the DOM, XHTML compliance).
I recently developed an application that will be going to production shortly using only Primefaces components, standard Mojarra facelets, one custom component, and a handful of Javascript/hidden input field workarounds for component framework bugs. It was stunningly easy aside from the few workarounds I needed to implement. I am extremely happy with the results, the stakeholders LOVE IT and I will absolutely use it again in my next project.
In formulating a team my real world experiences with it tell me that it is best to put a highly experienced web application developer as a lead on the project, someone with superb experience in Javascript, CSS and Java web technologies. The rest of team could be entry level developers with a modicum of guidance.
I've been working with JSF on a large project. I have experience of working with JQuery, normal HTML/css/javascript, GWT and Gxt. And I can tell you that JSF is the worst of the bunch. If you like your back-end code to be separate and independent of your front-end code then JSP is not the way to go. It littery ties your front-end to your back-end with no clear separation of concerns. The other problem with JSF is that it is very hard to get your head around. Creating great AJAX pages in using frontend technology (e.g. javascript, html and css) is very easy. My 14 year of son gets taught how to do it at school. Getting the same effect using JSF is incredibly complicated. Take a look at how to define as link: <h:commandLink value="New" immediate="true" action="#{projectUiService.showProjectCreate}" />. And there is no way to specify a form action url. You have to use the JSF managed beans and navigation semantics. It's a completely new front-end language. So even if you want to style up the front-end or add JQuery in you'll be stuffed.
Configuring your build and runtime environment is also a pain. There are so many inter-dependencies among jar files that if you don't have the right combination of JSF, Richfaces, and Spring Jars, then you have no hope of getting your application even out of the build build environment. If you want to get a hint at this then go to the maven search site and look for the class javax.faces.component.UIViewRoot. Everyone and their dog has it. Also take note at the javax.faces and com.sun.faces - what's the difference? Who knows, but they don't work together. And some version only work with specific version of RichFaces.
My advice - stay well clear. Give your app a spring back-end and a normal HTML front-end. There is no way you can write a decent large enterprise scale application in JSF. It would be just too complicated. You'll end up with a huge monolithic code base that would be almost impossible to maintain.
Do you actually need a component-based framework like JSF or are you looking for a more traditional web request-based MVC framework? If so, you may want to look into Apache Struts2 or Spring MVC. Spring MVC requires that you use the core Spring library.
I've been working with JSF for 3 years and I can say that the most powerful thing about it is that it abstracts the communication between browser (form input or actions) http request and Java.
There are rich libraries available for JSF, like: ICEfaces, RichFaces, ADF Faces, PrimeFaces, which gives you a big amount of rich components that may be enough for you.
JSF tries to make development of web applications more close to desktop applications. It addresses the most common tasks for a web application (no matter the technology) and automates them using its LifeCycle. However if you want in some cases a certain behaviour that's different from how a component works, you have to make some workarounds, or build your own components (which may be hard, except for composite components).
I have integrated JS successfully for tasks that didn't need to trigger some action in Java like select all checkboxes, hide/show some parts of the page, and so on.
JSF is very easy, yet very powerful, and requires a certain expertise for some tasks.
The last version of JSF, 2.0, addresses the common problems JSF had, because of its POST nature, so now I'm very happy with it.Regarding users gestures like ctrl+click, the way web applications in JSF work is a little different than normal ones, buttons Back, Forward, Refresh might not work as expected sometimes. But hey, great web applications have the same behaviour: Try Ctrl+Click in PayPal .. or try Back Button in Vodafone.ro
If you want full control over your HTML, use plain JSP. But when you have a huge web application, JSF is a good option for Rapid Application Development(RAD).
Do you know a simpler rendering engine for Java EE?
JSF IS the most powerful technology for presentation layer in the mainstream Java EE. That became true only after introduction of "Composite Components". However the less known HybridJava solution is non less powerful but yet simpler than JSF.
I have reviewed a few Struts 1 vs 2 questions on SO but none seem to answer the question in the perspective that I am looking at it with.
I am about to start work architecting a new system, a complete re-engineering of a very old desktop application. The goal is to make it web based, add more functionality, make it more usable etc (the usual reengineering reasons).
The team who will be developing the system are mainly Java developers and have worked on Struts 1.x extensively over the past 5 years.
The system is intended to live for many years to come, so the idea of re-engineering again in 3-5 years time when a better framework comes out is not an option. It is not intended to heavily use AJAX.
My question, is why would I bother moving to Struts 2 when my team are so experienced with Struts 1.x. I understand that there are some improvements, but I worry that the time lost in getting the team up to speed, rework due to incorrect usage etc will far outweigh any benefit we would get from Struts 2. We like Struts 1, it does what we need to it do, and all the design patterns, standards, best practices etc are in place.
Are there any killer features with Struts 2 or serious problems I don't know about in Struts 1 that would sway the decision to stay with Struts 1.
If you are building a system from scratch I would definitely move onto version 2.x of Struts. The learning curve will not be great for a Struts 1.x team, but you will be able to take advantage of an up-to-date MVC framework.
For me the two main features of Struts 2.x which will enhance productivity are:
Built in AJAX support
No more ActionForms - you can bind directly into Domain Objects if you want, so this intermediate step has gone.
If it's a big project you're working on, you might want to look at a component framework e.g. JSF 2 or Wicket. If you're determined to stay on an Action based framework then I personally find Stripes a more productive framework.
Struts 1.x is 2000 vintage technology. Why on earth would you even consider sticking with it on a brand-new app?
The biggest drawback that I can see is that Struts locks you into a JSP-based, browser UI. Struts Actions are reusable only within the framework. You'll have a hard time seamlessly integrating a mobile device into that system if you need to.
I'd start thinking about web services, preferrably REST-based, and AJAX. The world has changed. I'd look into alternatives to Struts, like Spring or Play. Picking up a new web framework wouldn't be that big a deal, but the benefits could be worth it.
Those employees that have done nothing but work with an outdated framework for the last five years will thank you, too. Time for new skills.
UPDATE: If you've tried, and can't be late, and too many constraints, then I'd say you already know your answer. What are you hoping to get by coming here? I don't see an argument that you've failed to think through.
Given that your have a team with good experience in Struts 1.x and your product is stable as well, I don't see a great reason to migrate to Struts 2. Apache too seem to agree that http://struts.apache.org/roadmap.html#migrate_s1.
I'd think instead of asking "Stick with Struts1 or move to Struts2?" you'd better ask "Stick with Struts1 or move to a modern action based MVC web framework?". Why to move ? Because Struts1 is old and (frankly) sucks. Why not to move? Because we must learn a new framework. Granted, you know your resources, you must do the evaluation. But bear in mind that modern action based frameworks (Struts2, SpringMVC, Stripes) are quite easy to learn, and more so if your teams already knows Struts1.
Myself, I've have migrated from Struts to Struts2 and now I wouldn't like to return to Struts1 programming (those clumsy ActionForms!). I think Struts2 is much better. But one must also consider that Struts2 has also its weak points, the project does not seem very healty and the community does not seem very active.
The jump from Struts1 to Struts2 is not big, but is not as small as a version change ("Struts2" is a misnomer), and it is probably not smaller that the jump to SpringMVC, so I'd suggest to consider it (or Stripes).
More Generally, Struts 2.x layered framework compare to Struts 1.x. For example in data layer , Struts 2.x has DO layer between VO and DAO.. Similarly other features are mentioned in the below link..
http://struts.fromdev.com/2008/08/struts-1-vs-struts-2.html ..
Since your team has more experienced with struts 1.x , i don't think it will take more time to migrate your code in to struts 2.x.
Please be specific what kind of difference u are expecting..
in struts2.0 there are more feature and advantage , in struts2.0 there is no form beam,
a good and power full validation framework and most imported in struts2.0 for every request there is one instance of action but in sturts1.x only one instance of action for hole application.
so choice is yours . :)
Well the main reason is moving to struts 2.x in place of struts 1.x is
struts 1.x is in maintenance phase now not in much active development.
now when it starts with a team who have good understanding of struts 1.x is that they will get the underlying system quickly.but before let me to put one point in a clear manner.
struts1.x has no similarity with struts 2.x the only similarity is the name inherited from the parents.
struts2 has following advantages.
Action based framework
A strong Ajax support
Interceptors approach (core of framework)
4 Decoupled from the Serve let API which means plain POJO so unit testing will be much much easier
but my point is simple struts2 and struts1 only similar in terms of name but in terms of underlying architecture they are quite different.
Can anyone suggest a good UI framework that can be used in a Java EE web application?
I will be doing a project that requires to generate a web UI on the fly. Regular JSP page coding makes it hard to do. There is a framework called Vaadin. It looks good to do a dynamic UI implementation. However, I don't know if it stable for production use. If there is any other good suggestion, please let me know.
I'd suggest Wicket. It's been in production use for years, it's very stable, it's very programmer-friendly, and it can easily handle dynamic UIs.
(But I have to agree that the Vaadin demos look hot)
I would say vaadin would be easier over wicket as the default UI elements look really good.
Wicket, you will need to create your own css to make things look good (other than default html UI)
vaadin 6.5.0 was released a couple of days ago and has been there for a long time but recently made open source probably around 2-3 years ago at most if i remember right.
I love both Vaadin and Wicket and my opinion is that they are the best 2 frameworks out there.
However, for this case, I would choose vaadin cause it is easier to get better looking UI elements
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Choosing a Java Web Framework now?
Hi All,
I'm thinking about which framework to choose for web applications. There are so many web frameworks and I'm afraid of trying all of them - it could be time consuming and I wouldn't have to found much with simple examples.
I have experience with jsp, jsf1.2, struts1. I can say I don't like pure jsp with tags. Struts1 again is quite similar to jsp in my view but a bit better. I do like jsf, I find it quite simple to use :), but I'm worried about performance. We used icefaces and lack of get support was really bad.
I know there exist other frameworks, like spring mvc - could be good? . grails, ruby on rails, wicket, gwt, struts2,jsf2
What I need, I'd like to have a versatile framework which doesn't restrict me and at the same time it's no problem to create features e.g: ajax.A bit easier to develop in but still fast I would be scared to sacrifice performance for ease of development.
I do not have any production experience with other frameworks I named.Do you have? Could you share it please? What would you use?
Thank you very much.
Any experience appreciated.
Here's my take:
I have experience with jsp, jsf1.2, struts1.
You have my condolences.
I can say I don't like pure jsp with
tags. Struts1 again is quite similar
to jsp in my view but a bit better. I
do like jsf, I find it quite simple to
use :), but I'm worried about
performance. We used icefaces and lack
of get support was really bad.
I don't care for JSF or Struts.x at all.
I know there exist other frameworks,
like spring mvc - could be good?
Yes, Spring is very good. It's much, much more than a web MVC framework as well. It's performant, it's got traction, it's got the financial backing of VMWare. I think it's the clear winner in the Java EE space.
. grails.
Grails is built on Spring and Hibernate.
, ruby on rails,
Not Java.
wicket,
Could be good. I have no experience with it.
gwt
Write Swing, turn it into JavaScript. I have no experience with it.
I think Spring is a clear winner. It's been on top for five years and hasn't lost a thing.
For a presentation layer framework: There is plenty to choose and I cannot really recommend one over another as I have only worked with one or two.
For a general framework to build your application, I recommend Spring. It is well known, support is ok and it is usually very easy to hook whatever specific-purpose framework you may want to use.
http://www.jodd.org/ seems to be a very good, fast and open framework that includes many facets needed for webapplications.
For the presentation layer, GWT with Uibinder could really match your demands :
you build your pages with xml
(pretty much like jsf/facelets)
it's designed to be fast
it's a google product, with a really
big community
it's really well integrated with
eclipse and easy to start using it