News for hackers. Stuff that matters.
Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by ankurdhama on Tuesday March 07, 2017 @11:04PM (#13817798)
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 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++.

Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by aphextron on Friday March 10, 2017 @05:08AM (#13837542)
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#.

Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by blackflame7000 on Wednesday March 08, 2017 @08:51PM (#13826103)
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

Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by rafiki6 on Wednesday March 08, 2017 @04:52PM (#13824203)
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.
Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by thomastjeffery on Thursday March 09, 2017 @03:33PM (#13833267)
And that when it is taught in curriculum, it's C++ from the 90s, not C++/0x/11/14/etc.
Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by billconan on Wednesday March 08, 2017 @12:05AM (#13818048)
I made one as a hobby project. I'm using it for some lightweight projects.

https://github.com/shi-yan/Swiftly

I love c++ more than any other languages.

Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by EleventhSun on Thursday March 09, 2017 @12:55PM (#13831199)
People do, although I'm unsure how often.

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

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/nitroshare/qhttpengine

Re:Ask HN: Why aren't there many back-end frameworks in C++ ... by taway_1212 on Wednesday March 08, 2017 @10:37AM (#13820917)
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.