Any good C/C++ web toolkit? [closed]

2019-03-26 05:34发布

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?

标签: c++ apache cgi
13条回答
ら.Afraid
2楼-- · 2019-03-26 05:54
  1. http://www.webtoolkit.eu/wt#/
  2. http://cppcms.sourceforge.net/wikipp/en/page/main
  3. 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.

查看更多
甜甜的少女心
3楼-- · 2019-03-26 05:56

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.

查看更多
Ridiculous、
4楼-- · 2019-03-26 05:57

Apache Celix looks like a promising active project that meets the requirements of this (albeit old) question. See: http://celix.apache.org/

From the Apache Project description page:

Celix is an implementation of the OSGi specification adapted to C. It will follow the API as close as possible, but since the OSGi specification is written primarily for Java, there will be differences (Java is OO, C is procedural). An important aspect of the implementation is interoperability between Java and C. This interoperability is achieved by porting and implementing the Remote Services specification in Celix.

查看更多
男人必须洒脱
5楼-- · 2019-03-26 05:59

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

查看更多
三岁会撩人
6楼-- · 2019-03-26 05:59

Another alternative may be the "FastCGI / CGI C++ Library" that is aimed for Boost integration at someday: http://cgi.sourceforge.net/

查看更多
对你真心纯属浪费
7楼-- · 2019-03-26 06:00

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 :-)

查看更多
登录 后发表回答