views:

105

answers:

4

Hello,

I want a framework (or anything) that helps me make rich client guis. I know my server-side, but I don't like programming in ajax, javascript, css etc.

Something that wraps the ajax code in some objects/methods with clean syntax, would do the trick. I want to write code in java instead of defining css and html tags.

Does Java Spring, JSF, Django support this ?

Languages: Java, Python

Thank you

+4  A: 

Look into Google Web Toolkit (aka GWT). It's a Java framework that "is a development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google Wave and Google AdWords."

I think GWT aims to do exactly what you're looking for, though I have no experience with it personally.

Will McCutchen
+3  A: 

The Python equivalent of GWT is pyjamas. There are also libraries specifically for Django (dajax for example), though I have no direct experience of those.

Personally, having first tried GWT [[and pyjamas a long-ish time ago]], I then gave a try to Javascript with a good framework -- jQuery, dojo, and Closure all are quite good -- and I now prefer that route... JS plus a good framework is a truly different programming experience than "bare JS" would be with all of the various browser-specific quirks and incompatibilites.

Alex Martelli
A: 

I don't believe you will find a good solution without HTML and CSS. It's actually very good for it original purpose. (static HTML pages)

When it comes to generating dynamic contents, my preferred choice in the Java world is to use Apache Wicket. This framework separates design and logic in different files. One static html file for the design with a corresponding Java file with the dynamic data.

Then Wicket generates a new html with dynamic contents from the models defined in the Java file.

An example that adds AJAX support when you click on a link:

Part of the HTML page:

<a href="#" wicket:id="link">click me</a>

The corresponding Java component:

add(new AjaxFallbackLink("link") {
     public void onClick(AjaxRequestTarget target) {
         if (target != null) {
             // target is only available in an ajax request
             target.addComponent(label);
         }
     }
});

The id "link" is the connection between the html and Java component.

To get a better understanding of how it works, you should try the online examples at http://www.wicketstuff.org/wicket14/ajax/. Here you can see many AJAX components in action, the HTML and the Java code for each component.

Espen
+1: Wicket has good Ajax support, and it's what I prefer as well. It *is* singular Wicket, by the way, and not Wickets.
Don Roby
A: 

IceFaces is a JSF Framework with AJax. You would take a look and see if it fits your needs. Also You should find the demo there.

Russell Wong