Take the 2-minute tour ×

Can C/C++ be choice of keeping all your logic (business/domain) for web application?


I've two resources (cousins) having knowledge on C/C++ and me also good in C/C++, Python, HTML, CSS and JavaScript.

We like to utilize our free time to work on our some good ideas we developed together. The ideas require knowledge of web application development. And I'm the only one who has it.

Is there a way they developed the core in C/C++ and I do the rest of scripting for front-end development?


share|improve this question
What are you trying to do? Video rendering? Audio? Do you have a special task that really needs that raw processing power? If not, there is absolutely no reason to use C/C++. If you just put out Websites the performance Bottleneck isn't the Server, it's the network and the users Browser. The minimal amount of the time a request takes is spent in the Backend(like 10%). You should check out this talk from Steve Stouders for more information: youtube.com/watch?v=s1hrZ1wGoHQ&feature=channel –  Ivo Wetzel Mar 19 '10 at 10:43
add comment

3 Answers

up vote 2 down vote accepted

C/C++ and Python can be integrated fairly easily, but Python really should be a snap for anyone that knows C well to pick up in a week.

share|improve this answer
@Ignacio keep things in C/C++ will increase the application performance? I heard once google keep its all core in C/C++ and use python for interfacing? Is this correct? –  Ramiz Uddin Mar 18 '10 at 6:31
I can't speak as to what Google's doing, but most of a web application's time is spent waiting. It makes sense to speed up the slow parts, but profiling should be performed before anything is done regarding speed optimization. –  Ignacio Vazquez-Abrams Mar 18 '10 at 6:39
what is more efficient with application performance if c/c++ will interact with database. will there be any speed efficiency or it will be same as you access through other server-side scripting or other languages? –  Ramiz Uddin Mar 18 '10 at 6:48
Database access is not the place to optimize. The slow parts of database access are the network, and of course the database engine itself. The bindings for most languages are likely to be only a tiny bit slower than the C library. –  Ignacio Vazquez-Abrams Mar 18 '10 at 6:52
add comment

I don't think you should use a compiled language (at least not c++) for web programming. I thought about doing this once too but remember that for any change you'll have to compile etc.

Facebook uses php and it's hip hop application changes php into c++. Maybe you should take a look at that.

Of course c++ (or any compiled language) will be faster than an interpreted language, but you also have to take in account the development time of the web site/app.

Hope this helps :)

share|improve this answer
add comment

cython http://wwww.cython.org is a nice way to interface python and C/C++

share|improve this answer
add comment

Your Answer


