views:

385

answers:

9

I'm a full time Java developer of around 4 years, professionally. I'm a GWT fanatic. I love Java. Here's the problem: In my free time I often fall victim to the verbosity of my favorite tools for doing "heavy" development. I also often fall into the trap of obsessively engineering my software. I'll end up with the most beautiful unfinished implementation, ever.

So, here's what I normally work with.

GWT - I use this for dynamic UI and web layout. I love the ease of re-use and it has taught me to absolutely hate javascript. I really can't even bring myself to do much HTML/JS anymore.

Hibernate - POJO to Database, easy-peasy. What i really need from this other than the mapping is that it allows me to have an application that works across multiple databases.

Spring - Mostly security. I've written my own custom LDAP bits for a project.

XML - I've used dom4j and other implementations, including xstreamer. I'd like to use JiBX for XML transport. The problem with this is that I need XML messages that conform to a specific standard rather than being autogenerated. Object->XML->Object are also common enough that it can be a performance bottleneck with large messages (250KB+).

I tried Lombok for a little while and liked it but had occasional issues with it and then I blew up a partition and lost all that work. I don't really feel like doing the same thing again (half the fun was in learning how to do it, now that I know... meh). This taught me why other people want to reduce the explicit code and replace it with an implicit system.

I've been looking into Grails but that runs me into the JavaScript problem (you know, that I don't like it) pretty quickly. I could use GWT with Grails on the back end but I get back into the problem of getting deep in the weeds with GWT. It has also occurred to me that there might be a way to have Grails tags in GSP that are made up of GWT widgets. I'm not really sure how I feel about that.

Another problem I have with Grails is that validation logic before form submission is separated from validation constraints after submission. I don't see how they can be unified (yet) to produce "pretty" front-end validation. I went out of my way to start a JSR-303 compliant validation project for GWT to help solve some of this problem for GWT and really liked the results. It isn't finished but I still find it useful.

So, help me find a better way!

TL;DR - I want to have a Database (and Database-Independent) to GUI solution that allows for dynamic web programming all in one language. Failing that, as close to one language as possible.

TL;DR is TL;DR - I hate JavaScript now, help.

EDIT: I know that it is techincally impossible to do "Web 2.0" development without JavaScript. I'm just trying to not be the guy who has to write it. (Getting a tool such as GWT to do it for me from a language I do like, for example.)

+11  A: 

Just learn JavaScript.

Resistance is Futile
...and you will be assimilated.

PD: I'm an ex JavaScript enemy. Now it's my favourite language.

Pedro Ladaria
Another ex JavaScript enemy here. The problem is there is a lot of very bad JS out there, especially in the "beginners" tutorials from people who don't actually know JS. Not to mention these days you have JS libraries like jQuery that address cross-browser compatability issues for you.
Matt
I know JavaScript well enough to do most of the things I can do in GWT without crying about it too much. The problem I have is that I'm not good at creating reusable elements and writing good, clean JavaScript.I'd rather have a tool (GWT) that does that for me from a language I do feel good about. I don't want to cut out JavaScript (can't) I just don't want to be the guy using it.
angryundead
Hire somebody who will. ;)
Drew
"Never stop learning; knowledge doubles every fourteen months." Anthony J. D'Angelo. Beside that javascript, while using a framework like jQuery, is easy to learn. Just: comment, comment, comment it.
Alex Bagnolini
I really didn't want to mark this as the answer as I'm probably going to figure out how to integrate grails/gwt somehow. But this seems to be the theme of the thread.
angryundead
+1  A: 

Have you heard of Echo?

It doesn't provide the database part of the problem, but it would work well with any database that you can work well with.

Echo is a platform for building web-based applications that approach the capabilities of rich clients. The applications are developed using a component-oriented and event-driven API, eliminating the need to deal with the "page-based" nature of browsers. To the developer, Echo works just like a user interface toolkit.

The latest iteration, Echo3, features the ability to write applications in either server-side Java or client-side JavaScript. Server-side applications run in any Java Servlet Container and do not require developer knowledge of HTML, HTTP, or JavaScript.

instanceofTom
Nice link. I have never seen this before and it looks really cool.
Zack Mulgrew
A: 

I can understand your dislike of JavaScript and it certainly has its problems but I think your fighting nature at this point.

Web 2.0 is strongly based on JavaScript for a good reason as it provides the ability to perform tasks on the client machine without requiring page loads.

I'm sure there are alternatives but if you want the look and feel of Web 2.0, you will end up doing a lot more work with little reward. JavaScript is the accepted and functional tool for the job.

Paulo
+1  A: 

You might want to take a look at some of the AJAX powered JSF libraries. IceFaces and RichFaces are both solid.

Drew
+1  A: 

Not sure if you would like this , but have you heard abour HaXe ? you might not like it but its AIO(all in one) solution( sort of )

Aviatrix
+1  A: 

Been there, done that. I was a GWT developer for 3 years... I started using it in v1.1! GWT is fantastic, and works really well for small applications. But the development comes to a crawl once you it a moderate application size, even if you divide your application in sub-modules.

It is also quite ironic that a UI framework has such limited UI creation tools. :)

Personally I bit the bullet and learned javascript. It isn't as bad as I thought. Especially with jQuery. :)

Obviously there is no perfect framework. But just the fact that GWT has been out for 3.5 years now, and it still largerly ignored in the Java world should tell you something. Since you're doing this on your free time, I would recommend learning the most popular framework: Struts. You'll see its limitation, and also why it is so popular. Of course, you'll need jQuery for that 2.0 functionalities. :)

Thierry-Dimitri Roy
I'd recommend you try Stripes over Struts any day. Once you've worked with Stripes you'll realise that poking your eyes out is more fun than working with Struts.I also disagree that GWT has been ignored, with 2.0 and OOPHM (and now that Google Wave is written in it) it's on the up :)
rustyshelf
I've been using GWT for about the same amount of time. I think I started using it around 1.2 or 1.3 for a project. I've also used 1.6 and 1.7 for production code. As I said somewhere else in this page I like it I just don't want to read quite so much.I heartily agree that there needs to be someone who steps up with some real UI creation tools for GWT.
angryundead
+2  A: 

You can certainly develop an entire Web 2.0 project without coding Javascript using GWT (we have), but at the end of the day you still have to know HTML/CSS & Javascript.

This might sound like a stupid statement, but it's not once you consider that GWT is not a perfect abstraction, nor is it designed to be. It wasn't written in Java so that you didn't have to ever code in Javascript again, instead they did it because Java has better IDE's, is statically typed and makes maintenance a hell of a lot easier.

So yes, by all means go with GWT (and check out the new OOPHM, because it's AWESOME) but don't forget that you'll always need an understanding of the underlying frameworks of the web, if you want to develop for the web.

rustyshelf
I've taken code to production using GWT as well. I was hoping to cut down on the extreme LOC I had with that method. It did a lot of really awesome things that would have been a total pain to do in JavaScript but at the end of the day it seemed like it was a lot of reading to do.
angryundead
A: 

I'd say stick with GWT and just drink more of the Koolaid. It's a completely awesome development model that seems to be lost on those who haven't tried it.

If you want to improve your GWT experience, jump to the bleeding edge (I work off trunk, it's quite stable) and use the other Google originated projects like GIN, gwt-incubator and Guice. Especially watch Ray Ryan's GWT best-practices Google I/O talk: http://www.youtube.com/watch?v=PDuhR18-EdM

As for the "framework" part: forget 'em. Just use normal servlets and let GWT take care of the RPC for you. Servlets are a pain when you have to deal with JSP and you're own AJAX calls, but when they're only implementing asynchronous app logic, it's not that bad at all. Guice Servlet makes it all quite easy. You can still use a JVM hosted language to write your servlets if you want.

GWT has an incredible advantage over other JavaScript frameworks in that the layer of abstraction it provides allows for major future advances without any changes to your code. If the GWT compiler and browser detection scripts can take advantage of new browser features then you benefit from a simple recompile.

The big annoyance I see in your requirements in XML... hopefully that's just for integration with a 3rd party service and your client-server communication can just be GWT-RPC.

spankalee
A: 

Take a look at JRapid, a rapid development platform for Java developers. It generates very powerful Ajax enabled UI without the need of coding.

Christian