tags:

views:

2347

answers:

4

Are there any good tools available for using GWT (the Google Web Toolkit) with an ASP.Net server application? The programming model and tools for GWT are quite nice, however, it would be nice if the backend could remain in C#/ASP.Net.

Is there currently a good solution available for this?

+1  A: 

GWT only works with Java and I doubt google will ever create something that works with C#. There has been talk of some people at Microsoft creating something similar and posting it on CodePlex, but I haven't seen it yet.

There is however a commercial product called Visual WebGui that does very similar stuff and more. They even have an express version that is free. Check out the demos on their site.

ichiban
GWT doesnt only work with java - it defaults to java, but there are existing libraries that replace the java RPC mechanism with a custom RPC mechanism implementation to talk to other backends, such as a json backed one.
Chii
I was referring to the Java Language, not the JVM. You cannot write GWT code in any other language, but Java. Isn't that correct?
ichiban
Yes, I think he was referring to the client language, which is only Java. The server components can theoretically be written in any language, though it seems that support for non-Java languages is relatively poor.
jsight
+6  A: 

According to the GWT FAQ, you should be able to do this.

The heart of AJAX is making data read/write calls to a server from the JavaScript application running in the browser. GWT is "RPC agnostic" and has no particular requirements about what protocol is used to issue RPC requests, or even what language the server code is written in. Although GWT provides a library of classes that makes the RPC communications with a J2EE server extremely easy, you are not required to use them. Instead you can build custom HTTP requests to retrieve, for example, JSON or XML-formatted data.

I'm not aware of any projects to simplify the object serialization/deserialization logic though, if that was your question.

The client-side GWT code gets compiled to javascript, therefore it doesn't matter what server you use to serve it.

ykaganovich
Right, you would just have to re-implement the same API found in their example J2EE library as an ASP.NET application routing for remote-procedure handlers, perhaps using ASP.NET MVC.
Skeolan
thats only true if you want to use their bundled RPC mechanism. That mechanism can be replaced with a json backed RPC mechanism (i googled gwt json rpc and got a couple of results), or you can even use a REST backed RPC mechanism (try this http://code.google.com/p/gwt-rest/ , or google for more, there are a couple). I.e., the RPC mechanism is replacable, and there are libraries out there that already does it.
Chii
+1  A: 

I've been looking for the same thing - I've found something similar to what GWT does for ASP.Net called Script#. It is written by the same guy that was mainly responsible for ASP.NET AJAX - Nikhil Kothari. The site is: http://projects.nikhilk.net/ScriptSharp

It basically takes C# code and compiles it to Javascript - the same thing that GWT does (only it does it with Java)

I honestly think that GWT can work with ASP.NET and even ASP.NET MVC - I reckon that you'd need JSON or XML serving generic handlers (.ashx) in ASP.NET for GWT to work. I havent tried it myself..

Forgive me if I've confused anyone..

A: 

Have a look at the Smart GWT library - its data-binding layer can directly call SOAP web services (standard .asmx).

eug