Wt Release notes

Wt Release notes

This file lists important notes on migrating existing applications to newer version of Wt. It lists changes in the library that may break the way you build Wt, the way you configure Wt or the Wt API and behaviour.

Release 2.99.0 (Mar 4, 2009)

This release is a preview for Wt 3.0.0. Many things have changed both in the internals and the API. This is the first release that provides several API changes which are not backward compatible (some of which were post-poned until now). Please read the following notes carefully, especially sections C) and D), to understand what changes to expect and how to adapt existing applications.

Support for the C++ boost library < 1.35 has been dropped: Wt now requires at least boost >= 1.35.0.

A) New classes:

WFlags
WFlags is a utility class that provides a type-safe ORing of enum flags. It is used everywhere in the Wt API where previously an int was used to allow enums to be ORed together.
WGoogleMap
This is a widget, contributed by Richard Ulrich, that displays a Google map.
Http::Request, Http::Response, Http::ResponseContinuation and Http::UploadedFile
These are utility classes which model an HTTP request and response and that are used in the new WResource API.

B) Main new features in existing classes:

WApplication::enableUpdates()
Server-initiated updates (aka "server push") has been reimplemented and now works reliably in all situations, including in the presence of intermediate proxies. The dependency on the 3rd party JS orbited library has been removed and replaced with a simple XHR-based solution.
WButtonGroup
Various methods were added: id's may be associated with a specific radio buttons, which may be used to identify a particular button.
WDatePicker
Is now easier to use because of a sensible default constructor that also creates the line edit using a WDateValidator, and creates the icon which is associated with the popup.
WFileResource
Uses the continuation support in the new WResource API to transmit the file in chunks.
WLength
WLength::Auto was added, is a synonym for WLength()
WSuggestionPopup
Is now also an MVC View widget, reading its data from a WAbstractItemModel
WTable
New method setHeaderCount() to specify the number of first rows or columns that should be rendered as an HTML table header (<th>).
WWidget

New virtual method rerender() which allows a widget to prepare itself before rendering (and defer internal changes until that time). A widget may ask to be rerendered using askRerender()

Widget no longer inherits from WResource, but instead inherits directly from WObject. It was simply a bad idea, and not useful for anything.

C) Changes that break existing applications:

1) Signals are no longer public members

Instead, they are now accessor member functions: e.g. WInteractWidget::clicked has been renamed to WInteractWidget::clicked(). This has as major benefit that signals can be created on-demand, which leads to drastically lower memory usage and signifcant speedups especially on embedded systems.

The change requires that everywhere in your code where you access a signal, you will need to change to add parentheses. For consistency, you may also want to use the same convention for your own widget classes that define signals.

2) WResource

The API has been redesigned and greatly simplified. If you are implementing your own resources, then you will need to redesign your implementation. The new API is simpler (requires only one virtual method to be implemented) and more powerful, providing support for continuations to serve large resources without blocking a thread or requiring large memory usage.

In addition, resources have better thread-safety: they are now by default reentrant (requests for a single resource may be handled concurrently) and they are protected from concurrently being destroyed by the main event loop.

3) WValidator

The signature for the virtual validate() method was changed: parameter pos which was ignored anyway has been removed.

4) WEnvironment

The methods getArgument() and arguments() were renamed to respectively getParameter() and getParameterMap(). The signature for getParameter() is also different as it returns a pointer to a string, which is 0 when the parameter is not defined, instead of the olde behaviour of throwing an exception. There is a new method that allows to read all values for a parameter, getParameterValues()

5) WModelIndex

The 20-byte SHA1 hash based internal pointer has been removed again as the object increase and overhead could not be justified.

D) Deprecated API that was removed:

These are API calls that were deprecated in earlier releases, and have now been completely removed from the library:
WApplication::applicationName()
Use WApplication::internalPath() instead.
WApplication::setState()
Use WApplication::setInternalPath() instead.
WApplication::state()
Use WApplication::internalPath() instead.
WApplication::stateChanged
Use WApplication::internalPathChanged() instead.
WRegExpValidator::WRegExpValidator(const boost::regex&)
Use the WRegExpValidator(const WString&) constructor instead.
WPainterPath::drawArc(..., width, height, ...)
An elliptical arc segment could not be support on all devices.
WTable::numRows()
Use WTable::rowCount().
WTable::numColumns()
Use WTable::columnCount() instead.
WText::setFormatting() and WText::formatting()
Use WText::setTextFormat() and WText::textFormat() instead.

Release 2.2.3 (Jan 26, 2009)

This release is a maintenance release, with mostly bug fixes and feature improvements.

A) Main new features in existing classes:

WAbstractItemModel:
const char * data in boost::any is now also supported.
WAbstractProxyModel:
Implemented toRawIndex() and fromRawIndex() so that indexes can be recovered when the model's layout is changed, if the underlying model provides implementations for toRawIndex() and fromRawIndex().
WComboBox:
Also supports StyleClassRole data role for items
WDialog:
New method setTitleBarEnabled() to disable the default title bar.
WMenu:
New method removeItem(), only works when rendered as a list.
WTabWidget:
New method removeTab().
WTreeView:
  • New method setColumn1Fixed() to fix the first column while scrolling horizontally through the other columns.
  • New method setColumnFormat() to control formatting of data.
  • New method setColumnBorder() to set the internal column border color.
  • New method setColumnResizeEnabled() to disable resize handles.
  • The view now also reacts correctly to insertion and removal of model columns.

B) New examples

gitmodel:
An example that demonstrates how to implement a custom abstract item model.
treeview-dragdrop:
An example that demonstrates drag and drop support in WTreeView.

C) Changes that break backward compatibility

WApplication:
useStyleSheet() only supports a subset of IE condition strings, since the string is now parsed by Wt rather than by IE (when dynamically loading stylesheets, the comment-syntax does not work reliably).

Release 2.2.2 (Dec 1, 2008)

As of now, we will also be listing noteworthy new API features, even if they are no concern for backwards compatibility.

A) New classes:

WPopupMenu, WPopupMenuItem:
A popup menu, which you would typically use to present a context menu.
WAbstractProxyModel, WSortFilterProxyModel:
Proxy models, which present data from a source model in a different way.
WLoadingIndicator, WDefaultLoadingIndicator, WOverlayLoadingIndicator:
Customizable loading indicators.

B) Main new features in existing classes:

WTreeView, WAbstractItemModel:
The WAbstractItemModel interface was extended to allow handling of drag & drop events, and WTreeView now is able to start dragging and handle dropping of item selections and other data.
JSignal:
You can now pass the original (keyboard/mouse) JavaScript event as a parameter to custom signals.
WTreeView:
access mouse event in itemClicked, doubleClicked and mouseWentDown signals.
WServer:
Support for widget-set mode, allowing a Wt application to be embedded in an existing web page/application.

C) Changes that break backward compatibility

This release does not contain changes that break existing applications.


Release 2.2.1 (Nov 3, 2008)

This release is as usually a mix of bug fixes, improvements and new features.

We have made a significant change to the MVC system, which will break existing program code in case you have implemented your own models (i.e. deriving from WAbstractItemModel) or views widgets (i.e. components that listen to model changes).

The WAbstractItemModel interface was changed to support hierarchical models. This means that most methods will now take an extra parameter that specifies the parent WModelIndex, and also all signals have now this extra parameter. Because the parameter has a default value of WModelIndex() which corresponds to the top level parent, the API is largely backwards compatible when merely using the model. It is only those classes that reimplement the interface, or listen to signal events, that are affected.

The immediate benefit of the new WAbstracItemModel interface is that it allows us to implement View widgets like the new WTreeView widget.


Release 2.2.0 (Sept 12, 2008)

This release has a rather substantial rewrite (and simplification) of Wt's bootstrapping process. In the past, Wt used a frameset trick to be able to load the AJAX-based skeleton when JavaScript was available. Isntead, now, the entire AJAX-based stuff is loaded directly into the bootstrap page. A benefit of the new approach is that we avoid iframe tricks, which have been deprecated from strict HTML and XHTML. But, it was in fact motivated in the first place to support all major browsers for a new internal path API. This new API allows to fully support URL changes and bookmarks in a unified way (i.e. it works equally when the browser supports AJAX, no JavaScript, or is a bot such as google bot).

As a consequence, this release contains the following changes that may break your application:

The following methods have been deprecated (but are still supported):


Release 2.1.5 (July 25, 2008)

Wt now installs its include files in a Wt/ subdirectory. You may want to change your build files to pick up this new include directory, or, change your code to scope the include files to look like #include<Wt/WLineEdit> instead of #include<WLineEdit>

This release contains the following changes that may break your application:

The following methods and enumerations have been deprecated (but are still supported):


Release 2.1.4 (July 4, 2008)

The following has changed for building Wt:

The following has changed in the wt_config.xml file:

This release should not contain changes that may break your application.


Release 2.1.3 (May 20, 2008)

This release should not contain changes that may break your application.


Release 2.1.2 (April 14, 2008)

The following changes may break your application build:


Release 2.1.1 (April 10, 2008)

This release should not break any of your applications, but we did deprecate some methods and enumeration types. You are advised to migrate to the replacements methods since we will discontinue support for the older ones in the future.

The following methods and enumerations have been deprecated:

The following changes affect run-time behaviour:


Release 2.1.0

The library dependencies have changed slightly.

To build Wt 2.1.0, you need:

Furthermore, the Wt::Ext library has been upgraded and now wraps around the extjs 2.x library, instead of extjs 1.x.

Some API changes may need a porting effort:


Release 2.0.5


Release 2.0.4

Important: 2.0.4a contains a fix for a bug introduced in 2.0.4 that reset the deploy-path in wthttpd.

This release adds a few new features:


Release 2.0.1

This release fixes some build-related problems, as well as smaller bugs. The main improvement in this release is related to use of Wt in resource-constrained embedded systems.

The most visible change is that the dependency on the Xerces C++ XML library was dropped in favour of the much smaller Mini-XML library. The draw-back is a reduction of supported character encodings to only UTF8 and UTF16, next to the default locale character encoding (which is typically an 8-bit flavour).

When using the built-in httpd, you can now disable support for SSL at compile time, freeing a number of SSL-related dependencies.

In the API, more comparison operators (== and !=) were added to WString, and a WViewWidget was added for simple MVC widgets (with the main purpose to reduce session-state at the server).


Release 2.0.0

This release contains numerous changes which are likely to cause some porting effort for Wt 1.1.x applications to work properly.

If you are upgrading from a 1.99.x release, you will notice that some of these notes have actually evolved, especially with respect to WString and unicode support.

Here is a list of changes with respect to Wt 1.1.x that are likely to require your attention, and some tips on how to do the porting.

1) Namespace Wt

All Wt classes are now inside the namespace Wt.

To handle this change, you will need to:

2) WString

Previously, most widgets offered double methods that either used a std::string for literal text, or a WMessage for localized text.

In the new release, widgets use Wt::WString for both literal and localized text. WString offers unicode support for both literal as well as localized text. To create a literal string, simply assign or construct a Wt::WString from that string. The strings supported or both narrow and wide C and C++ strings. UTF8 encoded narrow strings may also be converted. To create a localized string, use one of the static methods WString::tr(const std::string key) and WWidget::tr(const std::string key).

To help with legacy code, WMessage is now a typedef for WString, but is deprecated and should not be used in new code. Unfortunately, the constructors WMessage(const char *text) and WMessage(const std::string text), changed meaning! While previously they took a key to construct a localized message, they now take a literal text (the exact opposite!), since they are in fact plain WString() constructors. As a consequence your application will display key values instead of resolving those values (but will not break entirely).

The new approach offers the benefit of only requiring one method signature for both literal and localizable text. This not only simplifies our work, but more importantly by using WString for displayed text in the API of your own widgets, localization (including the automatic language switching) comes automatically and is decided on by the user of your widget.

Fortunately, there is a straightforward trick to handle most consequences of this change:

3) Wide string API

Since Wt 2.0.0, the API for Wt has been changed to use WString instead of C++ narrow strings. WString supports both narrow and wide strings, and provides conversion between both. It does not provide string operations, however, and instead acts as a string container. You should convert to a C++ string type to perform operations. You should also not use WString outside of the user interface part of your application.

4) No more wmain()

Previously, the Wt library implemented the main(int argc, char **argv) function, and called a wmain() function which created the WApplication instance.

Wt 2.0.0 allows multiple applications to run within a single process. Therefore, the WApplication::exec() approach was no longer feasible. The new approach requires that:

5) Configuration in /etc/wt/wt_config.xml

Wt 2.0.0 uses a configuration file for a number of settings that could previously be configured at build time of the library, or in the API. The latter functions are:

6) Removed obsolete classes

Wt 2.0.0 removed a number of classes that were still in the widget tree, but have been obsoleted by more flexible classes:

7) Deprecate boost::regex from WRegExpValidator API

The constructor and methods that takes a boost::regex object in the WRegExpValidator API have been deprecated, to remove the dependency on boost from the public API. You should consider the std::string based construtor and method instead.

8) WObject::emit() has been removed.

Since Wt 1.99.1, we have removed WObject::emit() function. Instead, you may simply call the signal with its arguments, or use the explicit emit method (recommended).

To adapt your code, you should:

9) WResource::streamResourceData() signature has changed.

Since Wt 2.0.0, WResource::streamResourceData() returns a boolean value which indicates if all data has been streamed. If you have reimplemented WResource for your applications, you must update the signature and return true.

The change is relevant only within the new server-push support that is now in Wt 2.0.0. This allows you to continuously append to the content of a resource.

10) Rename of WJavascriptSlot to JSlot.


Release 1.1.7

This release contains lots of additions and improvements, but should be completely backwards-compatible.

Release 1.1.6

There is one change which will impact the behaviour of current applications: Currently, on exit, by default the last widget updates are shown. So, no more good-bye message. This changes slightly when one needs to redirect() to a new location: not when WApplication::exec() returns, but during the same event handling as when calling WApplication::quit().

Release 1.1.5

Nothing special...

Release 1.1.4

Changes to impact everybody, since the previous release:

Other changes:


Generated on Mon Mar 9 08:27:50 2009 for Wt by doxygen 1.5.6