Differences between GWT and Vaadin

前端 未结 10 1573
小鲜肉
小鲜肉 2021-02-01 01:21

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

相关标签:
10条回答
  • 2021-02-01 01:25

    As any application has to show display information coming from the server, a major requirement for simple coding is automated data binding to your forms and tables. With Vaadin, this is as simple as a few lines of code. In GWT, first you have no table mapping. As for forms, you can map an object to a form, but to do so you have to implement a so called GWT Editor for your object (and one for every object inside of it). An Editor is nothing else than the definition of the form to use to show/modify the object. So all in all, there is no automation here.

    0 讨论(0)
  • 2021-02-01 01:30

    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.

    0 讨论(0)
  • 2021-02-01 01:32

    Differences between Vaadin and GWT:

    A) Vaadin includes a server-side development model that:

    • Cuts number of code lines to half by reducing layers one has to implement for user interface.
    • Allows you to use any JVM based language for user interface - Scala, Groovy
    • Increases security by keeping user interface logic in the server
    • Allows synchronous calls to any backend API from the web server
    • Allows use of any standard Java libraries and tools for UI layer- in server side architecture applications
    • Does not need Java to JavaScript compilation step that often takes time or makes tooling complicated in GWT projects - instead you have the Vaadin client engine
    • Provides server push out of the box with no extra code needed

    B) Vaadin provides a large set of high level user interface components. For GWT one would need to use commercial Sencha GXT for comparable component set.

    C) Vaadin includes SASS based Valo theme engine that makes it easy to build good looking custom themes from your application. Valo is the latest theming for Vaadin.

    D) Data binding: Vaadin has incorporated the ability to associate any widget directly to a data source such as database, file or anything else in the server-side. This enables to define default behavior of the widgets to act on data sources.

    Vaadin vs GWT

    0 讨论(0)
  • 2021-02-01 01:35

    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.

    0 讨论(0)
  • 2021-02-01 01:37

    I haven't tried Vaadin. I'm a GWT fan, but I CAN say that I've been a bit disappointed by the default widget set provided with GWT. You really need something like SmartGWT to fill the framework out.

    0 讨论(0)
  • 2021-02-01 01:37

    I belive Vaadin is a much more advanced framework than GWT BUT When it comes to optimise performance on the client side there is nothing much you can do unless you build your own components (and that's where the beauty of Vaadin stops) In a project i'm working right now 90% of the staff I've done worked as a charm And then I had to use an event timeline next to a couple of tables. When I loaded more than 400events on the timeline my web page was almost unusable not to mention terrible slow on initialisation. I've been trying to optimise the code the last two months. At the end I used a GWT component.

    0 讨论(0)
提交回复
热议问题