3 ms·
Ask HN: Web application in C++, where to start?
I am an idea for a CRUD application that I would like to develop in c++. The language choice is mostly driven by the fact that it's the language I am the most familiar with , and the deployment story is usually easier . Looking around , I can't really see any web framework with battery included a la django/flask/rails/laravel etc...
Anybody using C++ for the web ? What's the typical C++ web app structure like ?
Right now i am thinking of using an async http library on the backend (proxygen or boost.asio) + postgres and manual ORM; And on the client side i am leaning toward using a pure client side solution (like react) and limiting the server to a pure API server with no html/view and mostly json data.
Any comment is appreciated
- glaand 9y agoIt's a nice a idea though. I mean, every programmer wishes to have his application written in the best, fastest programming language that exists in the universe. But look, HTTP with C++ will just give you the double of the work. The most similiar language you could use, i would say C#. Take a look at ASP.NET, it's a great framework too :) !
- soulbadguy 9y agoActually speed is not the main concern for me. I don't plan to the request volume where that would matter. I just want to use the language i know the best and not have to learn something new just to whip out a new prototype. C# and .Net core is actually my second choice is the C++ Web app ecosystem turns out to be to not mature enough
- iamvnraju 9y agoHave a look at Beast library. It is a part of the latest Boost libraries (1.66). http://www.boost.org/users/history/version_1_66_0.html http://www.boost.org/users/history/version_1_66_0.html
- elchief 9y agoNot C++, but there's BCHS: OpenBSD + C + httpd + SqLite https://learnbchs.org https://learnbchs.org It's good because OpenBSD has https://man.openbsd.org/pledge https://man.openbsd.org/pledge, which makes web programming in C safer