Experiences using Wt C++ framework?

22,206

Solution 1

I have not personally used the framework, but have discussed it with a few people that have. They didn't really have any limitations, but I found it hard to believe they were compiling every time. Their main comment was that it was quite a light load on the server in terms of memory usage. Personally, I think the interpreted languages of php, python, ruby, etc work well with the nature of web development - but that's not the question you asked. Probably the biggest advantage is being able to use your existing skill set to work in a new medium.

There are also a few good comments online discussing pros and cons. Here is one I found http://discuss.joelonsoftware.com/default.asp?biz.5.599655.33

However, I think the main answer here is that without a specific project requirement in mind, it is going to be difficult to evaluate any framework for suitability. If you think it will be fun to try coding a few things with it, then give it a go. That is going to be the best (if not only) way to determine if it suits your needs.

Solution 2

I've been using Wt to build apps that directly link to C++ libraries but don't particularly make a lot of effort to exercise the layout features such as CSS. So far, it works great as a replacement for GTK when building these kind of applications. I'm a Linux user exclusively and I'm also one of the unwashed heathen who actually enjoys programming in C++, and this framework is a perfect way for me to build an application that can actually be used across many platforms.

Solution 3

I have tried several C++ embedded web servers. They tend to be a challenge to use, and not Windows friendly.

( You do not mention your platform. If you are on Unix, then I suspect you will find the available servers easier to use, and can probably ignore this answer. If you are on Windows, read on ... )

I have tried Wt, but was defeated by the massive installation, which takes hours to compile and generates page after page of warnings, and the extensive learning curve. Wt is modeled on Qt, so if you are familiar with Qt, the learning curve will be much less of a challenge.

I have tried Webio by John Bartas I liked the concept and it worked well. However, I found it overly complicated to use and the server code hard to understand. A lot of the complexity of Webio is caused by using an “HTML compiler” to hide the HTML pages that control the appearance of the GUI inside a file system embedded inside the application code. I prefer to have the HTML pages outside in plain view where I can adjust the GUI without recompiling the application.

I have also looked at TWS This is by Richard Hipp who is responsible for SQLITE and FOSSIL and of whom I am a great fan. However, TWS has not been maintained since 2001 and is not really WINDOWS, so I reluctantly decided not to pursue it.

In the end I rolled my own, called WEBEM based on a minimally modified version of the boost::asio web server. In concept similar to, but simpler than TWS, it permits html code to execute C++ methods.

Solution 4

To be honest, I had looked on it but I see one significant Wt design flaw -- it modeled after Qt. Trying to make web applications to look and behave like GUI.

I think, this approach is wrong. There should be clear separation between client side and server side.

If you are interested in C++ web programming take a look on CppCMS which has more traditional MVC model.

Note, I have biased opinion, because I'm developer of CppCMS.

Solution 5

Made a todo list app using it. works great, no problems.

Share:
22,206
StackedCrooked
Author by

StackedCrooked

Software developer specializing in C++ cross-platform development. Hobby projects: Coliru: online C++ compiler Anime Ratings: Google Chrome extension for finding good anime tetris-challenge: experimentation with Tetris AI algorithms Clojure notes: just my notes :)

Updated on July 05, 2022

Comments

  • StackedCrooked
    StackedCrooked almost 2 years
    • Has anyone seriously used Wt?
    • Did it work well?
    • Did you experience certain limitations? Or advantages?

    Wt is a C++ library for developing web applications.

    Please avoid the discussion of whether C++ is a good language for web development. I just want to give Wt a try because it seems like it could be a fun thing to do.

  • Christian Rau
    Christian Rau almost 13 years
    How can modeling after Qt ever be a design flaw ;) But I get your point.
  • Artyom
    Artyom almost 13 years
    @Cristian Because designing GUI and designing for a Web are two very different things
  • Offirmo
    Offirmo over 12 years
    For people coming here via google : at the time of 2011, I have tried Wt very easily without "massive installation". I found it very good for my needs.
  • Offirmo
    Offirmo over 12 years
    Artyom is lacking perspective. For GUI-like web apps, the shortcut that Wt provide is very good. @Artyom You design for your customers, not for web gurus.
  • MrFox
    MrFox almost 12 years
    The way many websites are headed is that they look less like static documents and more like full-featured dynamic desktop applications. I know of many instances where websites were built as front-ends to replace client-server architecture. In those situations it makes a lot of sense to develop the website as if it was a desktop app, and IMHO it makes a lot of sense to abstract some ajaxy stuff if it makes people's lives easier.
  • MrFox
    MrFox almost 12 years
    I have not found compiling to be a big deal. g++ does incremental builds and you can run it on multiple cores. Usually you want to compile after a certain amount of edits to make sure your stuff isn't broken anyway, and unless you've been changing things that are included everywhere it doesn't take long at all (seconds on most of my projects with make -j8).
  • András Aszódi
    András Aszódi about 11 years
    I second MrFox's opinion. Compilation is not a big deal. And it helps you catch silly mistakes. Compile-time errors are better than runtime errors -- and interpreted languages give you runtime errors only, which is a much bigger hassle IMHO than issuing make -j8 and then waiting for a few seconds...
  • quixver
    quixver over 10 years
    +1 for CppCMS. Just been playing around with it and it has been phenomenal. Also learning CppCMS has been much easier for me than Scala + Lift. p.s. I'm an old time c++ programmer, little to no experience with interpreted languages.
  • Animesh
    Animesh over 10 years
    If you are using Java or C#, for web development (Struts/ASP.NET MVC etc) you would have recompile every time something non static is modified. So, I guess it wouldn't be that big of a deal.
  • swdev
    swdev over 9 years
    I can imagine it being embedded and displayed in a thin web browser control (.net, qtwebview, etc). Seems like this is going to be fun.
  • Vector
    Vector over 9 years
    Trying to make web applications to look and behave like GUI : A GUI is a GUI: As the web becomes more sophisticated, browser based apps are looking more and more like desktop apps... clear separation between client side - do you really enjoy having to deal with dumb browsers that much? Qt is arguably the best OOP framework ever implemented - how can modelling after Qt possibly be a drawback?
  • Vector
    Vector over 9 years
    I installed it on Ubuntu 14.04 with Aptitude - took about 15 seconds, and it worked right away. Just link in the libs and you're off.
  • ravenspoint
    ravenspoint over 9 years
    @Vector As I mentioned, my answer applies only to Windows. It is, of course, extremely fast if you install pre-built binaries, but then you have lost most of the benefits of using open source.
  • Vector
    Vector over 9 years
    @ravenspoint - OK, I didn't catch that. But nothing that isn't windows specific is "windows friendly"... I have been using open source for several years - I never modify the source code of the tools I use, but I save a lot of money, contribute to projects I use and have access to a great money good tools.
  • User007
    User007 over 9 years
    @Artyom, I gone through CppCMS its amazing. I have developed a small test web app. I would like to know, Can I use modern framework for front end like twitter Bootstrap, various in javascript as angular.js, node.js with CppCMS with no performance issue?
  • Alice
    Alice over 9 years
    2014, it compiled in less than a half an hour on windows, no warnings. Boost can take a while to compile, but there's no need to compile it yourself.
  • Alice
    Alice over 9 years
    WT uses a QT like system because it's a great way to do UI, both on the web and off; the days of the web being only about displaying information are over. As much as I love your name, I have to disagree; WT's style is much better for high performance web apps (which is the market they are targetting).
  • vikingben
    vikingben over 9 years
    I'm surprised this was up voted and marked as the answer.