Is Vaadin Elements meant to be used with the Vaadi

2019-02-18 02:19发布

问题:

Vaadin seems to be pushing in 2 directions:

  • Vaadin Framework (Java - Server-side)
  • Vaadin Elements (Javascript - Client-side)

Are they meant to be used together now.. or in the future? Or just 2 separate, unrelated product offerings?

For example, is the Vaadin Grid Element (not to be confused with Vaadin 7's Java Grid), meant to be used in 'Java-land'?

I found this Server-side Elements post, which talks about creating/manipulating Javascript Web Components from the Server-side. Is this what we are meant to use? Or is there something else coming to simplify component usage in Java?

..I feel I'm missing something.

回答1:

Vaadin Flow

As of now, Vaadin team has announced Vaadin Flow (Developer Preview) which provides answers for your question. With Flow, the traditional Vaadin developers get the privilege to use custom client side elements without much pain.

Flow provides the following methods of interacting with the DOM in the user’s web browser:

  • HTML-based templates that are bound to server-side Model data.
  • A server-side representation of the client-side DOM tree.
  • A type-safe Java RPC API for interacting with JavaScript in the browser.

These mechanisms are intended to be encapsulated into reusable components with a high-level Java API.

Please do have a look into these great resources for more information:

  1. Vaadin Flow - the next piece of Vaadin 10 is now in developer preview
  2. Vaadin Flow Official Documentation
  3. Vaadin Elements in Vaadin 10
  4. Vaadin Framework 8 roadmap 2017 and beyond


回答2:

There was an announcement by Joonas Lehtinen (Vaadin's CEO) that clarified this. In short:

Web Components will shortly be fully supported by most ever-green browsers. [...] This provides us with two opportunities:

1) Web components are a perfect rendering model for Vaadin Framework. Imagine using any web components by any vendor from server-side Java, just like you use server-side Components today. [...]

2) We will be able to share the components we build with other frameworks. Anyone could use Vaadin’s components - not just Java developers [...] We have already started to release some of these components as in the form of Vaadin Elements.

Read the full blog post here: https://vaadin.com/blog/-/blogs/framework-roadmap-connecting-the-dots