Wt 4.0.0 is here!

  • Posted by Roel
  • Tuesday, September 19, 2017 @ 12:18

The long wait is over: Wt 4 has been released!

Download the source (wt-4.0.0.tar.gz) here and read its release notes for more information about what Wt 4 brings.

Wt 4 is Wt’s big update to C++11 and a more modern C++ style along with it.

You may have also noticed that the website is looking a bit different. It was about time that the website got a refresh, so we made a new one to coincide with the Wt 4 launch. We hope you like it!

Notable changes in Wt 4 are:

  1. Owning raw pointers have been replaced by smart pointers. Notably, WWidget(WContainerWidget*) and WContainerWidget::addWidget(WWidget*) have been replaced by WContainerWidget::addWidget(std::unique_ptr<WWidget>). Also, some objects that had a single owner before, like WAbstractItemModel and WValidator, are now shared.

  2. Enums were replaced by enum classes

  3. Wt 4 relies less on Boost, preferring the standard library where possible. If you build Wt with standalone Asio, then the header files don’t include any Boost headers anymore. This has significantly reduced the size of our Windows installers, and should considerably speed up compilation times.

  4. Boost.Signals2 has been replaced by a new implementation that should offer better performance and easier debugging due to shorter, more understandable stack traces. Also, you don’t need to std::bind away extra arguments when using lambda functions now.

  5. Boost.Date_Time has been replaced by Howard Hinnant’s std::chrono-based date implementation.

  6. Boost.Any has been replaced by Wt::cpp17::any. The implementation can be switched at compile time between std::any, std::experimental::any, or (by default) an included implementation that implements the small object optimization.

  7. The use of Wt header files without .h has been deprecated, because this often confused IDEs and yielded no real benefit.

  8. There’s a new default implementation for WBoxLayout that leverages flexbox instead of relying on JavaScript code to detect resizes.

  9. Everything that was marked as deprecated in Wt 3 has been removed.

We’ve also added some more features since the release of Wt 3.3.8:

  1. A Microsoft SQL Server backend for Wt::Dbo

  2. Support for listening on multiple interfaces using --http-listen and --https-listen for wthttp.

Windows builds for Visual Studio 2015 and 2017 can be downloaded from the releases page on GitHub.

Tags:
33 comments
  • Posted by anonymous
  • 6 years ago
Thank you, it's a great work !
Q: Is WtDesigner compatible with Wt 4 ?
  • Posted by anonymous
  • 6 years ago
how can I set value at scrollbar vertical in the WContainerWidget autoflow?
  • Posted by anonymous
  • 6 years ago
javascript function(id,value){
$("id").scrolltop(value);
}
  • Posted by anonymous
  • 6 years ago
how can i know if client or session was disconnected of the server else when close tab or browser closed?
  • Posted by anonymous
  • 6 years ago
how can i know if client or session was disconnected of the server?
  • Posted by anonymous
  • 6 years ago
morning = D
how can I send wserver.post with param?
  • Posted by Roel
  • 6 years ago
WServer::post() takes a function, so you can add parameters with std::bind or using a lambda function.
  • Posted by anonymous
  • 6 years ago
do u have any example for me? C++
  • Posted by Roel
  • 6 years ago
For example, if you want to call a function foo, which takes an int argument, you can do it with bind:
int i = 42;
server->post(sessionId, std::bind(foo, i));

Or with a lambda function:
int i = 42;
server->post(sessionId, [i]{
foo(i);
});

See http://en.cppreference.com/w/cpp/utility/functional/bind and http://en.cppreference.com/w/cpp/language/lambda
  • Posted by anonymous
  • 6 years ago
thanks = D
  • Posted by anonymous
  • 6 years ago
Last week I formally asked a question about Webtoolkit's interoperability with Rust and/or Nim since these new langs are C/C++-library-friendly. Did someone have an experience on this? or provide an example project?
  • Posted by Roel
  • 6 years ago
I know of Rust and Nim and have played around with them a little bit, but I don't know that much about them. As far as I know, Rust and Nim, like many other native programming languages, both have good support for C interop, but not C++. Wt only provides a C++ interface, without a C compatibility layer, so while I think that using Wt from Rust and Nim should be possible, interoperability may involve a bit of work.
  • Posted by anonymous
  • 6 years ago
is it possible to integrate whatsapp with Wt?
  • Posted by Roel
  • 6 years ago
You can normally integrate any JavaScript library into Wt, but I personally have no experience with whatsapp, so I don't know if they provide a way to integrate it.
  • Posted by Everton
  • 6 years ago
I am Qt and QML framework developer, I am thinking of developing a Wt link with QML for web development. What do you think of this?
  • Posted by Roel
  • 6 years ago
I think that would be interesting. Currently, the main way to design a Wt application is using WTemplates. This is not an entirely declarative approach, since we still need to instantiate widgets and bind them with bindWidget. It would be interesting to see your QML-based approach.
  • Posted by anonymous
  • 6 years ago
this's good ideia thanks ^^
  • Posted by anonymous
  • 6 years ago
I recently found Wt and the possibilities for integrating C++ with the web are really mind blowing. Wt is like magic. The move to smart pointers is also very much appreciated, along with the general modernization effort. Thanks for all your hard work!
  • Posted by Everton
  • 6 years ago
is there any software for wt design?
  • Posted by Roel
  • 6 years ago
There's nothing that we've made ourselves. I know of two independent projects:
WtDesigner: https://github.com/juangburgos/WtDesigner
and DesignerWt: http://www.designerwt.net/
I can't comment on their suitability. We personally don't use either.
General software for HTML and CSS design would also work, if you put the resulting HTML into a WTemplate.
  • Posted by anonymous
  • 6 years ago
ok thanks
  • Posted by anonymous
  • 6 years ago
it's great
= D
  • Posted by anonymous
  • 6 years ago
there's a little title overload -- with favicon and text carrying the same information. ;)
  • Posted by anonymous
  • 6 years ago
Excellent news!! Great work guys, thanks very much for all your efforts!
Are you going to update the website in examples to the new Wt website? It would make a great template :-) Cheers
Marco
  • Posted by Roel
  • 6 years ago
Yeah, it's probably best that we indeed put up the source code of the new sites. I don't have a timeframe for that, though, and we'll have to remove some of the dependencies. The design was done by another firm, who used some proprietary JavaScript libraries for some things. This JavaScript is not essential, though, so we can leave it out. Maybe we'll even get rid of it, because it actually increases loading time a lot.
  • Posted by anonymous
  • 6 years ago
Excellent, that is great news! I think even a partially functioning site would be a great example as a template (e.g. just rip-out all of the JS), either on a git repo for the purpose or with a suitable disclaimer...
The other thing I forgot to mention: are you planning to do any work to enable using coroutines with Wt? Or do they work already.
thanks!
Marco
  • Posted by anonymous
  • 6 years ago
anywhere has tutorial for intall wt 4?
  • Posted by Roel
  • 6 years ago
You can find documentation on installing Wt 4 on Unix-like platforms here: https://www.webtoolkit.eu/wt/doc/reference/html/InstallationUnix.html
For Windows, the easiest way is to use our binary release: https://github.com/emweb/wt/releases
  • Posted by anonymous
  • 6 years ago
I think you'd make some documentation for transitions from wt3 to wt4.
  • Posted by anonymous
  • 6 years ago
This should be here, there, and everywhere!
  • Posted by anonymous
  • 6 years ago
Wt4 is a huge step forward and the new website looks great! Thanks and congratulations!
  • Posted by anonymous
  • 6 years ago
Congratulations! Love the new design... I hope Wt will some day implement Python scripting too, which would make development much faster!
  • Posted by anonymous
  • 6 years ago
Wahouuu ! Great release and great revamping of the website ! Congratulations !

Contact us for more information
or a personalised quotation