• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to develop a web app with C++ / Java / PHP?

ElDonAntonio

Senior member
does anyone know how to create a C++ application that runs on a server and receives input from a user's actions on a web page? Do I need to write a script to interface the web page with the application?

I guess I could use PHP/MySQL for all my needs but I'm much more familiar with C/C++.
 
Visual Studio .NET

I think Visual Studio 6 also offered some ways of doing that.
Basically you can have asp pages interact with C++ programs which can interact with data sources, but it's a wee bit more complicated.
I feel at home with PHP.
 
php supposedly has syntax really close to C++.

Basically you need to figure out how to either recieve data from a POST or GET made from a browser. php, perl, etc would be better suited because they have modules to handle this for you already.
 
CGIs??
Why didn't any one pointed them out!

Here is a start!!

BTW don't bother to ask me question about how to do it because I never done it myself, but I've seen things made
by others and they work!!
 
Thanks guys!! some pretty good suggestions here...I guess I'll better define my needs and choose between PHP or CGI/C++.

One problem I just thought of, if I want to create a text box with Bold, Italic Underline, etc buttons (similar to the interface of the Anandtech forum posting page, but it would be nice to have MSWord-like functionnality for example: pressing Bold will render the selected text in bold, instead of the Anandtech forum style), can I do that with PHP? Or do I have to go with Java?
 


<< One problem I just thought of, if I want to create a text box with Bold, Italic Underline, etc buttons (similar to the interface of the Anandtech forum posting page, but it would be nice to have MSWord-like functionnality for example: pressing Bold will render the selected text in bold, instead of the Anandtech forum style), can I do that with PHP? Or do I have to go with Java? >>



Java. No server-side language that renders simple html (PHP, ASP(.NET), etc.) is capable of doing that. As I said, server-side languages simply render the html on the client, and how the input fields are displayed is up to the browser.
 
Shazam - you think I would be able to do that using Javascript??? if yes, I am interested to hear more about it!!! 🙂

If I get forced to use Java, do you guys think it will be possible/easy to integrate it in the whole PHP site (ie PHP sending info to the loading Java applet, and the Applet returning the text entered by the user to PHP) or would it be preferable to go all the way java then? (which I would rather not)

Thanks!!
 
No, if you're using Java, you'd be using the servlets API with JSP.

The Servlets API is very nice, and RogueWave has cloned the API almost completely into a C++ product. Of course, it's proprietary.

If Descartes says Java can do what server-side scripting languages can't, he must be referring to Java applets. Unless you have particular needs, you wouldn't be doing applet programming.
 
Hi Manly, you seem to know quite a bit on that topic...can you give me some more details on "the servlets API with JSP"? is it a server-side scripting language too? I was referred to Java applets because I want to create a text box with bold, italic, etc buttons that really render the text in bold/italic/... (instead of the AnandTech forum style)

I checked out RogueWave's website, but it seems like an extremely costly solution...

thanks a lot!!!
 
thanks for the links amigo!

Just one more question: would the java applet be constituted only of the WYSIWYG editor that could then send its data to the rest of the page or would I have to create the whole system in one big Java applet?

Oh, and another thing, what advantage according to you would I get by using the Java servlets versus PHP/MySQL?

Thanks again for the good tips!
 
ElDonAntonio,

Actually if you're comfortable with PHP and mySQL, then there's no rush to explore Java servlets and JSP. There are a lot of advantages to Java technologies, but for personal use, open source software often does the job.

However, you will need to learn the Java language and some APIs if you wanted to program an applet. Fortunately, in my experience/opinion, most Java APIs are well-designed and easily learned.

As to the technical question, I would suggest that the applet incorporates as much of the "application" as possible. The applet lives in a "sandbox", and while it can somewhat communicate with the browser, you're probably better off keeping the HTML page simple. Generally speaking, it's better to separate the complexity and keep the interface between modules small.
 
Back
Top