简体   繁体   中英

Sending data from C++ to Website

I'm recently working on a project where I have classes written in C++ and a website which is written with HTML5 and JavaScript. Now I want to have data from the C++ program sent to the website. Which way is the best to solve that?

I was looking around for AMQP, WebSockets and JSON. But I didn't get how I can use them and what is the best for this problem and how I can use these technologies.

I recommend to use the C++ webtoolkit Wt (pronounced Witty), at http://www.webtoolkit.eu/ .

This framework (with integrated application server) lets you design web applications in terms of widgets and signal/slot connections, and leaves much of the web cruft in the hands of the library. The resulting applications are object-oriented, strictly typed, and perfectly maintainable. The library autodetects the browser's capabilities and uses the proper way to render the site, avoiding browser bugs.

Wt is written in a modern C++ style, which doesn't need to lead to memory leaks and other mishaps that have always been associated with C++ applications. C++ is as good as any other language around. It is not a matter of performance, it is a matter of style.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM