Web Application Frameworks: C++ vs Python

后端 未结 7 2045
没有蜡笔的小新
没有蜡笔的小新 2021-02-14 14:54

I am familiar with both Python and C++ as a programmer. I was thinking of writing my own simple web application and I wanted to know which language would be more appropriate for

7条回答
  •  别那么骄傲
    2021-02-14 15:19

    I would go with Wt because:

    • You already know C++
    • It has a nice layout system, so you don't need to know lots of HTML
    • It is very well written and a pleasure to code in
    • Your deployed apps will handle 50 times the load of the python app on less hardware (from experience with pylons apps, 10,000 times the load of a plone app :P)
    • It has all the libraries that the guy in the first question says it doesn't and more
      • In built development webserver
      • Templating language
      • ORM
      • unit testing help
      • open-id and user+password authentication
      • A brilliant widget library
    • Web 2.0 isn't an after thought; it wasn't designed on a Request+Response model like all the python frameworks (as far as I know), but on an event driven interactive model.
      • It uses WebSockets if available
      • Falls back to normal ajax gracefully if not
      • Falls back to http for browsers like linx
    • It is more like coding a gui app than a web app, which is probably what you're used to
    • It is statically typed and therefore less error prone. Does def delete(id): take an int or a string ?
    • The unit tests (on my apps at least) take 10-100 times less time than my python app unit tests to run (including the compile time)
    • It has a strong and friendly community. All my email list posts are answered in 0-3 days.

提交回复
热议问题