GWT
now left with Vaadin and plain GWT.
Vaadin 7 and Vaadin 8, now known as Vaadin Framework, are both Java-based wrappers around Google Web Toolkit (GWT).
You write pure Java code for your business logic and UI-creation. This Java code runs in a JVM on the server-side in a Java Servlet web container. The magic happens when Vaadin uses GWT to auto-generate the necessary HTML, CSS, JavaScript, DOM, AJAX, XML & JSON, WebSocket, and Push code needed to render your web-app’s user-interface within the user’s client-side web browser.
So, pure Java on the server-side, pure web-standards tech on the client-side (no Java on client).
Web Components
Vaadin 10, now known as Vaadin Flow, replaces the internal use of GWT with the emerging Web Components standard technology. This new generation is a major re-write of Vaadin, though its purpose and many of its concepts such as data-binding remain the same.
By leveraging Web Components technology, it should be easier to build Vaadin widgets. And it should be relatively easy to make existing JavaScript-based components not designed explicitly for Vaadin available to your server-side Java code. That's the whole point of Web Components: making web-based widgets that work across various web framework tools.
While the Vaadin Ltd in quite excited and proud to ship Vaadin 10 Flow, they remain committed to Vaadin 8 Framework as well. Vaadin 8 is under active development, with a road map plan for continued support at least through the year 2022.
- If you really want to work with GWT, you can do so in Vaadin 8 Framework.
- If you want to bet on Web Components instead of GWT, go with Vaadin 10 Flow.
Rich apps
Rich text application where user performs many activities in the client.
If you meant "rich text" as in fonts, colors, and such, you should study the RichTextArea
widget bundled with Vaadin 8 as well as check the Vaadin Directory for additional add-ons. That widget is not being brought over to Vaadin 10 Flow, but as mentioned above, the use of Web Components may make other existing such tools available to a Java-based Vaadin app. I see one already in beta.
If you meant "rich" in terms of professional-looking, business-oriented, desktop-style web apps with enterprise-level reliability, that is the very purpose of Vaadin.
Java
We are looking to develop using Java technology
That is the raison d’être of Vaadin: Writing pure Java to leverage the vast ecosystem of Java tooling and libraries, with all its benefits of security, performance, and reliability — while at the same time using web-standards technology to auto-render your app in a web browser.
Mobile
Mobile support is required.
The Vaadin collection of widgets have evolved to support touch-surface gestures.
The Vaadin Ltd company previously offered a special package for mobile support, called Vaadin Touch. The built-in support for touch gestures in regular Vaadin widgets rendered that package obsolete and unnecessary.
Cloud & scaling
The services will be offered in cloud.
Scalability is also one main concern.
Your Java-based Vaadin app does live in a JVM on the server-side. Each current user is represented by session object. All the user-interface widgets appearing in the browser have a counterpart in a Java object on the server. You may be keeping further data and functionality in additional Java objects on the server. You may be calling JDBC or Web Services etc. from that server-side as well.
So all of that takes up memory and CPU cycles on the server. You do need to be cognizant of your programming doing caching and placing other burdens on the server. Any resources shared between users must be thread-safe, as a Java Servlet environment is multi-threaded by design.
Robust server hardware (memory, cores) may be needed, depending on the particulars of your app. Or you may want multiple servers with sticky-session load-balancing if you truly have a very large app with very many users.
The Vaadin Ltd company has simulated the use of a Vaadin app supporting thousands of simultaneous user sessions. You can contact them for consultations on your particular situation.
While scalability is an issue to consider, do not jump to conclusions. Think it through, and do some experimentation.
Creating custom widget
If I have to write a new widget in Vaadin how easy or difficult it is to accomplish?
In Vaadin 8, you can indeed create your own widgets. But doing so required learning the use of GWT. Doable, certainly as you can see from the hundreds of published add-ons in the Vaadin Directory. But still some serious work. The Vaadin Ltd. offered training on this.
In Vaadin 10 Flow, the use of Web Components should make the creation of your own widgets much easier. Check out this starter project provided free-of-cost to get you going. See the tutorial, Creating A Simple Component Using the Element API. Key concepts in creating widgets in Vaadin 10 Flow:
- Every Vaadin 10 component always maps to one root element in the server-side DOM representation.
- The
Element
API makes it possible to modify the DOM easily from the server side.
Any other issues?
Is there any obvious issues with Vaadin widgets or concepts which might be a blocker for any application?
Not sure what you mean here. I suggest reading through the excellent Vaadin tutorial and manual. It leads you through using all kinds of features in Vaadin.
Having used other rapid application development environments for desktop apps, Vaadin always made sense to me, fit my way of thinking and doing things.
Bleeding edge
For Vaadin Flow, know that Web Components is still new, and somewhat bleeding-edge. Web Components is actually a collection of technologies. Not all of these are supported fully by all browser makers. So some polyfills are still necessary.
Vaadin Flow also makes use of the pair of modern page-layout features that have finally arrived in CSS: Flexbox and Grid Layout.
Only the latest versions of the browsers are coming close to having good support for all these features. See CanIUse.com for particular details.
Part of Vaadin’s purpose is to paper over the gaps between various versions of various browsers, to insulate us developers using Vaadin. So you may not encounter problems in some browsers, but then again you might.
Also, Vaadin Flow does not quite have all of Vaadin 8 features. Some are under development, and some are planned.
Upshot: If you are eager to ship soon and cannot insist on users updating to the latest browsers, use Vaadin 8 rather than Flow.
Leaving Vaadin for GWT
If tomorrow we decide to just switch back to GWT, is that feasible given that Vaadin works with all server code logic?
If you want to use GWT, and you want to write that server-side logic in Java, then Vaadin 8 Framework is the perfect tool for you. I do not see how you would ever want to leave Vaadin.
But if you did leave Vaadin, you would no longer have the glue that connects your GWT in the browser with your Java code on the server. That glue is what Vaadin provides for you. Of course, you can write your Java back-end business logic to be unaware of Vaadin directly. Indeed, Vaadin Ltd provides a Maven-based multi-module archetype for this very purpose. The backend
module holds your business logic and database-access (etc.) code, kept separate from the ui
module containing your Vaadin-oriented code.
Network traffic
Does the Vaadin method of going to server everytime a concern for applications that are deployed on cloud?
You will need to do some experimenting and profiling to see the memory and cores needed for your particular app. Vaadin can be demanding on server resources as discussed above.
But technically, no tricks or technical limits with cloud deployment. Just plain Java code running, in a JVM. Anything that can run a Java Servlet web container such as Tomcat, Jetty, Glassfish/Payara, WildFly/JBoss, and such can run your Vaadin app.
If you are concerned by the network traffic, yes, there is traffic. When a user uses a widget such as clicking a button or entering data in a field, your server-side Java app is informed so that your app can respond with business logic. So that means frequent network traversal.
You do have options to not immediately inform the server-side when not needed. In doing so, you are controlling some of that traffic. For example, you can choose whether you want the server-side to be informed (and react) for every single keystroke while entering text in a field, or occasionally such as a pause between keystrokes, or only after the user has completed entry in that field. See the [Configuring the Granularity of Value Change Events](https://vaadin.com/docs/v8/framework/components/components-textfield.html section in the manual.
I did fear a problem with Internet performance when I started with Vaadin. But I can say that in my own experience, I was pleasantly surprised, astounded really, to find this was a non-issue for me. For example, in the United States, with a mere Mac mini in a colo in Wisconsin on very fast Internet connection running a Vaadin 7 or 8 app reacts virtually instantaneously on clients accessing household DSL and Cable-TV connections in Seattle, Florida, and Canada. When accessed from Hong Kong, only the slightest delays, generally imperceptible in a data-entry app.
Your mileage may vary, of course. My example above was a dedicated computer. In contrast, cloud providers are notorious for fluctuations in both CPU availability and network delays or latency.
Support
Last but most important, how is forum support and future dev?
Vaadin Ltd appears to be a very healthy open-source company. They sell add-on products, support, consulting, and training. The company has been growing, hiring more staff, and establishing overseas offices (US, Germany) while their home base remains in Finland (Turku, Helsinki).
The various Vaadin products are under very heavy development with many incremental releases, pre-releases, and soon to arrive Long-Term-Support versions. The regularly publish a road map to their development plans. They also provide regular updates on their business and technical issues in their blog.
The Vaadin Ltd company hosts a very active forums site. Both their staff and other users actively use Stack Overflow as well.