views:

335

answers:

4

I am looking for an extensive example or, the most preferably, an open source project with a nice, modern, ajax-enabled user interface which is using JQuery or YUI on top of Java web application - it can be full Java EE application, JSF only, Spring MVC application, anything.

I would like to learn what are best practices to create such applications. In particular how to efficiently make use of the JavaScript library with a chosen Java web UI technology: JSP, JSF, Spring MVC, etc.

I am not particularly interested in simple demo examples, simple things I can figure out myself, I need something bigger so I would be able to investigate overall UI creation strategy, how clean the code is, how difficult were particular features to apply, etc.

A: 

Many jQuery components are actually being wrapped inside different components from jsf libs (like RichFaces).

As I understand (I only worked for few months with jsf and so I'm still a newbie) it's counted a bad practice to mix jQuery UI with clear jsf (with components) ui.

I can only guess that if you want to use jQuery UI with your jsf then you probably need to create custom jsf component and wrap chosen jQuery component.

Roman
A: 

The best example i can give you is GOOGLE. They use all the stuff you talked about. Unfortunatly GOOGLE will not give any part ot their code.

streetparade
Do you think google use YUI? I thought they are too proud not to do this.
Roman
Sure they use it. Ithink also they support the YUI team
streetparade
Google (on their homepage) do not use YUI, not even DOJO
Calm Storm
A: 

You will find plenty of ways to build web apps, and I'm not sure there's a clear winner. In the end it is just a matter of personal taste or related to your knowledge background.

My advice anyway when you will look at them is to consider a clear separation between the frontend and the backend, and build a flexible UI (in the model of iGoogle or netvibes)

The frontend, presents the information in a human format. The browser code is JS, HTML and CSS. May be flash if you really want.

While the backend handle the authentication/security and the business logic and send or receive only JSON or XML messages.

I did that before with SAP serving XML and the browser rendering it with XSLT and Javascript.

And now in my current project Erlang serving JSON and the browser rendering it with a JS template engine and JS.

In both cases, this is giving really responsive web apps. As you optimise the network usage.

And finally about the flexible UI. I mean think in widgets instead of a monolithic app. It is not easy to get, but once it runs it is an amazing way of building web apps.

Here is a small video we just released to highlight this.

Mic
A: 

My personal favorite is jQuery on top of Spring-MVC. SpringSource.org has put together many great sample applications demonstrating the Spring-MVC framework, and the "mvc-ajax" project includes some great jQuery examples of how to generate ajax requests to the server that returns json to the browser.

The subversion repository for these projects is here.

EndlessLoop