Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between GWT and Vaadin

Tags:

gwt

vaadin

Can anyone suggest whether "GWT" or "Vaadin" are a better choice to design an application? Also: what are the differences in coding style?

like image 375
sundhar Avatar asked Nov 11 '10 15:11

sundhar


People also ask

What is Vaadin used for?

Vaadin Flow (formerly Vaadin Framework) is a Java web framework for building web applications and websites. Vaadin Flow's programming model allows developers to use Java as the programming language for implementing User Interfaces (UIs) without having to directly use HTML or JavaScript.

Is Vaadin frontend or backend?

Vaadin is an open-source platform for building modern, collaborative web apps for Java backends.

Is Vaadin framework good?

Vaadin is a mature web framework for developing rich internet applications. Building web-based GUIs with Vaadin feels like developing a desktop application, which is great, comfortable and fast. However, there are situations where Vaadin is not suitable.

Is Vaadin front end?

Vaadin has introduced a new web framework for Java developers, Hilla, that combines the backend with Spring Boot and the frontend as a mix of TypeScript and Lit.


3 Answers

In GWT application logic is normally run on client side. It only calls server when it needs to read/save some data.

In Vaadin application logic is on server side. Client side must normally call server after every user interaction.

GWT advantage:
App logic (replies to user interaction) is faster as it is run locally in the browser. It's also relatively insensitive to bad network conditions. Network is used only when needed (to read/save new data), which saves net traffic (important for high traffic sites).

In this regard Vaadin is slower and introduces a lag in UI interaction which is annoying to user. If network is bad this will show in UI responsiveness.

Vaadin advantage:
App logic is run on the server so it can not be inspected by the user. Arguably (Vaadin claims) that makes it more secure.

like image 197
Peter Knego Avatar answered Oct 13 '22 09:10

Peter Knego


A few more points:

  • A fundamental difference is that in GWT you have to separate your application into Client and Server code, no such distinction in Vaadin. This will affect the architecture of your application.

  • In GWT client code, you must code in Java, and have a limited subset of language features available (that the GWT compiler can translate into Javascript). In Vaadin, you can code in any JVM language, since everything runs in the server (I'm using Vaadin with Scala). This may or may not be relevant to you.

  • GWT compilation is VERY slow, although in development mode you have the emulator. This makes production environment updates painful (a GWT application I developed has grown pretty big, and currently takes around 15 minutes to compile).

  • It's very simple to extend GWT with 3rd party widgets, or roll your own. Creating new Vaadin widgets is more complex.

like image 36
hbatista Avatar answered Oct 13 '22 11:10

hbatista


Another Vaadin advantage: you don't have to design or implement the client-server communication, that's built-in.

like image 18
Jouni Avatar answered Oct 13 '22 09:10

Jouni