Preferred way to extend CUBA platform frontend

Any platform extension is a complex process. In case of CUBA’s frontend we have several ways to implement new UI elements (components, &c). As a matter of fact, this makes things even more complex by introducing ambiguity of choice.

We have standard Vaadin(-ish) interface with its own extension quirks as opposed to Polymer.

I came over this cornerstone while in development of almost fresh new project and can’t see which way is best practice (preferred one, if you will). Documentation outlines just a methods of extension, while not advising either one.

The question is: what is guidelines here to select which extension mechanism will work best in case of fresh project (personal experience with either of approaches aside)? Which one will be simpler in term of development effort? And which one give maximum flexibility?

As of now, I see clearly that plain JavaScript approach works better for our use-case. But existing JavaScript guide just drops a bunch of code without explicitly adding what is needed and why it is needed. So, will there be any additional JavaScript integration guides, tutorials or similar documentation-like materials?

Hi,

In fact, we completely rely on Vaadin Framework for Web UI. It means that you can use all the features of Vaadin for creation of custom client-side components described in Vaadin docs and tutorials: Vaadin Docs or in Vaadin Book: Overview | Client-Side Development | Framework | Vaadin 7 Docs

We don’t bring our specifics to client-server communication and client side programming. There are several things that are specific for CUBA: data binding, security, localization and XML declarative mark-up, but they are the same regardless of the concrete implementation of a client side widget.

1 Like

In short, we recommend that you use existing Vaadin add-ons or integrate thirdparty JS libraries if it is possible.

A new component can be created with the following technologies:

  1. On the basis of a Vaadin add-on.
    There are plenty of third-party components for Vaadin, which can be used in CUBA-based applications. This is the simplest method of a custom component integration.

  2. As a wrapper of a JavaScript library.
    This method is recommended if you already have a pure JavaScript component that does what you need. It is important to note that there is no static type checking and the compatibility of client side component to the server side can not be ensured either

  3. As a new GWT component.
    This is the recommended method of creating completely new visual components with complex logic. It is recommended only if you are familiar with GWT framework.