Experiences using Wt C++ framework? [closed]

2020-05-12 12:56发布

  • 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.

标签: c++ wt
6条回答
2楼-- · 2020-05-12 13:40

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.

查看更多
聊天终结者
3楼-- · 2020-05-12 13:44

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

查看更多
劳资没心,怎么记你
4楼-- · 2020-05-12 13:46

I currently use it to develop a GPS measurements processing web application, based on processing algorithms implemented in C. It works well and has a good synergy with legacy C/C++ code.

It's documentation its not so extensive and the lack of learning tutorials and related books makes it somehow hard to learn.

查看更多
我想做一个坏孩纸
5楼-- · 2020-05-12 13:53

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.

查看更多
时光不老,我们不散
6楼-- · 2020-05-12 13:58

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.

查看更多
萌系小妹纸
7楼-- · 2020-05-12 13:59

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.

查看更多
登录 后发表回答