PDA

View Full Version : Pure ExtJs vs GWT



bwoody
12 Jun 2009, 9:28 AM
I am looking for some opinions on developing a new application with ExtJs as the foundation versus using GWT. (GWT or EXT GWT)

I would really like to hear from people who are 'experts' with both; ideally people who have worked on projects with both. If someone were equally familiar with both, which criteria would they use to decide between the two for a new project.

Has anyone on the ExtJs team already talked about this somewhere else? Since they are supporting the pure ExtJs and Ext GWT I assume they would have some opinions on which they would use when starting a new project.

mschwartz
12 Jun 2009, 10:29 AM
Pure Ext, you can develop almost all of your application in Javascript and debug with firebug or equivalent. There's no compile times involved.

Pure Ext can be used with Java with minimalistic servlets, but that's not what GWT is about.

My preference is to write in Javascript and to make my server side logic rather simple. If you think about users connecting to your server as a distributed computing network, you have all those client machines out there to offload work from the server/s.

I am language agnostic and have no beef with Java or other server side languages. Javascript is at the opposite extreme from strongly typed languages which I feel is a great feature, while others may see it as a huge issue.

But hey, Ext is written in Javascript and shows what kind of things can be done, even with teams of programmers in Javascript.

bwoody
12 Jun 2009, 1:54 PM
There is really no difference between the two when it comes to where the code runs (client vs server) or what types of UIs are possible. GWT compiles into Javascript so they are functionally equivalent when deployed.

I think there are more issues to consider besides which language you prefer: java vs javascript.

If there were a programmer who likes java and javascript equally, are there any general things that could be said about the productivity in one environment over the other or are there certain classes of problems that lend themselves to one approach over the other?

For example, GWT is supposed to compile different code for different platforms and it seems that they have put more thought into deploying apps to mobile devices.

On the other hand, if my project involved the creation of several new custom controls, it seems that it would be easier to do in ExtJs since I just need to write the controls. In GWT I might have to first write some javascript for the control and then write some additional wrapper to make it available as a Java object in GWT. That might entice met to lean more towards pure ExtJs.

sven
12 Jun 2009, 1:58 PM
On the other hand, if my project involved the creation of several new custom controls, it seems that it would be easier to do in ExtJs since I just need to write the controls. In GWT I might have to first write some javascript for the control and then write some additional wrapper to make it available as a Java object in GWT. That might entice met to lean more towards pure ExtJs.

That is not quite correct. You write your own controls fully in Java. You dont even have to know javascript.

Lobos
14 Jun 2009, 12:08 PM
I have never used java, is this a server side scripting type langauge like Php, asp, etc?

I was thinking once to write a type of abstraction layer to run ext in PHP, but in the end could never really feel that I was accomplishing anything other then making it so a user doesn't need to know javascript, only php to make the UI.

The thing is that to me Javascript seems like the best language to work with Ext - but I am not so sure about Java, is this event based like JS ? just looking for clarifcation due to my ignorance of Java... ie wondering if it would be worthwhile to skip php and use GWT to kill like two brids with one stone...

Thanks!

fangzhouxing
14 Jun 2009, 6:23 PM
I think that there are two disadvantages for big project using GXT instead of pure ExtJS now:
1. The java-to-js compiling time is long, and slow down the deploying procedure.
2. Lack of load-js-on-demand functionality.

sven
15 Jun 2009, 3:11 AM
I think that there are two disadvantages for big project using GXT instead of pure ExtJS now:
1. The java-to-js compiling time is long, and slow down the deploying procedure.
2. Lack of load-js-on-demand functionality.


Point 2 will be fixed with the release of GWT 2.0 which will ber released in Q3/09. It even can be done now with splitting your app to several entrypoints (not a big deal)

Point one is not quite correct. Compiling time is something of a couple of minutes or seconds (size of app). You dont even have to care about how to minify your js files as this is already done for you. So here you even SAFE time.

jay@moduscreate.com
15 Jun 2009, 11:48 AM
That is not quite correct. You write your own controls fully in Java. You dont even have to know javascript.

Just awesome!

Nash-T
15 Jun 2009, 12:08 PM
There is really no difference between the two when it comes to where the code runs (client vs server) or what types of UIs are possible. GWT compiles into Javascript so they are functionally equivalent when deployed.


But how much of the Ext functionality can you serve from cachefly when you use GWT? I see you can serve the "/resources" directory from cachefly, but don't you have to serve most of the ext-all.js functionality from your own server when you use GWT?

sven
15 Jun 2009, 12:10 PM
GXT resources are not served up from cachefly. You can use googleappengine for example.

Nash-T
15 Jun 2009, 12:17 PM
GXT resources are not served up from cachefly. You can use googleappengine for example.

That will cost you after a certain amount of hits, but a pretty good option.

DocSavage
15 Jun 2009, 4:41 PM
That will cost you after a certain amount of hits, but a pretty good option.

A couple of points:
- It was mentioned at Google I/O that declaring files as "static" in Google AppEngine will result in a very streamlined static file serving process. The static files don't even go through the normal dynamic page handlers, so I'm not even sure you get charged for CPU time, just bandwidth.
- If you like Java or aren't into Javascript, GWT is pretty awesome, esp. on App Engine. There's a plugin for Eclipse development, integrated debugging, and an efficient way of moving data between client/server using Java data structures. I'm not a Java guy, but the demos I've seen (and the testing) almost made me want to pick up GWT.
- You can add javascript into your mostly Java-centric client, so the client can be tailored using javascript. For the most part, though, you're supposed to stay with Java.