aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/introduction/intro-background.asciidoc
blob: 5a359b05b76f0e75bac33484b88ac198cf286555 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
title: Background
order: 5
layout: page
---

[[intro.background]]
= Background

The Vaadin Framework was not written overnight. After working with web user
interfaces since the beginning of the Web, a group of developers got together in
2000 to form IT Mill. The team had a desire to develop a new programming
paradigm that would support the creation of real user interfaces for real
applications using a real programming language.

The library was originally called Millstone Library. The first version was used
in a large production application that IT Mill designed and implemented for an
international pharmaceutical company. IT Mill made the application already in
the year 2001 and it is still in use. Since then, the company has produced
dozens of large business applications with the library and it has proven its
ability to solve hard problems easily.
Millstone 3 was released as open source in 2002.

Progress has often required hard decisions to avoid carrying unnecessary legacy burden far into the future.
Nevertheless, our aim has always been to keep migrations easy.

[[intro.background.toolkit-5]]
== Release 4 with Single-Page Rendering

The next generation of the library, IT Mill Toolkit 4, was released in 2006.
It introduced an entirely new AJAX-based presentation engine.
This allowed the development of AJAX applications without the need to worry about communications between the client and the server.

[[intro.background.toolkit-5]]
== Release 5 Powered by GWT

((("IT Mill Toolkit")))
((("AJAX")))
IT Mill Toolkit 5, released initially at the end of 2007, took a significant
step further into AJAX. The client-side rendering of the user interface was
completely rewritten using GWT, the Google Web Toolkit.
((("Google Web Toolkit")))

IT Mill Toolkit 5 introduced many significant improvements both in the
server-side API and in the functionality. Rewriting the Client-Side Engine with
GWT allowed the use of Java both on the client and the server-side. The
transition from JavaScript to GWT made the development and integration of custom
components and customization of existing components much easier than before, and
it also allows easy integration of existing GWT components. The adoption of GWT
on the client-side did not, by itself, cause any changes in the server-side API,
because GWT is a browser technology that is hidden well behind the API. Also
theming was completely revised in IT Mill Toolkit 5.

The Release 5 was published under the Apache License 2, an unrestrictive open
source license, to create faster expansion of the user base and to make the
formation of a developer community possible.

[[intro.background.vaadin6]]
== Birth of Vaadin Release 6

IT Mill Toolkit was renamed as _Vaadin Framework_, or Vaadin in short, in
spring 2009. Later IT Mill, the company, was also renamed as Vaadin Ltd.
Vaadin means an adult female semi-domesticated mountain reindeer in Finnish.

With Vaadin 6, the number of developers using the framework exploded. Together
with the release, the Vaadin Plugin for Eclipse was released, helping the
creation of Vaadin projects. The introduction of Vaadin Directory in early 2010
gave it a further boost, as the number of available components multiplied almost
overnight. Many of the originally experimental components have since then
matured and are now used by thousands of developers. In 2013, we are seeing
tremendous growth in the ecosystem around Vaadin. The size of the user
community, at least if measured by forum activity, has already gone past the
competing server-side frameworks and even GWT.

[[intro.background.vaadin7]]
== The Major Revision with Vaadin 7

Vaadin 7 was a major revision that changed the Vaadin API much more than Vaadin
6 did.
It became more web-oriented than Vaadin 6 was.
We are doing everything we can to help Vaadin rise high in the web universe.
Some of this work is easy and almost routine - fixing bugs and implementing features.
But going higher also requires standing firmer.
That was one of the aims of Vaadin 7 - redesigning the product so that the new architecture enables Vaadin to reach over many long-standing challenges.

Inclusion of the Google Web Toolkit in Vaadin 7 was a significant development,
as it meant that Vaadin now provides support for GWT as well. When Google opened
the GWT development in summer 2012, Vaadin (the company) joined the new GWT
steering committee. As a member of the committee, Vaadin can work towards the
success of GWT as a foundation of the Java web development community.

[[intro.background.vaadin8]]
== Vaadin Framework 8 with New Data Binding API

The biggest change in Vaadin Framework 8 is the complete modernization of the data binding API.
Binding components to data sources is one of the core features of the Vaadin Framework, as it eliminates the need to explicitly shuffle data between components and data objects, typically beans.
The old data model was designed in time before Java features such as generics.
While the data model was improved over the years, it was fundamentally outdated and complex to use.
The new data binding API works much more fluently in Java 8, especially with Java 8 features such as lambda expressions and streams.
Consequently, to be able to fully use the new features of Java 8, we have raised the requirements from Java 6 to 8.
The change should make Vaadin Framework up to date with the most current Java technologies used by developers.
depends on the browser. After printing, we automatically close the window with JavaScript [methodname]#close()# call. (((range="endofrange", startref="term.advanced.printing.print"))) (((range="endofrange", startref="term.advanced.printing.JavaScript.print"))) [[advanced.printing.pdf]] == Printing PDF ((("PDF"))) To print content as PDF, you need to provide the downloadable content as a static or a dynamic resource, such as a [classname]#StreamResource#. You can let the user open the resource using a [classname]#Link# component, or some other component with a [classname]#PopupWindowOpener# extension. When such a link or opener is clicked, the browser opens the PDF in the browser, in an external viewer (such as Adobe Reader), or lets the user save the document. It is crucial to notice that clicking a [classname]#Link# or a [classname]#PopupWindowOpener# is a client-side operation. If you get the content of the dynamic PDF from the same UI state, you can not have the link or opener enabled, as then clicking it would not get the current UI content. Instead, you have to create the resource object before the link or opener are clicked. This usually requires a two-step operation, or having the print operation available in another view. [source, java] ---- // A user interface for a (trivial) data model from which // the PDF is generated. final TextField name = new TextField("Name"); name.setValue("Slartibartfast"); // This has to be clicked first to create the stream resource final Button ok = new Button("OK"); // This actually opens the stream resource final Button print = new Button("Open PDF"); print.setEnabled(false); ok.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { // Create the PDF source and pass the data model to it StreamSource source = new MyPdfSource((String) name.getValue()); // Create the stream resource and give it a file name String filename = "pdf_printing_example.pdf"; StreamResource resource = new StreamResource(source, filename); // These settings are not usually necessary. MIME type // is detected automatically from the file name, but // setting it explicitly may be necessary if the file // suffix is not ".pdf". resource.setMIMEType("application/pdf"); resource.getStream().setParameter( "Content-Disposition", "attachment; filename="+filename); // Extend the print button with an opener // for the PDF resource BrowserWindowOpener opener = new BrowserWindowOpener(resource); opener.extend(print); name.setEnabled(false); ok.setEnabled(false); print.setEnabled(true); } }); layout.addComponent(name); layout.addComponent(ok); layout.addComponent(print); ---- (((range="endofrange", startref="term.advanced.printing")))