Reputation: 2778
I have to develop a web application with database connection. So I checked on Wikipedia's "Web application comparison"
Here I was mainly looking for Java based frameworks. The first thing that looked interesting to me was "GWT". But there are some points that are not clear to me.
The page doesn't contain any information on whether GWT uses the MVC-pattern. Does it?
Further it doesn't say anything about push or pull functionalities. So what does GWT use?
On "DB migration frameworks" it says, "via java". Does that mean that I can use any database that I can connect with Java?
Is it a reasonable decision to choose GWT to implement a web based application with database connection which is used in a company network? Or are there any arguments which would make me consider any other frameworks?
I am originaly a .Net (C#) developer and I also heard about the .NET "StockTrader" sample application. What would be pros & cons vs GWT? Or are those two different things?
As you can see I am totaly new to this things and I would strongly appreciate it if that question doesn't get closed because it is about forming an opinion. I am openminded for any advice or suggestions on other frameworks.
Greets, BC++
Upvotes: 0
Views: 833
Reputation: 439
I would like to add on to other answers in that GWT is mostly a client side library. You can communicate to the server via either GWT-RPC, or REST. In terms of MVC, many GWT libraries have these inside of them.
One that was mentioned was Smart GWT, however, I would not recommend this one myself. The reason for this is Smart GWT is a thin wrapper on Javascript objects, and as such the GWT compiler doesn't get to do a whole lot with optimization, and this typically means your code download is bigger than if the library was written in java and compiled down.
If you're looking for a library on top of GWT, I would suggest looking at Ext GWT. Ext GWT has a rich widget library, MVC support in it, and is pure java. I have used it, and while I had my problems with it, I found it easier to deal with than SmartGWT. If you're looking for a close to pure GWT experience, might I suggest Spring Roo as a starting point.
In terms of development on UI, you have a few options, you can either develop using pure JAVA in GWT, use GWT's UI Binder feature, or create HTML and just add in GWT components. I'm not sure any of the above really is the "best" way to go, either from performance or maintainability.
In terms of database support, GWT client has no support for a remote RDBMS, as that is typically done on the server side, and you can use any DB your server side code can support. You can use GWT's experimental implementation of HTML5's storage API, assuming of course you're planning on running in an HTML 5 browser.
I think the whole thing comes down to what you want to do. I would not necessarily use GWT just to use it, but it definitely helps solve certain problems because you can develop in a strongly typed language and handle such data types.
Upvotes: 2
Reputation: 4608
First, a clarification: GWT is mostly an UI lib - that is, you write your interface in Java, it translates it to JavaScript and you can run it in the browser. That said:
The patterns you use are independent of the library. If you use GWT eclipse's project creator, it will split your project in three packages (client, server, and shared)... and you can take it from there.
GWT usually uses the pooling model, where the client ask the server for data. You can however try some pushing.
The server-side code is just Java, no GWT involved. You can do anything "java" on the server and then send it to your client-side code.
If you are using it on your company intranet, you might want to consider a full framework like SmartGWT instead of the pure GWT implementation. Those provide you with more tools and a faster development, considering you follow the intended model.
As a side note, it's worth mentioning that you might want to develop your interface using pure HTML/CSS as you would normally and then just use GWT to add dynamic widgets or Ajax call. Building your whole interface in GWT (from scratch) is usually a bad idea, performance-wise... and you might have many problems positioning things the way you actually want.
Upvotes: 2
Reputation: 47608
GWT focuses mainly on the UI layer of a web-application making it easy to create and debug the HTML/Javascript layer because you code it with Java and use all the existing tools of Java.
GWT is not a solution on itself. You will need to add other frameworks to build a complete application. You can consider using it with Guice and JPA/Hibernate, for example. You could also use Spring with it.
Upvotes: 4