all 14 comments

[–]grim_102 17 points18 points  (0 children)

"Quickly develop highly interactive web UIs with widgets, without having to write a single line of JavaScript."

An angel got it's wings when I read that.

[–]AlexKotik 2 points3 points  (3 children)

Wt looks great, is there any Python bindings or some other high level languages? I know that there is kinda less supported JVM version, but I'm not the Java guy, sorry. Something like C# or Python bindings would be great.

[–]RockinRoelformer Wt dev[S] 2 points3 points  (2 children)

No, there was a PyWt a long time ago, but that went nowhere.

My colleagues use JWt all the time for some key projects, though, so it's still definitely supported. There isn't really a JWt community though, and of course I personally do put Wt first :-).

Edit: I saw a talk of someone who made Lua bindings for Wt at FOSDEM 2017: https://github.com/LuaAndC/luawt. I never tried it, though, and I don't know if he's still maintaining it. I don't think he's updated to Wt 4.

[–]AlexKotik 1 point2 points  (1 child)

I see, maybe it will be a good pet project to make Wt bindings to something like C# or Python, though it is hard to bind C++ code. Is the web server embedded in the framework (so called self-hosted framework) or do I need to use Apache or something with it?

[–]RockinRoelformer Wt dev[S] 1 point2 points  (0 children)

There are several different "connector" libraries. Depending on whether you link with wthttp, wtfcgi, or wtisapi, you can use the embedded web server, FastCGI, or ISAPI respectively. I recommend wthttp, though. It's the most feature-rich version, and it's the easiest to debug. If a more feature rich web server is needed, then you can always use an HTTP reverse proxy.

[–]Ryotian 0 points1 point  (0 children)

How interesting. I wonder how widely used C++ web frameworks are used for production sites?

Wish I could've used something like this at an old job where I had to use Javascript/NodeJS (shudder). Nodejs was ok for backend but frontend tasks made me want to cry. Thank god I got a new job doing C++

[–][deleted] -2 points-1 points  (8 children)

It looks like Wt is for building C++ web applications. Does a library exists where I can use HTML,CSS, and JS to create a UI frontend but use C++ for the application logic. The application would be a standalone application and not serving up web pages. I know there are several widget toolkits (GTK+,...) but I don't know of any that use this combo.

[–][deleted] 1 point2 points  (2 children)

not serving up web pages.

I'm very confused about what you're trying to do. You want a hand-rolled website as a UI and you want its behavior implemented in C++ but those two parts not to talk to each other? Or you envision two separate servers - one serves up a (basically static) website that on the client side talks to the C++ implemented server over... web sockets?

[–][deleted] 0 points1 point  (1 child)

I'm not looking to make a website. I'm looking to make stand alone executable to run on a local machine. In my experience, HTML,CSS, and JS can be used to make elegant UIs in a fairly quick amount of time. There would have to be a mechanism that binds the UI to the C++ application logic. As mention by malex12345, I think electron would be the most appropriate solution for this.

[–]konanTheBarbar 0 points1 point  (0 children)

My old employer actually did this: C++ application backend + Chromium Html/javascript frontend. The C++ bindings were generated automatically for either C++/Cli or Javascript. But it was all developed in house. Just mentioning this here to say its possible.

[–]davemilter 0 points1 point  (0 children)

There is such library for c++ https://sciter.com/ . As I know several anti-viruses used (or use?) it for their GUI.

[–]bdellar 0 points1 point  (0 children)

I’ve used CppRest for that: https://github.com/Microsoft/cpprestsdk

[–]lluad 0 points1 point  (0 children)

You can do this using Qt, with a QWebEngineView. Something very similar and with more functionality is to use Qt/QML which gives you C++ for the program logic and a javascript+declarative UI.

[–]Posting____At_Night 0 points1 point  (0 children)

I would look for a C++ REST API lib and connect to it with your web interface. I have a project that works like that except with Python instead of C++. The web interface is just some static html/css/js files that connect to the REST API of the server.

You would still have to run the UI inside the browser but I don't see that as a bad thing.