I want to learn how to use Boost.Asio so I can then create an abstraction layer over it for HTTP and create a server and client. I need it for a web app I want to make. I know C++ isn’t a good choice for this sort of thing, but it’s still growing and getting better, so I wonder if there’s really no hope for it becoming a better choice for web development. Especially if someone were to propose a networking library for boost that also provides support for the HTTP protocol and maybe also RESTful services out of the box. Libraries in Boost have a high chance of making it into the standard, after all, so this could be a good idea. I’ve heard from many people that C++ is a waste of time, especially if one wants to get into web development and make a lot of money. Most people who want to web development are abandoning C++ in favor of languages Python that provide better support for web development. I don’t like this and I hope that C++ will also become better for the job soon so that it can pull back programmers that have left it for other languages. That’s also the reason why I want to use C++ here. I’m hoping that the Networking TS would be standardized and that the standardizing committee would also do something to make C++ overall better for the web, preferably as good as Python if possible. The difficulty of getting into and using C++ is also overly-exaggerated but it seems to be more because of C++ programmers not making their code simple and beautiful enough, so it’s also the language users’ fault. I want to try to change the negative views that people have of C++, as well. By the way, would it be a good idea to send an email asking about the future of C++, especially for web development, to Dr. Stroustrup if I can find a way to contact him? I know he’s a busy man and I’m also reluctant to this, but since he’s also on the standard-making committee, if he finds some free time to reply to my email, he should be able to tell me what to expect about C++ and its future. I’m sorry if this email got too long, though. Best regards. Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
Hi, By my opinion, developing HTTP server from scratch is not the best solution. There is number of open source libraries. I'm pretty happy with splunk pion (https://github.com/splunk/pion). It is built on top of boost asio, supports http and https, and by my opinion it is easy to use. Enjoy, S. 2017-10-24 10:04 GMT+02:00 Osman Zakir via Boost-users < boost-users@lists.boost.org>:
I want to learn how to use Boost.Asio so I can then create an abstraction layer over it for HTTP and create a server and client. I need it for a web app I want to make. I know C++ isn’t a good choice for this sort of thing, but it’s still growing and getting better, so I wonder if there’s really no hope for it becoming a better choice for web development. Especially if someone were to propose a networking library for boost that also provides support for the HTTP protocol and maybe also RESTful services out of the box. Libraries in Boost have a high chance of making it into the standard, after all, so this could be a good idea.
I’ve heard from many people that C++ is a waste of time, especially if one wants to get into web development and make a lot of money. Most people who want to web development are abandoning C++ in favor of languages Python that provide better support for web development. I don’t like this and I hope that C++ will also become better for the job soon so that it can pull back programmers that have left it for other languages.
That’s also the reason why I want to use C++ here. I’m hoping that the Networking TS would be standardized and that the standardizing committee would also do something to make C++ overall better for the web, preferably as good as Python if possible. The difficulty of getting into and using C++ is also overly-exaggerated but it seems to be more because of C++ programmers not making their code simple and beautiful enough, so it’s also the language users’ fault. I want to try to change the negative views that people have of C++, as well.
By the way, would it be a good idea to send an email asking about the future of C++, especially for web development, to Dr. Stroustrup if I can find a way to contact him? I know he’s a busy man and I’m also reluctant to this, but since he’s also on the standard-making committee, if he finds some free time to reply to my email, he should be able to tell me what to expect about C++ and its future.
I’m sorry if this email got too long, though. Best regards.
Sent from Mail https://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi. Thanks for the reply.
Does Splunk Pion have a good tutorial available on the official website to learn from? I wanted to use Wt, but sadly its official site doesn't have good-enough tutorials. I want to actually do stuff myself to learn, which I can't do with the tutorials on the Wt site.
Do you have any suggestions for a good and up-to-date web framework with a good support base? Does the POCO community have a good base where they can help people learn it easily? Or is Splunk Pion good as a web framework as well?
________________________________
From: Boost-users
On Tue, Oct 24, 2017 at 1:58 AM, Miloslav Marik via Boost-users
By my opinion, developing HTTP server from scratch is not the best solution.
Boost.Beast is a C++ header-only library serving as a foundation for writing interoperable networking libraries by providing low-level HTTP/1, WebSocket, and networking protocol vocabulary types and algorithms using the consistent asynchronous model of Boost.Asio. https://github.com/boostorg/beast Boost version 1.66.0 will include the first official release of Beast. Thanks
Boost.Beast is a library that only provides low-level support for HTTP? But what does that mean, exactly? What will users not be able to do with it, and is it good to be used for creating a HTTP server and client that can handle at "get" and "post" requests? I want to build a currency conversion app that takes rates from the web in real time, so I need a server and client that can handle at least that if nothing else. Though I may need a client for other, more advanced things later on as well.
It's an interesting name, though. Is there any special reason behind the name? Just wondering.
By the way, are there any plans on creating a good Networking library, one that doesn't provide just low-level HTTP support, for putting up for acceptance in the Boost libraries? It'd be good if something like that were to be included in Boost since there would then be a chance for it to be standardized. We also need a good library among the standard libraries that would help with web development in general, to make C++ a better choice for web development so that programmers wouldn't need to abandon it completely in favor of Python or other such higher-level. Keeping Python or other such languages (for the back-end, I mean - for the front-end, there's HTML, CSS and JavaScript) in the toolbox is of course still good, I think, but I want to have a good reason to not completely abandon C++, either.
What are everyone's thoughts on this?
________________________________
From: Boost-users
By my opinion, developing HTTP server from scratch is not the best solution.
Boost.Beast is a C++ header-only library serving as a foundation for writing interoperable networking libraries by providing low-level HTTP/1, WebSocket, and networking protocol vocabulary types and algorithms using the consistent asynchronous model of Boost.Asio. https://github.com/boostorg/beast Boost version 1.66.0 will include the first official release of Beast. Thanks _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
On Tue, Oct 24, 2017 at 6:04 AM, Osman Zakir via Boost-users
Boost.Beast is a library that only provides low-level support for HTTP? But what does that mean, exactly?
Beast provides: * A universal container for holding HTTP messages * Algorithms for sending and receiving messages on streams * A WebSocket stream implementation
What will users not be able to do with it,
Beast does not manage the socket for you. So you have to create the listening socket yourself, accept connections, make outgoing connections, shut down the connection. For SSL you have to use Asio to manage certificates and verification. But Beast will work with SSL streams once you have them set up. You need to take care of timeouts yourself.
and is it good to be used for creating a HTTP server and client that can handle at "get" and "post" requests?
I think so. Have a look at the example servers: http://www.boost.org/doc/libs/master/libs/beast/doc/html/beast/examples.html
I want to build a currency conversion app that takes rates from the web in real time, so I need a server and client that can handle at least that if nothing else. Though I may need a client for other, more advanced things later on as well.
I think this could be done in Beast, you can make a copy of the example client and servers and modify it from there. If you have questions or need help feel free to open an issue in the repository, I am very responsive.
It's an interesting name, though. Is there any special reason behind the name? Just wondering.
Check the 7th answer in the FAQ :) http://www.boost.org/doc/libs/master/libs/beast/doc/html/beast/design_choice...
By the way, are there any plans on creating a good Networking library, one that doesn't provide just low-level HTTP support, for putting up for acceptance in the Boost libraries?
Yes, but my approach is to start with the low level building blocks and use them to assemble higher and higher level libraries. Beast is the first step. Next we need a library to check SSL certificates against the operating system root certificate store. Then we need a library to calculate configured proxy settings using operating system calls. And a URI library. With that, you can start to put together a decent HTTP client that supports OAuth. On the server side you need some additional things like a streaming JSON parser, MIME/form decoder, compression codec, and a few other odds and ends. My plan is to develop these pieces as individual libraries and build everything up into the high level solution that you are looking for. I believe the reason that we have not seen these good high level solutions is because no one has taken the time to decompose the problem into standards-worthy solutions. Thanks
On 24 Oct 2017, at 10:04, Osman Zakir via Boost-users
wrote: conversion app that takes rates from the web in real time, so I need a server and client that can handle at least that if nothing else. Though I may need a client for other, more advanced things later on as well. … standardized. We also need a good library among the standard libraries that would help with web development in general, to make C++ a better choice for web development so that programmers wouldn't need to abandon it completely in favor of Python or other such higher-level. Keeping Python or other such languages (for the back-end, I mean - for the front-end, there's HTML, CSS and JavaScript) in the toolbox is of course still good, I think, but I want to have a good reason to not completely abandon C++, either.
have you taken a look at https://www.webtoolkit.eu/wt? https://www.webtoolkit.eu/wt? they produce a comprehensive open source c++ based web development solution. they use asio, amongst other libraries in boost. they deal with html, css, javascript appropriately. I am not affiliated with them, only a satisfied user. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
On Tue, Oct 24, 2017 at 4:02 PM, Raymond Burkholder via Boost-users < boost-users@lists.boost.org> wrote:
On 24 Oct 2017, at 10:04, Osman Zakir via Boost-users < boost-users@lists.boost.org> wrote: conversion app that takes rates from the web in real time, so I need a server and client that can handle at least that if nothing else. Though I may need a client for other, more advanced things later on as well. … standardized. We also need a good library among the standard libraries that would help with web development in general, to make C++ a better choice for web development so that programmers wouldn't need to abandon it completely in favor of Python or other such higher-level. Keeping Python or other such languages (for the back-end, I mean - for the front-end, there's HTML, CSS and JavaScript) in the toolbox is of course still good, I think, but I want to have a good reason to not completely abandon C++, either.
have you taken a look at https://www.webtoolkit.eu/wt?
You could also look at this CppCon2017 video comparing Boost.Beast with two other libraries. --DD https://youtu.be/l4ZZPrH95mM?t=9m10s
participants (5)
-
Dominique Devienne
-
Miloslav Marik
-
Osman Zakir
-
Raymond Burkholder
-
Vinnie Falco