-   Programming (
-   -   Web Programming Environment (

AustinPowered 12-20-2011 09:53 PM

Web Programming Environment
I have an application written in C++ running on a Linux server. I would like to be able to connect a web browser to that server and have the web page display the status of the application and allow configuration settings to be displayed and modified.

The program will need to display counters which could be updated as often as every second. Drop down menus, progress bars and meters would also be nice.

What I'm looking to learn from this thread it where to start. I have some programming experience (mostly C) and have done some work with Qt4 and C++. What language should I learn next? What tool kit or library should I use?

Thank you in advance for your responses.

Austin Powered

flamelord 12-20-2011 11:24 PM

I'm not no expert but one possibility is php, I'm not really sure how you would do what you want to do, but I'm pretty sure it is possible. Ruby and Python are also options. Depending on the complexity of what you want to do you could even write a CGI program in c++. In any event you will need to be familiar with HTML, and probably javascript.

I'm not really a web developer, but I hope that this is helpful to you.

dickgregory 12-21-2011 09:26 AM

Python has a built-in webserver. I have used it to implement a single-purpose function distantly related to what you seem to want. I implemented it as a single .py file of 72 lines, including white space and my custom functionality.

If you combine that with Django you have a pretty powerful tool that can get to about anything on your server system.

chrism01 12-21-2011 06:15 PM

The main qn is, do you want it all in one ie have the C++ program have a web interface as part of its code, or will it write to files that a separate prog eg in PHP can read etc.?
Either is do-able.

colucix 12-22-2011 01:58 AM

Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.

Proud 12-22-2011 04:56 AM

When you mention counters and configuration settings, are the values behind these currently stored in text files, a SQL database, or something else?

AustinPowered 12-22-2011 06:22 AM


Originally Posted by Proud (Post 4556046)
When you mention counters and configuration settings, are the values behind these currently stored in text files, a SQL database, or something else?

Configuration settings are already in a plain text file and status values can be retrieved from the application through calls.

Assuming all of the information to be displayed is stored in an easily retrieved format (file or database), what tools could be used to write the web pages to display this information?

Austin Powered

Guttorm 12-22-2011 08:16 AM


There are many options. If you are used to C++, it might be easiest to just embed a web server in your application.

chrism01 12-22-2011 08:17 PM

If you want it to update the browser every second, I'd go with embedding a webserver in the C++, for performance/sync reasons.
Consider using threads.

theNbomr 12-25-2011 09:16 AM

You will need to embed an HTTP server in your C++ application. Depending on your requirements, it may take as little as a hundred lines of code. However, the fast update rate suggests an AJAX application running on the browser client, and as I understand it, that implies producing XML on the server, as well as some storage of the javascript code on the server/application, so that adds some complexity. Embedded HTTP servers are becoming increasingly common, and last time I looked (not very recently), there were a number of open source packages targeting your type of application. It sounds like you want to export process variables from within the main part of your application, rather than data from files or databases, so I'm not sure how well most of the offerings will fit.

--- rod.

All times are GMT -5. The time now is 05:53 PM.