
Ask HN: Why aren't there many back-end frameworks in C++ for web development? - 2c94w8rdikj4
C++ is fast, and with modern(C++14&#x2F;17) features highly productive. I would have thought this would be one of the first choice to design web development frameworks, but that’s not the case. What am I missing?
======
ankurdhama
The choice to design a web development framework depends on the interest and
skills of the people who wants to build frameworks. For the most history of
web application development people have used "scripting languages" and thats
why most of the frameworks are based on those languages, also these languages
are "productive" and good enough for implementing the typical CRUD layer over
a database which is what most web apps are about. Check out
[https://github.com/ipkn/crow](https://github.com/ipkn/crow) for a Modern C++
web framework.

NOTE: I used to do C++ 5-6 years ago and now getting back to it by going
through modern C++ and also the idea that learning C++ as a layer on top of C
is a bad bad idea to learn C++.

------
blackflame7000
Here is the source code for a lightweight Webserver in Qt C++. It works very
similarly to J2EE and Java Servlets. I've personally used this starting block
for building my own web services since I am most familiar with C++.

[http://stefanfrings.de/qtwebapp/index-
en.html](http://stefanfrings.de/qtwebapp/index-en.html)

------
rafiki6
You've listed a lot of great qualities of C++ as a language. But you've also
failed to mention that C++ is rarely taught in CS curriculum, most people
don't know it, it's got a steep learning curve, and those great features
aren't what's necessary to make a web framework to support close to 90% of
what web frameworks need to do which is basically serve as 1) a Crud Layer on
a database 2) maybe do server side rendering if you decide to go that route.
On the other hand, LAMP and MEAN stacks are popular and low barrier to entry
and most CS curriculums seem to include either Java, Python or some other
scripting language.

~~~
thomastjeffery
And that when it is taught in curriculum, it's C++ from the 90s, not
C++/0x/11/14/etc.

------
EleventhSun
People do, although I'm unsure how often.

Here's 3 Qt (cross-platform) frameworks:

[http://stefanfrings.de/qtwebapp/index-
en.html](http://stefanfrings.de/qtwebapp/index-en.html) (I've personally used
this, it's a good one!)

[https://github.com/vinipsmaker/tufao](https://github.com/vinipsmaker/tufao)

[https://github.com/nitroshare/qhttpengine](https://github.com/nitroshare/qhttpengine)

------
aphextron
C++ is used heavily in backend web development. NodeJS uses all kinds of
native modules written in C++. Also, many people write micro services that
require high-performance intensive CPU usage in C++, then interface with them
over something like Kafka.

Writing your basic request handling middleware app code is rather pointless in
C++ though. You don't really gain anything over a scripting language like C#.

------
taway_1212
Lack of (easy) cross-platform compatibility? With languages running on top of
VM, your production OS can differ from what developers are using on their
machines. With bare metal languages, it is of course also possible, but
requires extra effort.

------
billconan
I made one as a hobby project. I'm using it for some lightweight projects.

[https://github.com/shi-yan/Swiftly](https://github.com/shi-yan/Swiftly)

I love c++ more than any other languages.

