Jump to content

Vaadin: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Monkbot (talk | contribs)
m History: Task 16: replaced (1×) / removed (1×) deprecated |dead-url= and |deadurl= with |url-status=;
Hyperlink added.
 
(46 intermediate revisions by 31 users not shown)
Line 1: Line 1:
{{Short description|Web development platform written in Java}}
{{Infobox software
{{Infobox software
| name = Vaadin
| name = Vaadin
Line 7: Line 8:
| caption = Web application implemented with Vaadin Flow
| caption = Web application implemented with Vaadin Flow
| developer = Vaadin Ltd.
| developer = Vaadin Ltd.
| latest release version = 14.0.3
| latest release date = {{Start date and age|2019|09|04|df=yes}}<ref name="vaadin-version">{{cite web|url =https://github.com/vaadin/platform/releases/tag/14.0.3|title = Release Vaadin 14.0.3 · vaadin/platform · GitHub|website= [[GitHub]]}}</ref>
| repo = {{URL|https://github.com/vaadin/platform|Vaadin Repository}}
| repo = {{URL|https://github.com/vaadin/platform|Vaadin Repository}}
| programming language = [[Java (programming language)|Java]], [[JavaScript]]
| programming language = [[Java (programming language)|Java]], [[JavaScript]]
Line 15: Line 14:
| license = [[Apache License]] 2.0
| license = [[Apache License]] 2.0
| website = {{URL|http://vaadin.com|vaadin.com}}
| website = {{URL|http://vaadin.com|vaadin.com}}
}}
}}'''Vaadin''' ({{IPA-fi|ˈʋɑːdin}}) is an [[open-source software|open-source]] platform for [[web application]] development. The Vaadin platform includes a set of [[Web Components|web components]], a Java [[web framework]], and a set of tools and application starters. Its flagship product, Vaadin Platform (previously [[Vaadin Framework]]) allows the implementation of HTML5 web user interfaces using the [[Java (programming language)|Java Programming Language]].
'''Vaadin''' ({{IPA|fi|ˈʋɑːdin}}) is an [[open-source software|open-source]] [[web application]] development platform for [[Java (programming language)|Java]]. Vaadin includes a set of [[Web Components]], a Java [[web framework]], and a set of tools that enable developers to implement modern web [[Graphical user interface|graphical user interfaces]] (GUI) using the [[Java (programming language)|Java programming language]] only (instead of HTML and JavaScript), [[TypeScript]] only, or a combination of both.


==History==
==History==
Line 22: Line 22:
In early 2007 the product name was changed to [[IT Mill Toolkit]] and version 4 was released. It used a proprietary [[JavaScript]] Ajax-implementation for the client-side rendering, which made it rather complicated to implement new widgets. By the end of the year 2007 the proprietary client-side implementation was abandoned and [[Google Web Toolkit|GWT]] was integrated on top of the server-side components. At the same time, the product license was changed to the open source [[Apache License|Apache License 2.0]]. The first production-ready release of IT Mill Toolkit 5 was made on March 4, 2009, after an over one year beta period.
In early 2007 the product name was changed to [[IT Mill Toolkit]] and version 4 was released. It used a proprietary [[JavaScript]] Ajax-implementation for the client-side rendering, which made it rather complicated to implement new widgets. By the end of the year 2007 the proprietary client-side implementation was abandoned and [[Google Web Toolkit|GWT]] was integrated on top of the server-side components. At the same time, the product license was changed to the open source [[Apache License|Apache License 2.0]]. The first production-ready release of IT Mill Toolkit 5 was made on March 4, 2009, after an over one year beta period.


On September 11, 2008, it was publicly announced<ref>{{Cite web|url=http://www.investinfinland.fi/news/2008/en_GB/ITMill/|title=Michael "Monty" Widenius investing in Finnish IT Mill|publisher=Invest in Finland|accessdate=2009-01-31|archive-url=https://web.archive.org/web/20110720185127/http://www.investinfinland.fi/news/2008/en_GB/ITMill/|archive-date=2011-07-20|url-status=dead}}</ref><ref>{{Cite web|url=https://web.archive.org/web/20160311195756/http://www.cnet.com/news/monty-widenius-invests-in-act-ii-it-mill/|title=Monty Widenius invests in Act II: IT Mill|last=Asay|first=Matt|publisher=[[CNET Networks#CNET News|CNET News]]|accessdate=2009-01-31}}</ref> that [[Michael Widenius]]–the main author of the original version of [[MySQL]]–invested in IT Mill, the developer of Vaadin. The size of the investment is undisclosed.
On September 11, 2008, it was publicly announced<ref>{{Cite web|url=http://www.investinfinland.fi/news/2008/en_GB/ITMill/|title=Michael "Monty" Widenius investing in Finnish IT Mill|publisher=Invest in Finland|access-date=2009-01-31|archive-url=https://web.archive.org/web/20110720185127/http://www.investinfinland.fi/news/2008/en_GB/ITMill/|archive-date=2011-07-20|url-status=dead}}</ref><ref>{{Cite web|url=http://www.cnet.com/news/monty-widenius-invests-in-act-ii-it-mill/|archive-url=https://web.archive.org/web/20160311195756/http://www.cnet.com/news/monty-widenius-invests-in-act-ii-it-mill/|url-status=dead|archive-date=2016-03-11|title=Monty Widenius invests in Act II: IT Mill|last=Asay|first=Matt|publisher=[[CNET Networks#CNET News|CNET News]]|access-date=2009-01-31}}</ref> that [[Michael Widenius]]–the main author of the original version of [[MySQL]]–invested in IT Mill, the Finnish developer of Vaadin.<ref>{{Cite web |url=https://www.tivi.fi/uutiset/it-mill-avointa-ajaxia-suomesta/5070cd81-d50a-3c87-98eb-b4b5c67a2fca |title=IT Mill, avointa Ajaxia Suomesta |last=Sani |first=Ilari |date=10 March 2009 |website={{ill|Tivi (magazine)|fi|Tivi|lt=Tivi}} |publisher=[[Alma Media]] |language=fi |access-date=11 July 2024}}</ref> The size of the investment is undisclosed.


On May 20, 2009, IT Mill Toolkit changed its name to [[Vaadin Framework]]. The name originates from the [[Finnish language|Finnish]] word for [[List of animal names|doe]], more precisely put, a female [[reindeer]]. It can also be translated from Finnish as "I insist". In addition to the name change, a pre-release of version 6 along with a community website was launched. Later, IT Mill Ltd, the company behind the open source Vaadin Framework, changed its name to Vaadin Ltd.
On May 20, 2009, IT Mill Toolkit changed its name to Vaadin Framework. The name originates from the [[Finnish language|Finnish]] word for [[List of animal names|doe]], more precisely put, a female [[reindeer]]. It can also be translated from Finnish as "I insist". In addition to the name change, a pre-release of version 6 along with a community website was launched. Later, IT Mill Ltd, the company behind the open source Vaadin Framework, changed its name to Vaadin Ltd.


On March 30, 2010, Vaadin Directory was opened. It added a channel for distributing add-on components to the core Vaadin Framework, both for free or commercially. On launch date, there were 95 add-ons already available for download.{{citation needed|date=September 2017}}
On March 30, 2010, Vaadin Directory was opened. It added a channel for distributing add-on components to the core Vaadin Framework, both for free or commercially. On launch date, there were 95 add-ons already available for download.<ref>{{Cite web|title=Vaadin Directory Opens its Doors|url=https://vaadin.com/blog/vaadin-directory-opens-its-doors|access-date=2021-09-07|website=vaadin.com|language=en}}</ref>
{| class="wikitable"

|+Release history
On February 22, 2017, Vaadin Framework 8 was released.<ref>{{cite web|url=http://www.prnewswire.com/news-releases/vaadin-releases-vaadin-framework-8-300412081.html|title=Vaadin releases Vaadin Framework 8|last=Vaadin|first=|website=www.prnewswire.com}}</ref> Improvements include a re-written data binding API utilizing modern Java features such as type parameters and lambda expressions, and more efficient memory and CPU usage.
!LTS Version

!Release date
On June 25, 2018, Vaadin 10 was released.<ref>{{cite web|url=http://markets.businessinsider.com/news/stocks/vaadin-modernizes-java-development-with-its-biggest-release-to-date-vaadin-10-1027314255|title=Vaadin modernizes Java development with its biggest release to date: Vaadin 10|last=Vaadin|first=|website=www.businessinsider.com}}</ref> Vaadin 10 made possible to use Vaadin's components from any technology compatible with [[Web Components]] and enhanced Vaadin Directory to include Web Components distribution. Vaadin Flow–the next generation of Vaadin Framework–was presented as a server-side Java web framework on top of the Vaadin components.
!Notes and new features since the previous LTS version launch

On September 5, 2018, Vaadin 11 was released with Gradle integration, a few new components and Vaadin Charts 6.1.

== Vaadin's components ==
'''Vaadin's components''' are a comprehensive set of [[Web Components]] for application developers. The components can be used in web documents (without frameworks ) and web frameworks compatible with Web Components. These components are the core of Vaadin Flow, a Java web framework that offers a [[Java (programming language)|Java]] [[Application programming interface|API]] on top the each Vaadin component.

=== Basic usage ===
The Vaadin components are typically installed with [[Npm (software)|npm]] or Bower. For example, the following command installs the <code>vaadin-button</code> component:<syntaxhighlight lang="console">
bower install vaadin/vaadin-button
</syntaxhighlight>Once installed, the component can be used in a web page as follows:<syntaxhighlight lang="html">
<html>
<head>
<link rel="import" href="bower_components/vaadin-button/vaadin-button.html" />
</head>
<body>
<vaadin-button onclick='alert("Hello, World")'>Click me</vaadin-button>
</body>
</html>
</syntaxhighlight>The following is a screenshot of the previous page:
[[File:Vaadin-components-hello-world-screenshot.png|none|thumb|600x600px]]

=== Available components ===
The following table shows a list of the free open-source Web Components included in Vaadin:
{| class="wikitable sortable mw-collapsible" href="open source"
|+ href="Ajax (programming)" |
Vaadin components
! href="Swing (Java)" |Component
!Element name
! href="IT Mill Toolkit" |Description
|- href="JavaScript"
| href="Google Web Toolkit" |Button
| href="Apache License" |vaadin-button
| href="Michael Widenius" |Element for customized buttons
|- href="MySQL"
|Checkbox
| href="Vaadin Framework" |vaadin-checkbox
| href="List of animal names" |Element for customized checkboxes
|- href="reindeer"
|Combo box
| href="Category:All articles with unsourced statements" |vaadin-combo-box
|Shows a list of items with filtering
|-
|-
|6
| href="Vaadin Components" |Context menu
|20 May 2009
| href="Web Components" |vaadin-context-menu
|Initial release
|Shows context dependent items for any element on the page
|-
|-
|7
| href="Vaadin Components" |Date picker
|3 February 2013
| href="Web Components" |vaadin-date-picker
|
| href="Application programming interface" |A date selection field with a scrollable month calendar
|-
|-
|8
| href="Npm (software)" |Dialog<td>vaadin-dialog</td>
|21 February 2017
|Shows modal dialogs
|Improvements include a re-written data binding API that uses modern Java features such as type parameters and lambda expressions, and more efficient memory and CPU usage.<ref>{{cite press release|last=Vaadin|title=Vaadin releases Vaadin Framework 8|url=http://www.prnewswire.com/news-releases/vaadin-releases-vaadin-framework-8-300412081.html|website=www.prnewswire.com}}</ref>
|-
|-
|10
|Dropdown menu
|25 June 2018
|vaadin-dropdown-menu
|It's possible to use Vaadin's UI components from any technology compatible with [[Web Components]]. Vaadin Directory adds Web Components distribution. Vaadin Flow—the next generation of Vaadin Framework—was presented as a server-side Java web framework on top of Vaadin's UI components.<ref>{{cite web|last=Vaadin|title=Vaadin modernizes Java development with its biggest release to date: Vaadin 10|url=http://markets.businessinsider.com/news/stocks/vaadin-modernizes-java-development-with-its-biggest-release-to-date-vaadin-10-1027314255|website=www.businessinsider.com}}</ref>
| href="Web application" |Customizable web component for dropdown menus
|- href="Website"
| href="Vaadin Framework" |Form layout
| href="Java (programming language)" |vaadin-form-layout
| href="HTML" |Configurable responsive layout for form elements
|- href="Polymer (library)"
| href="API" |Grid
|vaadin-grid
| href="Document Object Model" |Data grid / data table element
|-
|-
|14
|UI icon set
|14 August 2019
|vaadin-icons
|New UI components, [[Context and Dependency Injection|CDI]] and [[OSGi]] support, [[Gradle]] integration, dynamic registration of routes, keyboard shortcuts API, support for [[Npm (software)|npm]] and Bower.<ref>{{Cite web|title=Vaadin 14.0.0 release on GitHub|website=[[GitHub]] |url=https://github.com/vaadin/platform/releases/tag/14.0.0}}</ref>
| href="File:Vaadin-flow-hello-world-screenshot.png" |A collection of 600+ icons
|- resource="File:Vaadin-flow-hello-world-screenshot.png" height width
|Item<td>vaadin-item</td>
|A container for item elements
|-<td>List box</td>
|vaadin-list-box<td>Reusable list boxes</td><tr><td>Notification</td><td>vaadin-notification</td><td>Customized notifications</td></tr><tr><td>Ordered layout</td><td>vaadin-ordered-layout</td><td>Horizontally or vertically align HTML elements</td></tr>
|-<td>Text field</td><td>[https://vaadin.com/components/vaadin-text-field vaadin-text-field]</td>
|Themable input controls
|-
|-
|23
|Progress bar
|1 March 2022
| href="Vaadin Components" |vaadin-progress-bar
|New release model.<ref>{{Cite web |title=A simpler release model {{!}} Vaadin |url=https://vaadin.com/blog/a-better-release-model |access-date=2022-08-11 |website=vaadin.com |language=en}}</ref> New UI components, reworked design system, feature flags, [[Npm (software)|npm]] is now the default package manager.<ref>{{Cite web |title=Vaadin 23 is finally here! {{!}} Vaadin |url=https://vaadin.com/blog/vaadin-23-is-finally-here |access-date=2022-08-11 |website=vaadin.com |language=en}}</ref>
| href="Vaadin Flow" |Customized progress bars
|-
| href="Vaadin Framework" |Radio button
|vaadin-radio-button
|Customized radio buttons<tr><td>Split layout</td><td>vaadin-split-layout</td><td href="GitHub">Partition a layout into resizeable areas</td></tr><tr><td>Navigation tabs</td><td>vaadin-tabs</td><td>Customized tabs</td></tr><tr><td>Upload</td><td>vaadin-upload</td><td>Upload multiple files with progress indication</td></tr>
|}
|}


==Vaadin Flow==
==Vaadin Flow (Java API)==
'''Vaadin Flow''' (formerly '''Vaadin Framework''') is a Java web framework for building [[web application]]s and [[website]]s. Vaadin Flow's programming model allows developers to use [[Java (programming language)|Java]] as the programming language for implementing User Interfaces (UIs) without having to directly use HTML or JavaScript. Vaadin Flow features a server-side architecture which means that most of the UI logic runs securely on the server reducing the exposure to attackers. On the client-side, Vaadin Flow is built on top of [[Web_Components|Web Component]] standards. The client/server communication is automatically handled through [[WebSocket]] or [[Hypertext Transfer Protocol|HTTP]] with light [[JSON]] messages that update both, the UI in the browser and the UI state in the server.
{{Infobox software
| name = Vaadin Flow
| logo = Vaadin Logo.svg
| logo size = 200px
| logo alt = Vaadin-logo
| screenshot = Vaadin-flow-bakery.png
| caption =
| developer = Vaadin Ltd.
| latest release version = 2.0.10
| latest release date = {{Start date and age|2019|09|03|df=yes}}<ref>{{cite web|url = https://github.com/vaadin/flow/releases/tag/2.0.10|title = Release 2.0.10 - Maintenance release · vaadin/flow · GitHub|website= [[GitHub]]}}</ref>
| latest preview version = 3.0.0.alpha1
| latest preview date = {{Start date and age|2019|08|16|df=yes}}<ref>{{cite web|url = https://github.com/vaadin/flow/releases/tag/3.0.0.alpha1|title = Release Vaadin Flow 3.0.0.alpha1 · vaadin/flow · GitHub|website= [[GitHub]]}}</ref>
| repo = {{URL|https://github.com/vaadin/flow|Flow Repository}}
| platform = Java
| genre = [[Web framework]]
| license = [[Apache License]] 2.0
| website = {{URL|http://vaadin.com|vaadin.com/flow}}
}}'''Vaadin Flow''' (previously [[Vaadin Framework]]) is a web framework for building [[web application]]s and [[website]]s. Vaadin Flow programming model is similar to Vaadin Framework's–It uses [[Java (programming language)|Java]] as the programming language for creating web content. Vaadin Flow features a server-side architecture which means that most of the logic runs on the server. On the client-side, Vaadin Flow is built on top of Web Component standards.

Vaadin Flow includes Web Component support for Java developers and allows the use of [[HTML]] templates (based on [[Polymer (library)|Polymer]]) with automated client-server communication. It also includes [[API]]<nowiki/>s for routing (connecting user interface components to URLs), [[data binding]] (synchronizing input fields with server-side data models), and server-side [[Document Object Model|DOM]] manipulation.


Vaadin Flow's Java API includes classes such as <code>TextField</code>, <code>Button</code>, <code>ComboBox</code>, <code>Grid</code>, and many others that can be configured, styled, and added into layout objects instances of classes such as <code>VerticalLayout</code>, <code>HorizontalLayout</code>, <code>SplitLayout</code>, and others. Behaviour is implemented by adding listeners to events such as clicks, input value changes, and others. Views are created by custom Java classes that implement another UI component (custom or provided by the framework). This view classes are annotated with <code>@Route</code> to expose them to the browser with a specific [[URL]]. The following example illustrates these concepts: <syntaxhighlight lang="java">
=== Basic usage ===
@Route("hello-world") // exposes the view through http://localhost:8080/hello-world

public class MainView extends VerticalLayout { // extends an existing UI component
The following is an elementary example of Vaadin Flow usage: <syntaxhighlight lang="java">
@Route("hello-world")
public class MainView extends VerticalLayout {


public MainView() {
public MainView() {
// creates a text field
TextField textField = new TextField("Enter your name");
TextField textField = new TextField("Enter your name");


// creates a button
Button button = new Button("Click me", event ->
add(new Span("Hello, " + textField.getValue())));
Button button = new Button("Send");
// adds behaviour to the button using the click event
button.addClickListener(event ->
add(new Paragraph("Hello, " + textField.getValue()))
);


// adds the UI components to the view (VerticalLayout)
add(textField, button);
add(textField, button);
}
}
}
}
</syntaxhighlight>The following is a screenshot of the previous application:
</syntaxhighlight>The following is a screenshot of the previous example:
[[File:Vaadin-flow-hello-world-screenshot.png|none|thumb|600x600px]]
[[File:Vaadin-flow-hello-world-screenshot.png|none|thumb|600x600px]]


== Hilla (TypeScript API) ==
=== Features ===
'''Hilla''' (formerly '''Vaadin Fusion''') is a web framework that integrates [[Spring Boot]] Java backends with reactive front ends implemented in [[TypeScript]]. This combination offers a fully type-safe development platform by combining server-side business logic in Java and type-safety in the client side with the TypeScript programming language. Views are implemented using Lit—a lightweight library for creating [[Web Components]]. The following is an example of a basic view implemented with Hilla:<syntaxhighlight lang="typescript">

@customElement('hello-world-view')
==== User interface implementation with only Java ====
export class HelloWorldView extends LitElement {
Vaadin Flow allows the usage of existing interface components and the implementation of new ones by using Java code running on the server side. It is possible to create and modify the DOM from the server side. The constructor in the following snippet of code shows how to create a new HTML <code>div</code> element, set its <code>id</code> attribute, and add a click listener:<syntaxhighlight lang="java">
render() {
@Route("")
return html`
public class MainView extends Div {
public MainView() {
<div>
<vaadin-text-field label="Your name"></vaadin-text-field>
Div div = new Div();
<vaadin-button @click="${this.sayHello}">Say hello</vaadin-button>
div.setText("Click me");
</div>
div.getElement().setAttribute("id", "main");
`;
div.getElement().addEventListener("click", (DomEventListener) event ->
}
add(new Span("Hello, World")));
add(div);
}
}
</syntaxhighlight>

==== Web Components integration ====
Web Components integration is provided through the <code>@Tag</code> and <code>@Import</code> annotations. The following snippet of code shows how to wrap an existing web component in a server-side Java component:<syntaxhighlight lang="java">
@Tag("juicy-ace-editor")
@HtmlImport("bower_components/juicy-ace-editor/juicy-ace-editor.html")
public class JuicyAceEditor extends Div {


sayHello() {
public void setMode(String mode) {
showNotification('Hello!');
getElement().setAttribute("mode", mode);
}
}
</syntaxhighlight>

==== Router ====
The Router is a core concept in Vaadin Flow and enables navigation via URLs. The Router allows the connection of URLs to user interface components. It is based on the HTML5 History API which allows end users to navigate through pages while preserving the page state. The following snippet of code shows how to use the <code>@Route</code> annotation to show the annotated component when the end user requests a URL like <code>http://''yourdomain.com''/hello/world</code>:<syntaxhighlight lang="java">
@Route("hello/world")
public class HelloWorldComponent extends Div {
public HelloWorldComponent() {
setText("Hello, World!");
}
}
}
}
</syntaxhighlight>
</syntaxhighlight>


==== Data binding ====
== Vaadin's UI components ==
Vaadin includes a set of User Interface (UI) components implemented as [[Web Components]]. These components include a server-side Java API (Vaadin Flow) but can also be used directly in HTML documents as well. Vaadin's UI components work with mouse and touch events, can be customized with CSS, are compatible with [[WAI-ARIA]], include keyboard and screen readers support, and support [[Right-to-left language|right-to-left languages]].
Data binding is done through the <code>Binder</code> class. It allows synchronizing the values in input fields with server-side data models. The following snippet of code shows how to bind the <code>name</code> Java field (through the corresponding [[Mutator method|getter and setter]]) of a hypothetical <code>Person</code> class to the value in a <code>TextField</code> component:<syntaxhighlight lang="java">
TextField nameField = new TextField();


The following table shows a list of the UI components included in Vaadin:
Binder<Person> binder = new Binder<>();
{| class="wikitable sortable mw-collapsible"
binder.bind(nameField, Person::getName, Person::setName);
|+ |
</syntaxhighlight>
Vaadin components
!Java class
!HTML element name
!Description
!License
|-
|<code>Accordion</code>
|<code>vaadin-accordion</code>
|A vertically stacked set of expandable panels
|Apache 2.0
|-
|<code>Anchor</code>
|<code>a</code>
|Allows navigation to a given URL
|Apache 2.0
|-
|<code>AppLayout</code>
|<code>vaadin-app-layout</code>
|A common application layout structure
|Apache 2.0
|-
|<code>Avatar</code>
|<code>vaadin-avatar</code>
|A graphical representation of a person
|Apache 2.0
|-
|(not available)
|<code>vaadin-badge</code>
|A coloured text element for labelling content
|Apache 2.0
|-
|<code>Board</code>
|<code>vaadin-board-row</code>
|Layout component for building responsive views
|Commercial
|-
|<code>Button</code>
|<code>vaadin-button</code>
|Allows users to perform actions
|Apache 2.0
|-
|<code>Crud</code>
|<code>vaadin-crud</code>
|A component to manage Create, Read, Update, and Delete operations
|Commercial
|-
|<code>Chart</code>
|<code>vaadin-chart</code>
|Interactive charts with different types such as bar, pie, line, and others
|Commercial
|-
|<code>Checkbox</code>
|<code>vaadin-checkbox</code>
|An input field representing a binary choice
|Apache 2.0
|-
|<code>Combo box</code>
|<code>vaadin-combo-box</code>
|Shows a list of items that can be filtered
|Apache 2.0
|-
|<code>ConfirmDialog</code>
|<code>vaadin-confirm-dialog</code>
|A modal Dialog used to confirm user actions
|Apache 2.0
|-
|<code>ContextMenu</code>
|<code>vaadin-context-menu</code>
|A menu that appears on right-click or long touch press
|Apache 2.0
|-
|<code>CookieConsent</code>
|<code>vaadin-cookie-consent</code>
|A banner that to comply with privacy laws such as [[General Data Protection Regulation|GDPR]] and [[California Consumer Privacy Act|CCPA]]
|Commercial
|-
|<code>CustomField</code>
|<code>vaadin-custom-field</code>
|A component for wrapping multiple components as a single field
|Apache 2.0
|-
|<code>DatePicker</code>
|<code>vaadin-date-picker</code>
|Allows to enter a date by typing or by selecting from a calendar overlay
|Apache 2.0
|-
|<code>DateTimePicker</code>
|<code>vaadin-date-time-picker</code>
|An input field for selecting both a date and a time
|Apache 2.0
|-
|<code>Details</code>
|<code>vaadin-details</code>
|An expandable panel for showing and hiding content
|Apache 2.0
|-
|<code>Dialog</code><td><code>vaadin-dialog</code></td>
|A popup window to show other components in an overlay
|Apache 2.0
|-
|<code>EmailField</code>
|<code>vaadin-email-field</code>
|A text field that only accepts email addresses as input
|Apache 2.0
|-
|<code>Form layout</code>
|<code>vaadin-form-layout</code>
|A layout for building responsive forms with multiple columns
|Apache 2.0
|-
|<code>Grid</code>
|<code>vaadin-grid</code>
|Data grid or data table component for tabular data
|Apache 2.0
|-
|<code>GridPro</code>
|<code>vaadin-grid-pro</code>
|Provides inline editing with full keyboard navigation
|Commercial
|-
|<code>HorizontalLayout</code>
|<code>vaadin-horizontal-layout</code>
|Places components side-by-side in a row
|Apache 2.0
|-
|<code>Icon</code>
|<code>iron-icon</code>
|Shows a custom icon or from a collection of 600+ icons (<code>VaadinIcons</code> enum)
|Apache 2.0
|-
|<code>Image</code>
|<code>img</code>
|Shows an image from a resource file or from binary data generated at runtime
|Apache 2.0
|-
|<code>ListBox</code>
|<code>vaadin-list-box</code>
|Allows to select one or more values from a scrollable list of items
|Apache 2.0
|-
|<code>LoginForm</code>
|<code>vaadin-login-form</code>
|A component that contains a login form
|Apache 2.0
|-
|<code>LoginOverlay</code>
|<code>vaadin-login-overlay</code>
|A modal or full-screen login form
|Apache 2.0
|-
|<code>MenuBar</code>
|<code>vaadin-menu-bar</code>
|A horizontal button bar with hierarchical drop-down menus
|Apache 2.0
|-
|<code>MessageList</code>
|<code>vaadin-message-list</code>
|A component for displaying messages and building chats and comment sections
|Apache 2.0<tr><td><code>Notification</code></td><td><code>vaadin-notification</code></td><td>Overlay component used to provide feedback to the user</td><td>Apache 2.0</td></tr>
|-
|<code>NumberField</code>
|<code>vaadin-number-field</code>
|A text field that only accepts numeric input (decimal, integral, or big decimal)
|Apache 2.0
|-
|<code>PasswordField</code>
|<code>vaadin-password-field</code>
|An input field for entering passwords masked by default
|Apache 2.0
|-
|<code>ProgressBar</code>
|<code>vaadin-progress-bar</code>
|Shows the completion status of a task or process
|Apache 2.0
|-
|<code>Radio button</code>
|<code>vaadin-radio-button</code>
|Allows to select exactly one value from a list of related but mutually exclusive options
|Apache 2.0
|-
|<code>RichTextEditor</code>
|<code>vaadin-rich-text-editor</code>
|An input field for entering rich text
|Commercial
|-
|<code>Scroller</code>
|<code>vaadin-scroller</code>
|A component container for creating scrollable areas in the UI
|Apache 2.0
|-
|<code>Select</code>
|<code>vaadin-select</code>
|An input field component for choosing a single value from a set of options
|Apache 2.0
|-
|<code>SplitLayout</code>
|<code>vaadin-split-layout</code>
|A component with two content areas and a draggable split handle between them
|Apache 2.0
|-
|<code>Tabs</code>
|<code>vaadin-tabs</code>
|Organize and group content into sections
|Apache 2.0
|-
|<code>TextArea</code>
|<code>vaadin-text-area</code>
|An input field component for multi-line text input
|Apache 2.0
|-
|<code>TextField</code>
|<code>vaadin-text-field</code>
|A component for introducing and editing text
|Apache 2.0
|-
|<code>TimePicker</code>
|<code>vaadin-time-picker</code>
|An input field for entering or selecting a specific time
|Apache 2.0
|-
|<code>TreeGrid</code>
|<code>vaadin-grid</code>
|A component for displaying hierarchical tabular data grouped into expandable and collapsible nodes
|Apache 2.0<tr><td><code>Upload</code></td><td><code>vaadin-upload</code></td><td>A component for uploading one or more files with upload progress and status</td><td>Apache 2.0</td></tr>
|-
|<code>VerticalLayout</code>
|<code>vaadin-vertical-layout</code>
|Places components top-to-bottom in a column
|Apache 2.0
|}
== Certifications ==
Vaadin offers two certification tracks to prove that a developer is proficient with Vaadin Flow:<ref>{{Cite web|title=Training|url=https://vaadin.com/learn/training/v14|access-date=2021-09-08|website=Vaadin|language=en}}</ref>


* Certified Vaadin 14 Developer
==== HTML templates ====
* Certified Vaadin 14 Professional
Vaadin Flow allows the definition of HTML templates with automated client-server communication and data binding (when using [[Polymer (library)|Polymer]]-based templates). The following is an example of a Polymer-based template:<syntaxhighlight lang="html">
<link rel="import" href="../bower_components/polymer/polymer-element.html">
<link rel="import" href="../bower_components/vaadin-text-field/vaadin-text-field.html">


To pass the certification, a developer should go through the documentation, follow the training videos, and take an online test.
<dom-module id="hello-world">
<template>
<vaadin-text-field label="Your name" value="{{name}}"></vaadin-text-field>
<button on-click="greet">Click me</button>
<div id="greeting">[[greeting]]</div>
</template>
<script>
class HelloWorld extends Polymer.Element {
static get is() {
return 'hello-world'
}
}
customElements.define(HelloWorld.is, HelloWorld);
</script>
</dom-module>
</syntaxhighlight>The following snippet of code shows how to connect the previous template to a server-side Java component:<syntaxhighlight lang="java">
@Tag("hello-world")
@HtmlImport("src/hello-world.html")
public class HelloWorld extends PolymerTemplate<HelloWorld.HelloWorldModel> {
public interface HelloWorldModel extends TemplateModel {
String getName();
void setGreeting(String greeting);
}


Previous (now unavailable) certifications included:
@EventHandler
private void greet() {
getModel().setGreeting("Hello, " + getModel().getName());
}
}
</syntaxhighlight>

==== Look and feel customization ====
Customization of the look and feel can be done with [[Cascading Style Sheets|CSS]], HTML custom styles, or by ready-made themes configuration.

==== Spring Integration ====
Vaadin Flow includes [[Spring Framework]] 5 and Spring Boot 2 integration.

<br />

== Certifications ==
Vaadin currently offers 2 paid [https://vaadin.com/training/certification certification tracks that are taken online]. This is to showcase the developer skills and knowledge about Vaadin Framework and related tools, for successful web application development.


* Vaadin Online Exam for Vaadin 7 Certified Developer
* Vaadin Online Exam for Vaadin 7 Certified Developer
* Vaadin Online Exam for Vaadin 8 Certified Developer
* Vaadin Online Exam for Vaadin 8 Certified Developer

To pass the certification you need to go though the whole documentation and have completed a couple of web application using the framework. The exams also tests you knowledge in certain areas of Java SE, Java EE, GWT (Google Web Toolkit) and HTML/JS/CSS.


== See also ==
== See also ==


* [[List of rich Internet application frameworks]]
* [[List of rich web application frameworks]]


==References==
==References==
Line 264: Line 360:


== Further reading ==
== Further reading ==
<ul><li>Duarte, A. (2018) ''[https://www.packtpub.com/application-development/data-centric-applications-vaadin-8 Data-Centric Applications with Vaadin 8]''. Packt Publishing.
<ul><li>Duarte, A. (2021) [https://www.apress.com/gp/book/9781484271780 ''Practical Vaadin: Developing Web Applications in Java'']. Apress.
</li><li>Duarte, A. (2018) ''[https://www.packtpub.com/application-development/data-centric-applications-vaadin-8 Data-Centric Applications with Vaadin 8]''. Packt Publishing.
</li><li>Frankel, N. (2013) ''[https://isbnsearch.org/isbn/9781782169772 Learning Vaadin 7, Second Edition]''. Packt Publishing.</li><li>Duarte, A. (2013) ''[https://isbnsearch.org/isbn/9781782162261 Vaadin 7 UI Design by Example: Beginner's Guide]''. Packt Publishing.</li><li>Holan, J., & Kvasnovsky, O. (2013) ''[https://isbnsearch.org/isbn/9781849518802 Vaadin 7 Cookbook]''. Packt Publishing.</li><li>Taylor C. (2012) ''[https://isbnsearch.org/isbn/9781478375104 Vaadin Recipes]''. Packt Publishing.</li><li>Frankel, N. (2011) ''[https://isbnsearch.org/isbn/9781849515221 Learning Vaadin]''. Packt Publishing.</li><li>Grönroos, M. (2010) ''[https://isbnsearch.org/isbn/9789529267538 Book of Vaadin]''. Vaadin Ltd.</li></ul>
</li><li>Frankel, N. (2013) ''[https://isbnsearch.org/isbn/9781782169772 Learning Vaadin 7, Second Edition]''. Packt Publishing.</li><li>Duarte, A. (2013) ''[https://isbnsearch.org/isbn/9781782162261 Vaadin 7 UI Design by Example: Beginner's Guide]''. Packt Publishing.</li><li>Holan, J., & Kvasnovsky, O. (2013) ''[https://isbnsearch.org/isbn/9781849518802 Vaadin 7 Cookbook]''. Packt Publishing.</li><li>Taylor C. (2012) ''[https://isbnsearch.org/isbn/9781478375104 Vaadin Recipes]''. Packt Publishing.</li><li>Frankel, N. (2011) ''[https://isbnsearch.org/isbn/9781849515221 Learning Vaadin]''. Packt Publishing.</li><li>Grönroos, M. (2010) ''[https://isbnsearch.org/isbn/9789529267538 Book of Vaadin]''. Vaadin Ltd.</li></ul>


==External links==
==External links==
*{{Official website}}
*{{Official website}}
*[https://github.com/vaadin Vaadin on GitHub]


{{Web frameworks}}
{{Web frameworks}}
Line 275: Line 373:
[[Category:Web frameworks]]
[[Category:Web frameworks]]
[[Category:Java enterprise platform]]
[[Category:Java enterprise platform]]
[[Category:Software developed in Finland]]

Latest revision as of 15:45, 17 September 2024

Vaadin
Developer(s)Vaadin Ltd.
Stable release24.5.3 (November 5, 2024; 4 days ago (2024-11-05)[1]) [±]

23.5.8 (evergreen, commercial support) (October 21, 2024; 19 days ago (2024-10-21)[2]) [±]

14.11.11 (LTS, no feature updates) (June 3, 2024; 5 months ago (2024-06-03)[3]) [±]
RepositoryVaadin Repository
Written inJava, JavaScript
PlatformCross platform
TypeWeb framework
LicenseApache License 2.0
Websitevaadin.com

Vaadin (Finnish pronunciation: [ˈʋɑːdin]) is an open-source web application development platform for Java. Vaadin includes a set of Web Components, a Java web framework, and a set of tools that enable developers to implement modern web graphical user interfaces (GUI) using the Java programming language only (instead of HTML and JavaScript), TypeScript only, or a combination of both.

History

[edit]

Development was first started as an adapter on top of the Millstone 3 open-source web framework released in the year 2002. It introduced an Ajax-based client communication and rendering engine. During 2006 this concept was then developed separately as a commercial product. As a consequence of this, a large part of Vaadin's server-side API is still compatible with Millstone's Swing-like APIs.

In early 2007 the product name was changed to IT Mill Toolkit and version 4 was released. It used a proprietary JavaScript Ajax-implementation for the client-side rendering, which made it rather complicated to implement new widgets. By the end of the year 2007 the proprietary client-side implementation was abandoned and GWT was integrated on top of the server-side components. At the same time, the product license was changed to the open source Apache License 2.0. The first production-ready release of IT Mill Toolkit 5 was made on March 4, 2009, after an over one year beta period.

On September 11, 2008, it was publicly announced[4][5] that Michael Widenius–the main author of the original version of MySQL–invested in IT Mill, the Finnish developer of Vaadin.[6] The size of the investment is undisclosed.

On May 20, 2009, IT Mill Toolkit changed its name to Vaadin Framework. The name originates from the Finnish word for doe, more precisely put, a female reindeer. It can also be translated from Finnish as "I insist". In addition to the name change, a pre-release of version 6 along with a community website was launched. Later, IT Mill Ltd, the company behind the open source Vaadin Framework, changed its name to Vaadin Ltd.

On March 30, 2010, Vaadin Directory was opened. It added a channel for distributing add-on components to the core Vaadin Framework, both for free or commercially. On launch date, there were 95 add-ons already available for download.[7]

Release history
LTS Version Release date Notes and new features since the previous LTS version launch
6 20 May 2009 Initial release
7 3 February 2013
8 21 February 2017 Improvements include a re-written data binding API that uses modern Java features such as type parameters and lambda expressions, and more efficient memory and CPU usage.[8]
10 25 June 2018 It's possible to use Vaadin's UI components from any technology compatible with Web Components. Vaadin Directory adds Web Components distribution. Vaadin Flow—the next generation of Vaadin Framework—was presented as a server-side Java web framework on top of Vaadin's UI components.[9]
14 14 August 2019 New UI components, CDI and OSGi support, Gradle integration, dynamic registration of routes, keyboard shortcuts API, support for npm and Bower.[10]
23 1 March 2022 New release model.[11] New UI components, reworked design system, feature flags, npm is now the default package manager.[12]

Vaadin Flow (Java API)

[edit]

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. Vaadin Flow features a server-side architecture which means that most of the UI logic runs securely on the server reducing the exposure to attackers. On the client-side, Vaadin Flow is built on top of Web Component standards. The client/server communication is automatically handled through WebSocket or HTTP with light JSON messages that update both, the UI in the browser and the UI state in the server.

Vaadin Flow's Java API includes classes such as TextField, Button, ComboBox, Grid, and many others that can be configured, styled, and added into layout objects instances of classes such as VerticalLayout, HorizontalLayout, SplitLayout, and others. Behaviour is implemented by adding listeners to events such as clicks, input value changes, and others. Views are created by custom Java classes that implement another UI component (custom or provided by the framework). This view classes are annotated with @Route to expose them to the browser with a specific URL. The following example illustrates these concepts:

@Route("hello-world") // exposes the view through http://localhost:8080/hello-world
public class MainView extends VerticalLayout { // extends an existing UI component

    public MainView() {
        // creates a text field
        TextField textField = new TextField("Enter your name");

        // creates a button
        Button button = new Button("Send");
        
        // adds behaviour to the button using the click event
        button.addClickListener(event ->
                add(new Paragraph("Hello, " + textField.getValue()))
        );

        // adds the UI components to the view (VerticalLayout)
        add(textField, button);
    }
}

The following is a screenshot of the previous example:

Hilla (TypeScript API)

[edit]

Hilla (formerly Vaadin Fusion) is a web framework that integrates Spring Boot Java backends with reactive front ends implemented in TypeScript. This combination offers a fully type-safe development platform by combining server-side business logic in Java and type-safety in the client side with the TypeScript programming language. Views are implemented using Lit—a lightweight library for creating Web Components. The following is an example of a basic view implemented with Hilla:

@customElement('hello-world-view')
export class HelloWorldView extends LitElement {
  render() {
    return html`
      <div>
        <vaadin-text-field label="Your name"></vaadin-text-field>
        <vaadin-button @click="${this.sayHello}">Say hello</vaadin-button>
      </div>
    `;
  }

  sayHello() {
    showNotification('Hello!');
  }
}

Vaadin's UI components

[edit]

Vaadin includes a set of User Interface (UI) components implemented as Web Components. These components include a server-side Java API (Vaadin Flow) but can also be used directly in HTML documents as well. Vaadin's UI components work with mouse and touch events, can be customized with CSS, are compatible with WAI-ARIA, include keyboard and screen readers support, and support right-to-left languages.

The following table shows a list of the UI components included in Vaadin:

Vaadin components
Java class HTML element name Description License
Accordion vaadin-accordion A vertically stacked set of expandable panels Apache 2.0
Anchor a Allows navigation to a given URL Apache 2.0
AppLayout vaadin-app-layout A common application layout structure Apache 2.0
Avatar vaadin-avatar A graphical representation of a person Apache 2.0
(not available) vaadin-badge A coloured text element for labelling content Apache 2.0
Board vaadin-board-row Layout component for building responsive views Commercial
Button vaadin-button Allows users to perform actions Apache 2.0
Crud vaadin-crud A component to manage Create, Read, Update, and Delete operations Commercial
Chart vaadin-chart Interactive charts with different types such as bar, pie, line, and others Commercial
Checkbox vaadin-checkbox An input field representing a binary choice Apache 2.0
Combo box vaadin-combo-box Shows a list of items that can be filtered Apache 2.0
ConfirmDialog vaadin-confirm-dialog A modal Dialog used to confirm user actions Apache 2.0
ContextMenu vaadin-context-menu A menu that appears on right-click or long touch press Apache 2.0
CookieConsent vaadin-cookie-consent A banner that to comply with privacy laws such as GDPR and CCPA Commercial
CustomField vaadin-custom-field A component for wrapping multiple components as a single field Apache 2.0
DatePicker vaadin-date-picker Allows to enter a date by typing or by selecting from a calendar overlay Apache 2.0
DateTimePicker vaadin-date-time-picker An input field for selecting both a date and a time Apache 2.0
Details vaadin-details An expandable panel for showing and hiding content Apache 2.0
Dialogvaadin-dialog A popup window to show other components in an overlay Apache 2.0
EmailField vaadin-email-field A text field that only accepts email addresses as input Apache 2.0
Form layout vaadin-form-layout A layout for building responsive forms with multiple columns Apache 2.0
Grid vaadin-grid Data grid or data table component for tabular data Apache 2.0
GridPro vaadin-grid-pro Provides inline editing with full keyboard navigation Commercial
HorizontalLayout vaadin-horizontal-layout Places components side-by-side in a row Apache 2.0
Icon iron-icon Shows a custom icon or from a collection of 600+ icons (VaadinIcons enum) Apache 2.0
Image img Shows an image from a resource file or from binary data generated at runtime Apache 2.0
ListBox vaadin-list-box Allows to select one or more values from a scrollable list of items Apache 2.0
LoginForm vaadin-login-form A component that contains a login form Apache 2.0
LoginOverlay vaadin-login-overlay A modal or full-screen login form Apache 2.0
MenuBar vaadin-menu-bar A horizontal button bar with hierarchical drop-down menus Apache 2.0
MessageList vaadin-message-list A component for displaying messages and building chats and comment sections Apache 2.0
Notificationvaadin-notificationOverlay component used to provide feedback to the userApache 2.0
NumberField vaadin-number-field A text field that only accepts numeric input (decimal, integral, or big decimal) Apache 2.0
PasswordField vaadin-password-field An input field for entering passwords masked by default Apache 2.0
ProgressBar vaadin-progress-bar Shows the completion status of a task or process Apache 2.0
Radio button vaadin-radio-button Allows to select exactly one value from a list of related but mutually exclusive options Apache 2.0
RichTextEditor vaadin-rich-text-editor An input field for entering rich text Commercial
Scroller vaadin-scroller A component container for creating scrollable areas in the UI Apache 2.0
Select vaadin-select An input field component for choosing a single value from a set of options Apache 2.0
SplitLayout vaadin-split-layout A component with two content areas and a draggable split handle between them Apache 2.0
Tabs vaadin-tabs Organize and group content into sections Apache 2.0
TextArea vaadin-text-area An input field component for multi-line text input Apache 2.0
TextField vaadin-text-field A component for introducing and editing text Apache 2.0
TimePicker vaadin-time-picker An input field for entering or selecting a specific time Apache 2.0
TreeGrid vaadin-grid A component for displaying hierarchical tabular data grouped into expandable and collapsible nodes Apache 2.0
Uploadvaadin-uploadA component for uploading one or more files with upload progress and statusApache 2.0
VerticalLayout vaadin-vertical-layout Places components top-to-bottom in a column Apache 2.0

Certifications

[edit]

Vaadin offers two certification tracks to prove that a developer is proficient with Vaadin Flow:[13]

  • Certified Vaadin 14 Developer
  • Certified Vaadin 14 Professional

To pass the certification, a developer should go through the documentation, follow the training videos, and take an online test.

Previous (now unavailable) certifications included:

  • Vaadin Online Exam for Vaadin 7 Certified Developer
  • Vaadin Online Exam for Vaadin 8 Certified Developer

See also

[edit]

References

[edit]
  1. ^ "Release Vaadin 24.5.3 · vaadin/platform · GitHub". GitHub. Retrieved 2024-11-05.
  2. ^ "Release Vaadin 23.5.8 · vaadin/platform · GitHub". GitHub. Retrieved 2024-10-21.
  3. ^ "Release Vaadin 14.11.11 · vaadin/platform · GitHub". GitHub. Retrieved 2024-06-03.
  4. ^ "Michael "Monty" Widenius investing in Finnish IT Mill". Invest in Finland. Archived from the original on 2011-07-20. Retrieved 2009-01-31.
  5. ^ Asay, Matt. "Monty Widenius invests in Act II: IT Mill". CNET News. Archived from the original on 2016-03-11. Retrieved 2009-01-31.
  6. ^ Sani, Ilari (10 March 2009). "IT Mill, avointa Ajaxia Suomesta". Tivi [fi] (in Finnish). Alma Media. Retrieved 11 July 2024.
  7. ^ "Vaadin Directory Opens its Doors". vaadin.com. Retrieved 2021-09-07.
  8. ^ Vaadin. "Vaadin releases Vaadin Framework 8". www.prnewswire.com (Press release).
  9. ^ Vaadin. "Vaadin modernizes Java development with its biggest release to date: Vaadin 10". www.businessinsider.com.
  10. ^ "Vaadin 14.0.0 release on GitHub". GitHub.
  11. ^ "A simpler release model | Vaadin". vaadin.com. Retrieved 2022-08-11.
  12. ^ "Vaadin 23 is finally here! | Vaadin". vaadin.com. Retrieved 2022-08-11.
  13. ^ "Training". Vaadin. Retrieved 2021-09-08.

Further reading

[edit]
[edit]