Blog

Scaladin 1.0 released

By  
Henri Kerola
·
On Feb 27, 2012 10:04:00 AM
·

Scala is a programming language with functional and object-oriented aspects. It runs on JVM and interoperates with Java, which means that you can use Scala to create applications with Vaadin.

In addition to the necessary Java, Scala and Vaadin libraries, you don't need anything extra to develop Vaadin applications with Scala. However, with the release of Scaladin 1.0 (formerly known as scala-wrappers), using Vaadin with Scala is even easier. For example, Scaladin extends Vaadin components to provide constructors with named parameters to easily initialize a component with a single line. It also facilitates using Vaadin listeners with Scala. A full list of features in Scaladin 1.0 is available.

Here is a short example of what Vaadin UI code created with Scaladin can look like:

val layout = new VerticalLayout(width = 100 pct, height = 100 pct) {
  add(new Label(content = "Persons", style = Reindeer.LABEL_H1))
  add(new Table(width = 100 pct, height = 100 pct), ratio = 1)
  add(new HorizontalLayout(spacing = true) {
    add(new Button("Edit selected", _ => editClicked()))
    add(new Button("Add new", _ => addNewClicked()))
  })
}
getMainWindow.setContent(layout)

 

For more information about Scaladin, take a look at the project's GitHub page. The JAR file and a Maven dependency can be found from the Vaadin Directory. Example applications created with Scaladin include the Address Book and Document Manager. For information on setting up a project with Vaadin and Scala, check out the instructions in the Vaadin wiki.

Henri Kerola
You haven't yet written a blog author profile for yourself. Go to My Account page to write a short description of yourself.
Other posts by Henri Kerola