
Wt, C++ Web Toolkit - stesch
http://www.webtoolkit.eu/wt
======
bhauer
Bring it on! You C++ web developers are cut from raw brass, and you have more
guts than I. Nevertheless, I would love to see Wt added to our project [1].
Any follow-up on that?

[1] [http://www.marshut.com/kvuyp/is-someone-interested-in-
cppcms...](http://www.marshut.com/kvuyp/is-someone-interested-in-cppcms-
participating-on-this-web-framework-benchmark.html)

~~~
wdu
I started adding wt, but i'm not yet there

------
escaped_hn
Whats with the recent slew of c++ based web app libs? could it be that in
round 6 of the techempower benchmarks, cpp basically won every in category
raising interest in it for web stuff?

~~~
running_foo
I suspected the same thing. People found that their favorite popular language
was at the bottom of the list, and naturally they're curious about frameworks
for the faster languages. Exploration is healthy, but realize C/C++ does not
have the friendly, extensive and reliable web developer ecosystem that
Ruby/JavaScript/Python/PHP has. If you want an in-between, check out
Lua/OpenResty/Lapis.

~~~
bhauer
It looked as if a sort of a snowball effect occurred on the HN "new" page this
afternoon. I laughed when I saw the third show up (see comment below).

I personally could never stomach doing web development on C or C++. The C++
source code to the CPoll-cppsp test [1] makes me cringe in fear (no offense,
xaxaxa!) But if there are those willing to give it an honest go, I'm not going
to criticize them. Caution them, as you have, that it may be a frustrating
exercise? Sure.

That said, I think modern Java, Go, Scala, Erlang, Haskell, and Lua are all
worth considering.

[1]
[https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...](https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/cpoll_cppsp/www/db)

~~~
plorkyeran
Have you looked at the sample code for Wt? I wouldn't describe it as
beautiful, but it's closer to Java than that code.

~~~
bhauer
You're right, that looks quite clean!

Still, C++ is not my particular cup of tea. That doesn't diminish my desire to
see Wt and CppCMS added to our benchmark suite, though.

------
blinkingled
It is great as a hobby project to try and right a C++ web framework but the
reality is that in 2013 it would be laughable at best and outright fireable at
worst to write web apps in C++. You might have legacy reasons or have some
portions of the code that are very performance sensitive and you can augment
your non-C++ app with C++ code for those reasons - that would be
understandable. But a full fledged C++ web app - tsk tsk. Let's see -

1) Programmer availability and economics. Ton of RoR/PHP/Java and hopefully
soon Go programmers, but good C++ programmers - good luck finding and
retaining one.

2) Security - However competent YOU are - it just isn't possible to write a
complex web facing system that is also secure. I was part of a failed project
to write an IdM system in C++. It was a huge pain when we hired a external org
to do Penetration Testing. After they were done we were left with lot of
damage. Part of this is language, part is a lack of lot of great
framework/best practices/expertise.

3) You reinvent the wheel a lot. Want to talk to LDAP - write your own load
balancing and failover aware C++ classes or maintain somebody's unsupported
OSS one. Equally headachy. Or pay for RogueWave - a ton of money per platform
plus annual support contracts.

4) Cross Platform Pain - Enough said. Take the myriad of compilers, linkers,
versioned libraries and try to ship a product that supports plugin based
extendibility. Tough job convincing the customers to use the same
compiler/linker/libraries to build their plugins.

5) Performance monitoring, debugging and profiling tools. See how well those
compare against Java's JMX, HPROF, Heap dumps with OQL, MAT, YourKit etc. Just
no match unless you are extremely competent and can manage debugging complex
production systems without these tools.

6) Lack of something like a widely used Application Server ala Weblogic,
JBoss. The value these provide in terms of ready clustering, db access, thread
pooling - that's just not easily doable in C++. Add the lack of various 3rd
party frameworks (ORM, Rules engines etc.) and you are ready to give up on
C++.

Now I am sure somebody will go clever and come up with solutions for each of
the above but the point is when you pull all of them together - it's not hard
to realize it won't be worth it.

~~~
papaf
I am a C++ programmer that agrees with most of what you say except:

 _5) Performance monitoring, debugging and profiling tools. See how well those
compare against Java 's JMX, HPROF, Heap dumps with OQL, MAT, YourKit etc.
Just no match unless you are extremely competent and can manage debugging
complex production systems without these tools._

I find the C++ tools much better than the Java ones. I was recently tracking
down memory use with a C++ client and a Java server (with help from a Java
programmer).

I found VisualVM kind of pretty but mostly useless for finding the source of
memory use but with C++/valgrind/massif I got the guilty data structure and
the calling function on the client side in a few minutes.

~~~
blinkingled
I bet you can't use Valgrind on Production C++ Server though. You are also
limited to the platforms Valgrind runs on. There have been plenty of times I
used Xeprof (HPUX) on Java server to profile CPU usage, GC logging parsed by
JMeter, on demand heap dumps (MAT) - all in Production to successfully resolve
issues. (Browsing the heap dump will tell you exactly where your memory is -
duplicated String Buffers, leaked objects etc.)

The point is JVM tooling has matured enough that you have plenty of choices -
you'll find something that works well even for production uses.

------
joshuak
Looks pretty cool. Too bad about the licensing though:

[http://www.webtoolkit.eu/wt/download](http://www.webtoolkit.eu/wt/download)

~~~
idupree
That licensing (GPLv2 & commercial) is pretty permissive. It's open-source.
They didn't even pick the AGPL, so you probably don't even have to share your
source code if you're feeling selfish and running your / your business's own
web app. (But seriously, share. Being open source boosts your reputation even
if you don't actually care about paying it forward.)

(The commercial license doesn't allow private modifications, though it does
give a perpetual license. Perhaps it could use some improvement if they want
to make more sales.
[http://www.webtoolkit.eu/wt/license/Wt%20License%20Agreement...](http://www.webtoolkit.eu/wt/license/Wt%20License%20Agreement.pdf)
)

~~~
gonzo
If this were BSD licensed, I'd consider ripping PHP out of pfSense, and using
this.

