Web框架,Vaadin Framework 7.3.0 发布

jopen 10年前

Vaadin 是一个RIA的基于浏览器的富客户端的Web框架。与 JavaScript 库或者是基于浏览器插件的解决方案不同,Vaadin 包含一个服务器端的结构,主要的应用逻辑都在服务器端运行,浏览器通过 Ajax 技术跟服务器端进行交互。Vaadin 提供多种各样的UI组建,例如按钮、表格、树形列表等等,每个组件都具有事件、侦听器、数据绑定和业务逻辑等功能。
Vaadin是一个基于Ajax技术的网页应用程序开发框架。它可以帮助不懂美工的网站开发者创建高质量的用户界面和由浏览器负责解释的类桌面应用程序。它向开发者提供了一整套的即需即用的精美的Web用户界面组件,用户也可以使用这个框架建立专属于自己的个性化用户界面组件,从而为web端用户提供具有良好交互性的应用程序。 
vaadin-logo.png

Overview of Vaadin 7.3.0 Release

Vaadin 7.3.0 is a minor release that includes a number of new features and bug fixes, as listed in the list of enhancements and change log below.

Change log for Vaadin 7.3.0

This release includes the following closed issues:


#2874 Add support for changing theme on the fly without reloading

#9303 Implement VOverlay shadow with CSS box-shadow when possible

#9532 On the fly Scss compiler could cache result
Priority #13432 Polling disturbs user interaction on table column resize
Priority #13444 ComboBox computed width breaks on stylename change

#13546 Provide methods for setting only width or height undefined.

#13563 Debug window styles should not be included in the base theme
Priority #13565 client.isActive() does not work consistently with Table when testing with QFTest/Testbench

#13616 Use GWT as a dependency in the project

#13618 Import theme Valo to Vaadin

#13634 Theme JAR has extra test folders

#13643 setChildrenAllowed false has no effect in Valo theme

#13660 Implement Notification animations using CSS instead of JavaScript

#13661 Deprecate VOverlay shadow API

#13668 Review current Sass API for Valo

#13670 Rename v-app-background-color to v-background-color in Valo

#13671 Vertical alignment in auto height HorizonlLayout is broken in Valo

#13672 Notification styles should be parametrized in the Valo build

#13674 Implement DragAndDropWrapper styles for Valo

#13677 Panel does not calculate size correctly in Valo theme

#13680 Add default styles for anchor elements in Valo

#13686 Remove 'v-' prefix from all Valo mixins and functions

#13722 VCalendarPanel throws NPE when DateField's time format is changed from 24h to 12h and popup calendar is opened

#13746 (Valo) DragAndDropWrapper styles should not hide the drag target element

#13806 Add a helper for retrieving the current PortletRequest
Priority #13812 OSGi manifest for vaadin-shared is wrong

#13836 DragAndDropWrapper does not support choosing a custom component as the drag image
Priority #13885 Subwindow title area calculations get messed up after maximize/restore

#13944 Change back to org.json

#13990 Notification position should be controllable with CSS

#14009 OSGi - Vaadin server requires wrong theme compiler bundle

#14030 Add Java constants for all additional Valo theme style names

#14031 Create automated TB tests for all views in ValoThemeTest app

#14051 Super Dev Mode generates incorrect source maps when using

#14055 Remove VWindowOverlay

#14058 Valo causes Table headers to be overly long
Priority #14059 @DelegateToWidget does not work for widget descendants with overridden getState

#14072 Browser details are re-sent in the first UIDL request

#14081 Confusing error in logs when server sends a critical notification

#14082 Remove unused VaadinServlet.handleServiceSecurityException method

#14084 Allow ignoring the sync id functionality

#14093 Add -webkit prefix for box-shadows in Valo

#14105 Update release notes

#14106 Update licenses file

#14107 Document remaining additional style names for Valo

#14112 Empty rows in Table are badly styles

#14120 Compile valo with Vaadin Sass compiler

#14124 Embedded applications get no theme class name (regression by #2874)

#14139 Problem with setTheme method for Overlay components.

#14142 Vaadin 7.3 : Optimize AbstractClientConnector.getAllComponentsIterable()

#14145 Fix background color for chameleon theme

#14152 VerticalSplitPanel inside a HorizontalSplitPanel doesn't display its second component (Valo theme)

#14162 There is unnecessary shadow in menu in runo theme.

#14167 Update release notes

#14172 Fix regression caused by #13885 for notification in chameleon.

#14173 Fix box shadow bug with resizing elements in IE9 and IE10.

#14195 Combobox popup has extra shadow when resized.

#14200 Error i Valo-demo; Combo Box

#14219 Rich text area has broken icons in Valo theme

#14225 TexArea 'white-space: normal' breaks multiline texts in Valo

#14232 Add assertions for container size not being negative

#14238 Immediate upload with Valo is broken

#14246 Fix background color of Notification in chameleon theme in IE8

#14284 Add a constant for vaadinBootstrap.js similar to vaadinPush.js

#14303 Merge fixes from master
Priority #14304 TabSheet focus events don't work as intended on different browsers.

#14330 Ensure there are no empty @since tags

#14331 Base theme sets system notifications to 70% opacity

#14334 Valo Tree selection indicator broken in Blink (Chrome 36 and Opera 23, OS X)

#14336 Inconsistent font rendering for Open Sans on Windows

#14338 Valo reports theme version wrong in debug window

#14343 Drag and drop wrapper does not properly work with Valo

#14351 valo theme with drag and drop upload

#14352 Increase TB3 socket timeout

#14354 ResponsiveConnector should request layout update when breakpoints change

#14360 Valo Tree Drag & Drop styles broken

#14361 GridLayout.space() not working

#14364 Ensure license checker works for different license types

#14368 Notification delay is not set to 0 when the notification is clicked

#14374 Split common-stylenames to individual component files

#14376 On Windows Phone 8.1 Update, IE11 is identified as Safari

#14379 Opening a combobox with keyboard input and pressing enter to select an item does not close the popup.

#14392 GridLayout does not position items in columns correctly

#14396 Update Font Awesome to latest version

#14401 Table column resize does not work in Valo (Firefox)

#14408 Allow specifying license for multiple major versions

#14412 Slider broken on initial render in IE8 (Valo)

#14413 Window close and maximize/restore buttons not visible on initial render in IE8 (Valo)

#14446 Testbench loses screenshots

#14447 Error notification closes without user input on touch devices
Priority #14475 Vaadin Table Scroll To Row Issue
 
Vote Enhancements Vaadin support users have voted for
Priority Defects Vaadin support users have prioritized

You can also view the list of the closed issues at the Vaadin developer's site.

Enhancements in Vaadin 7.3

The 7.3 includes many major and minor enhancements. Below is a list of the most notable changes:

  • Valo is a brand new built-in theme for Vaadin. It leverages the Sass CSS preprocessor heavily, providing a variety of ways to customize the look and feel of your theme. See the Valo theme tutorial or the Valo theme section in Book of Vaadin for information on how to get started.
  • Support for changing theme on the fly

Incompatible or behavior-altering changes in 7.3

  • The shadow of all overlays (VOverlay) are now implemented with CSS box-shadow in all browsers except Internet Explorer 8 (#9303). In IE8 the old image-based implementation is still used.

    The image-based shadow implementation is also deprecated, so if you have any custom shadow implementations in your themes or add-ons, please update them accordingly to use CSS box-shadow instead.

    Note that the CSS-based implementation is visually not 100% identical to the old implementation. This should not cause issues except if you are using screenshot-based TestBench tests or similar visual regression tests.

  • The theme for the debug window is now implemented using a GWT client bundle and is no longer included in the standard theme.
  • Reverted to use JSON.org implementation of the JSON library instead of the Android implementation that was used in Vaadin 7.2. See the-json-license.txt for information about its license.

Known issues

  • Drag'n'drop in a Table doesn't work on touch devices running Internet Explorer (Windows Phone, Surface) (#13737)

Limitations

  • It is currently not possible to specify font-size as em or %, or layout component sizes with em (#10634).

    This does not apply to Valo, but using em sizes to size layouts is discouraged, because it results in fractional component sizes in many cases, which might cause unwanted 1px gaps between components.

  • Push is currently not supported in portals (See #11493)
  • HTTP session can not be invalidated while using push over websockets on Tomcat 7 (#11721)
  • Cookies are not available while using websockets (#11808)
  • Not all proxies are compatible with websockets or streaming. Use long polling to avoid these problems.

Vaadin Installation

Vaadin is a Java framework for building modern web applications that look great, perform well and make you and your users happy. Vaadin is available under the Apache License, Version 2.0 (see the license.html in the Vaadin ZIP or JAR package).

The easiest ways to install Vaadin are:

  • If using Maven, define it as a dependency or use any of the available archetypes (only vaadin-application is available for Vaadin 7 at the time of this release) to create a new project
  • If using Eclipse, use the Vaadin Plugin for Eclipse, which automatically downloads the Vaadin libraries.

It is also available as a ZIP package downloadable from Vaadin Download page.

Package Contents

Inside the ZIP installation package you will find:

  • Separate server-side (vaadin-server) and client-side (vaadin-client, vaadin-client-compiler) development libraries
  • Precompiled widget set (vaadin-client-compiled) for server-side development
  • Shared library (vaadin-shared) for both server- and client-side libraries
  • Built-in themes (vaadin-themes)
  • Dependency libraries provided under the lib/ folder

See the README.TXT in the installation package for detailed information about the package contents. Book of Vaadin (for Vaadin 7) gives more detailed instructions.

For server-side development, copy the vaadin-server , vaadin-client-compiled , vaadin-shared , and vaadin-themes from the main folder and the dependencies from the lib folder to the WEB-INF/lib folder of your Vaadin project. (The vaadin-client-compiled is necessary if you do not wish to compile the widget set by your own, which you need to do if you use almost any add-on components.)

Updates to the Packaging

Since Vaadin 7.2.0, the old vaadin-theme-compiler has been moved into a separate project and renamed to vaadin-sass-compiler. It is now included along with the other 3rd party dependencies in the ZIP package.

For pure client-side development, you only need the vaadin-client and vaadin-client-compiler JARs, which should be put to a non-deployed project library folder, such as lib . You also need them if you compile the widget set for any reason, such as using Vaadin add-ons, or create new server-side components integrated with client-side widgets.

Migrating from Vaadin 6

All Vaadin 6 applications need some changes when migrating to Vaadin 7. The most obvious changes are in the application/window API and require extending either UI or UI.LegacyApplication instead of Application. A detailed list of migration changes are given in the Vaadin 7 Migration Guide.

Any custom client-side widgets need to be ported to use the new client-server communication API, or the Vaadin 6 compatibility API.

Vaadin 6 add-ons (ones that contain widgets) do not work in Vaadin 7 - please check the add-ons in Vaadin Directory for Vaadin 7 support.

Vaadin 7.3.0 Dependencies

When using Maven, Ivy, Gradle, or other dependency management system, all Vaadin dependencies are downloaded automatically. This is also the case when using the Vaadin Plugin for Eclipse.

The Vaadin ZIP installation package includes the dependencies in the lib subfolder. These need to be copied to the WEB-INF/lib folder of the web application that uses Vaadin.

The dependencies are listed in the Licensing description. Some are explicit dependencies packaged and distributed as separate JARs, while some are included inside other libraries.

Bean Validation

If you use the bean validation feature in Vaadin 7, you need a Bean Validation API implementation. You need to install the implementation JAR in the WEB-INF/lib directory of the web application that uses validation.

Upgrading to Vaadin 7.3

When upgrading from an earlier Vaadin version, you must:

  • Recompile your classes using the new Vaadin version. Binary compatibility is only guaranteed for maintenance releases of Vaadin.
  • Unless using the precompiled widget set, recompile your widget set using the new Vaadin version.

Remember also to refresh the project in your IDE to ensure that the new version of everything is in use.

By using the " ?debug " URL parameter, you can verify that the version of the servlet, the theme, and the widget set all match.

Eclipse users should always check if there is a new version of the Eclipse Plug-in available. The Eclipse Plug-in can be used to update the Vaadin version in the project (Project properties » Vaadin).

Maven users should update the Vaadin dependency version in the pom.xml unless it is defined as LATEST . You must also ensure that the GWT dependency uses the correct version and recompile your project and your widget set.

Liferay and other portal users must install the Vaadin libraries in ROOT/WEB-INF/lib/ in the portal (and remove a possibly obsolete older vaadin.jar). Additionally, the contents of the vaadin-client-compiled and vaadin-themes must be extracted to the ROOT/html/VAADIN directory in the Liferay installation. If your portal uses custom widgets, you can use Liferay Control Panel for Vaadin for easy widget set compilation.

Notes and Limitations for Google App Engine

The following instructions and limitations apply when you run a Vaadin application under the Google App Engine.

  • Applications must use GAEVaadinServlet instead of VaadinServlet in web.xml .

  • Session support must be enabled in appengine-web.xml :

        <sessions-enabled>true</sessions-enabled>
  • Avoid using the session for storage, usual App Engine limitations apply (no synchronization, that is, unreliable).

  • Vaadin uses memcache for mutex, the key is of the form _vmutex<sessionid> .

  • The Vaadin VaadinSession class is serialized separately into memcache and datastore; the memcache key is _vac<sessionid> and the datastore entity kind is _vac with identifiers of the type _vac<sessionid> .

  • DO NOT update application state when serving an ConnectorResource (such as ClassResource.getStream()).

  • The application remains locked during uploads - a progress bar is not possible

For other known problems, see open tickets at developer site dev.vaadin.com.

Supported Technologies

Vaadin 7 is compatible with Java 6 and newer. Vaadin 7 is especially supported on the following operating systems:

  • Windows
  • Linux
  • Mac OS X

Vaadin 7 requires Java Servlet API 2.4 but also supports later versions and should work with any Java application server that conforms to the standard. The following application servers are supported:

  • Apache Tomcat 5-8
  • Apache TomEE 1
  • Oracle WebLogic Server 10.3-12
  • IBM WebSphere Application Server 7-8
  • JBoss Application Server 4-7
  • Wildfly 8
  • Jetty 5-9
  • Glassfish 2-4

Vaadin 7 supports the JSR-286 Portlet specification and all portals that implement the specification should work. The following portals are supported:

  • Liferay Portal 5.2-6
  • GateIn Portal 3
  • eXo Platform 3
  • IBM WebSphere Portal 8

Vaadin also supports Google App Engine.

Vaadin 7.3.0 supports the following desktop browsers:

  • Mozilla Firefox 18-31
  • Mozilla Firefox ESR 17,24,31
  • Internet Explorer 8-11
  • Safari 6-7
  • Opera 12, 16-23
  • Google Chrome 23-36

Additionally, Vaadin supports the built-in browsers in the following mobile operating systems:

  • iOS 5-7
  • Android 2.3-4
  • Windows Phone 8

Vaadin SQL Container supports the following databases:

  • HSQLDB
  • MySQL
  • MSSQL
  • Oracle
  • PostgreSQL