Scalable UI framework for Java EE web application - java

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

Related

Java framework to build Rich Web Apps for IE8

We build Java Spring MVC web apps for internal company users that have pretty basic GUIs. A few have jQuery/Ajax to add some GUI richness, but nothing major. For a new app, the business users are asking for a very rich web app (ex: drag and drop functionality, flexible tables like in Excel, etc). Our users can only use IE8 and we can't run Java applets in the browser. Also we don't have the time to learn an entirely new language (ex: Flex), so the learning curve can't be too steep for Java MVC developers. This app will only be used by company internal users (~ 100 concurrent users).
I have looked into some of the newer Javascript MVC frameworks (ex: Spine, Backbone, Ember). My main concern is that I am not sure how well the resulting complex Javascript will run under IE8. A secondary concern is that we don't have experience trying to maintain a lot of code in Javascript. It seems like a lot of Javascript code would become a maintenance nightmare (non-typesafe, harder to debug, not as many tools, etc).
I have also looked into GWT and ZK. These frameworks reduce the concern about maintaining a lot of Javascript code, but the IE8 performance concern still remains. If we built a very rich GUI in one of these frameworks, would the resulting auto-generated Javascript work well in IE8?
What framework would you recommend that would meet the high-level user requirements listed above and also meet the non-functional requirements (small learning curve, low maintenance burden, good future support)? Has anyone tried to do something similar to this? If so, what did you use and how did it turn out?
We are working with Vaadin, which is quite similar to GWT (develop Java code), an it works fine in all browsers. For us, scalability of the view is the more important thing (manage large code sets)
You can go with ZK OR Primefaces
Both are very rich web framework Just explore their Demo decide which will be very helpful for you.
Vaadin supports drag and drop but programming model for d&d is a bit nightmarish.
I would certainly pick GWT in your case. Google guys put a lot of work to have it working with ie8 well. note GWT has good tool support like Eclipse plugins. to avoid writing everything from scratch, you could start with some framework that builds on GWT like gwtplatform or ExtGWT.
You may also consider ADF Faces, it has a very rich component set, you can see a demo here.
In my company all our projects are done with Apache Wicket.
This java web framework is simple, powerful, very efficient, component based and everything is testable.
And the community is great.
Have a look to http://wicket.apache.org.
Francois

Java-EE: Cleaner and simpler alternatives to JSF [closed]

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.

What are my options for building a rich web application?

I'm working on a client-side Java application for which I want to create a web-based user interface (which will be served up to a browser from the local app). At the risk of oversimplifying, its a microblogging tool that will support functionality similar to Twitter and Facebook. Its open source, and you can read more on our wiki.
Its important that this app is extremely easy to use, and I also want it to look good relative to contemporary web applications (such as the examples available on the Chrome web store). Since I am not a web designer, I'm hoping to use tools that give me an attractive UI "out of the box". Oh, and I need to keep the distributable file reasonably small (un him so whatever I use needs to be reasonably lightweight.
So far, I've looked at Sproutcore and GWT.
Sproutcore apps definite have the appearance I'm hoping for, but I'm not that familiar with JavaScript, and after some experimentation is not entirely clear to me how I will achieve some of the more sophisticated functionality that I think I'm going to need.
Being Java, GWT is more within my comfort zone, however I had a hell of a time just getting my development environment set up properly. It seems that GWT wants to dictate the structure of my application, but since the user interface is only a small part of it I'm not willing to build the entire app around GWT.
Something else I've been thinking about is using CoffeeScript (which seems more palatable him and him him him him him than JavaScript, and there are Maven builders for it), perhaps together with JQuery-UI.
What other options should I consider?
To recommend two big javascript frameworks Sencha and Cappuccino.
These have an extensive UI toolkit out of the box. The latter has an MVC framework build in, the former has a general JavaScript library build in. Both come highly recommended.
Also as recommended jQuery UI is a reasonable toolkit. I would personally couple Sencha for its rich UI toolkit and a lightweight MVC framework like Backbone. I'm afraid this does require learning JavaScript well.
You can also instead drive your JavaScript UI toolkit mainly from the server and skip the clientside MVC. For that sencha should surfice as a UI toolkit, but if you want meaningful functionality you will need some more structure. I would also recommend RequireJS for modular file management.
Take a look on Vaadin its based on GWT but simpler to use. I use it since 2 years and i'am not a designer too.
Take a look at jQuery & jQuery UI (jQuery Modile if you are looking to deploy to hand held devices)
Also, since you mentioned that you are not a designer, you might want to implement the front end in an MVVM pattern to separate the UI from the business logic of your applications. Knockout is a nice way to do with with decelerative data binding
I don't like writing plain JavaScript, so I'll tell you little bit about Java based frameworks. Recently, I've picked Google Web Toolkit.
Pros:
plenty of materials
Eclipse + Google plugin
Very intuitive API
3rd party libraries
Fancy widgets + optimized JavaScript
lot of generics
very active community
awesome async callbacks
Cons:
very slow debugging, that will drive you mad sooner or later
lot of deprecated code for so young framework
Mixed feelings:
You don't have to write declarative UI (you can do Swing-like development), but your code grows bigger and less maintainable, so it is quite probable that you'll eventually learn some declarative UI like UI Binder
Visual designer for GWT is somehow nice, but very unstable (eclipse) :(
Some considerations:
Do some prototyping with Vaadin. Try some debugging. Then try GWT and debugging on similar sized project. Consider debugging as the VERY important decision factor, because GWT debugging was the most frustrating thing for me.
Consider JSF + some nice rich component framework for JSF like RichFaces, IceFaces, PrimeFaces etc (but you app won't be "light" and "small" anymore if you really care). Be sure to be perfectly comfortable with environment (IDE + plugins), nothing beats JSF there (I'd pick RichFaces + Seam today, if full Java EE is option).
If you don't want to learn javascript I recommend you GWT with Sencha-GWT (GXT), you can develop all your app in java language, and also debug your code in java.
It is very easy to create a web app with this technology, and provides almost all funcionality available in javascript version.
Also you can mix it with hibernate and giled to persist your data, and giled helps you to serialize hibernate objects.
I have been writing an application in SproutCore for the front-end and a Java backend. In my mind this works perfectly.
The backend can stop worrying about HTML and JavaScript contents on the client side, if the request is XHR or plain request/response. I can implement the backends using plain old Java Servlets, and only worry about the data that is passed between the client and the server (JSON for the most part).
The client becomed fast and responsive, and SproutCore has a rich amount of components that you can mix and match.
So in other words with SproutCore (and Cappuccino and other full-blows MVC JavaScript frameworks) you can let your client do what it does best : Render and display HTML, CSS and JavaScript, while leaving your server to worry about what it does best: retrieve, store and update data. If you are interested, the source code for this project is available with the GPLv3 licence: https://github.com/joachimhs/EurekaJ
I have written an article about the differnt approaches between server-side MVC and client-side MVC here: http://haagen.name/2011/05/24/The_RIA_MVC_Model.html.
Also SproutCore comes with the MIT licence, so its avaiable for use without (m)any restrictions.

Which framework to choose nowadays, which would be still performant+able to do everything in it (pros & cons) [duplicate]

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

I would like to build a Java Web Application. What's the quickest start?

I am a reasonably competent programmer, with about 11 years experience.
I particularly like Ruby/Rails and ActionScript.
And Java is easy enough, I've used it for ordinary applications, and mostly as ones that run on the server, just not web-based ones.
I'd like to develop a web application in Java in order to leverage things like BlazeDS and help tie front-ends together with my previously-written Java apps. i.e. use existing Java code but in a web context.
But I'm having trouble - and confused - looking for a smooth start. I don't want to use Grails, been there, thanks, I want to use Pure Java, with whatever Framework you can think of. Spring, Hibernate, etc.
Where do I start?
Play Framework lets you get started quickly. http://www.playframework.org/
Spring Roo is a RAD framework for web apps. It's similar to like Rails or Grails, but uses code generation instead of metaprogramming magic.
This thread contains useful pointers on starting Java web development
http://www.daniweb.com/forums/thread249070.html
Since your goal is "Pure Java," how about Wicket? Straight from their feature list:
Wicket does not mix markup with Java code and adds no special syntax to your markup files. The worlds of HTML and Java are parallel and associated only by Wicket ids, which are attributes in HTML and Component properties in Java. Since Wicket HTML is just HTML and Wicket Java is just Java, coders and designers can work independently to a large degree and without relying on any special tools.
If you want more info, there's a web page on why you should use Wicket.
I've really enjoyed working with Spring MVC. It took a while to ramp up with Spring, but the whole affair has just made since after investing the time.
I have found JavaServer Faces 2.0 using Facelets to be a good compromise between power and ease of use, plus it allows you to use a lot of extra libraries when you get more advanced.
For JBoss you need to include JSF in your web application. Download the 2.0.2 distribution and see the documentation in there.

Categories