4 ms·
it turns out that there are some perfectly reasonable use cases for a c++ web framework. The fact you didn't take the time to find out what they might be, befor
by bandushrew 13y ago
it turns out that there are some perfectly reasonable use cases for a c++ web framework.
The fact you didn't take the time to find out what they might be, before expressing an opinion about the framework, is unfortunate.
- blinkingled 13y agoCome on, if we are having this conversation and you've already taken the pains to add a contrary comment - I was fully expecting you will elaborate on those use cases :) Are you thinking embedded web servers may be? What else?
- bandushrew 13y agoI was hoping to leave discovery as an exercise for the reader :) but yup, low memory/cpu/ram situations are one clear place where a c++ web app makes a heap of sense. Also things like routers, where there is an environment that doesn't change frequently (..or often at all for years..). There is also a bunch of use cases where the fact that installing/replacing/updating the web app is as simple as replacing a single binary is a real win. There just are a bunch of places where it makes perfect sense to use a c++ web app, and none at all to use frameworks like RoR. Its not a big deal, there are entire worlds of requirements and use cases that look and sound nothing like 'public facing web application', where the ability to provide an HTML interface is a win, and the ability to lower resource requirements from something like RoR is a win. The only reason I posted is that it just makes me sad when people are so utterly oblivious to the worlds that they dont know, and - because of that - are tracked into making definitive statements about things, when they should probably preface their comments with "to my knowledge..." or "Im not aware of" or even preface it with a genuine question "why is something like this useful?, I dont understand.." There is nothing wrong with admitting you do not understand something and asking for clarification :)
- blinkingled 13y ago>There is nothing wrong with admitting you do not understand something and asking for clarification To be frank, that's not something I don't understand. It's just a resource constrained environment use case that anyone can understand. What I don't understand is how common those use cases are today given my home router runs with 32Mb RAM and can use PHP instead of C++, never mind the fact that it doesn't need a full fledged C++ Web Framework to begin with!
- bandushrew 13y agoits not just resource constrained environments, but use cases where the advantages of a c++ web app outweigh the disadvantages. C++ web apps are fast. They are low memory usage (especially compared to solutions like java/RoR or PHP). They tend to use little cpu. Ultimately, once a little ground work is done, you are still designing the interface in html, javascript and css, and have all the advantages and speed of development of that delivery method. For some definition of the word, I believe that Facebook is effectively deploying a c++ web app as part of its solution at this point. There are many use cases for which RoR or PHP is the better solution, but it turns out it is imply true that there are others for which a c++ web app is the better solution. Go figure :)
- Skinney 13y agoSince any web-framework should be mostly IO-driven, the actual speed of the code matters very little as it will in most cases always be nothing compared to the actual IO-operation itself :/ In case you need certain code to run very fast, most people will write that in C/C++ and patch it into their solution, that's what we did in the Django-workshop I used to work in. I thought Facebook mostly used C++ for their PHP VM? Facebook itself is alot of PHP, they also use Cassandra (Java DB) for inbox messages I believe.
- pork 13y agoNo -- Facebook's PHP code is translated to C++ by HipHop and compiled into a monolithic binary, and Cassandra has largely been deprecated in favor of HBase.