tags:

views:

1219

answers:

11

I've been looking around and came across the WT toolkit, Is it stable? Any good? I was stumped on how to go about this in C++, given the lack of libraries and resources concerning web developement. (CGI/Apache)

The purpose of my application is to populate some data from a Sybase ASE15 database running GNU/Linux & Apache Hence allow some user interactions.

I am going to use Sybase open client library (libct) to retrieve columns from the Server, feed this data back to wt model/view.

My requests:

Is there any more practical solution rather than using other scripting languages? I mean by practical, an interface with ODBC retrieving, and MVC mechanism?

If not available in C++, any alternative in Java?

+3  A: 
  1. http://www.webtoolkit.eu/wt#/
  2. http://cppcms.sourceforge.net/wikipp/en/page/main
  3. http://stackoverflow.com/questions/66166/c-web-service-framework

For starters. There are certainly more I'm sure - a healthy google search probably wouldn't hurt. Also, you could try the #C++ channel on freenode - they have an offtopic channel that you can ask about if you want to talk about non STL C++ and the people there would happily answer your questions I'm sure. Good Luck.

misterMatt
A: 

The best web toolkit for C/C++ would be Apache httpd. Just write a module and you can use libct to access your database.

There is MVC modules out there like mod_spin but I don't have any experience with it.

ZZ Coder
A: 

CGI programs are pretty damn easy to write in both C and C++ - you don't really need any special library, though having one will obviously make development a little faster. Do you really understand how CGI works? Basically, your program reads environment variables with getenv(), does some processing, and then writes some HTML out to the program's standard output.

anon
Absolutely Yes, actually the program already achieves what it was intended to do, but with some extra overheads. I'm not a JavaScript/AJAX guru, but seen some tools (WT ie) that do the whole stuff under the hood, hence keeping you unaware of the implementation.
ZeroCool
+3  A: 

You might want to check out klone:

http://koanlogic.com/klone/index.html

Basically, it's a framework AND server that makes writing C++ web backends easy...

dicroce
A: 

C++ isn't a very popular choice for web applications - probably because it's too easy to leave security holes, and development time tends to be a lot slower than for the scripting languages. I'd say 99% of web applications don't need the speed that C++ brings.

So this leads to a lack of good frameworks.

From my fairly light look at the area I'd say Wt is probably your best bet, although it's more of a library of useful things (like page templates) than a framework.

I'd seriously consider not doing this in C++ though. Even Java (I prefer C++ myself) has much stronger support for web development.

Colin Coghill
A: 

My personal choice for web development is Ruby on Rails, but if you have to chose between C, C++ or Java for web development, my suggestion is to use Java with JavaServer Faces

hiena
A: 

RoR seems to be an ultimate choice, but for this task I'm kinda forced to bear on with C++. Thanks all dudes ! you are great !

ZeroCool
+1  A: 

Give this one a look. I never much liked Wt's design. But then, I'm kind of an anti-framework guy.

http://cppcms.sourceforge.net/wikipp/en/page/main

Shaun
Yeah I knew about it misterMatt suggested this before, it's a good choise though, but now I'm writing a small framework to suit the needs.Concerning Wt's design I think it's kinda slow for a cgi oriented application.
ZeroCool
A: 

Maybe cgihtml ?

Tommy
+1  A: 

C++ isn't a very popular choice for web applications - probably because it's too easy to leave security holes, and development time tends to be a lot slower than for the scripting languages.

Dynamically typed scripting languages convert compile-time errors to runtime errors. Detecting those might not be as easy as reading through the compiler output. Scripting languages may be OK for quick-and-dirty simple projects. Beyond a certain level of complexity one needs strongly typed, well-structured languages. Such as C++, or Java.

Most scripting languages encourage sloppy programming.

As to the "security holes": if you refer to buffer overruns, allocation/deallocation errors, the answer is "STL". And proper training of course :-)