C++ and the web

Discuss all aspects of programming here.

Moderator: The Mod Squad

C++ and the web

Postby aj1pso » Mon Oct 04, 2004 8:19 pm

I've been studying C++ recently and I'm well near the end of what most tutorials offer (and some of the more mainstream books too). However, jumping a little foward I see that web implementation is nowhere to be found.

I guess my question is, whats next in my search for mastery of C++? I want to write programs that effectively use the web. I know I need to jump on the opengl wagon and whatnot for graphics but I dont know where to go for network stuff.

What do you think is next?
Image
aj1pso
Black Belt 1st Degree
Black Belt 1st Degree
 
Posts: 1248
Joined: Tue Jan 27, 2004 8:08 pm
Location: Venezuela

Postby thomas_w_bowman » Tue Oct 05, 2004 5:28 am

The interfaces on the Web generally use an interpertive language, such as JAVA (that do not require compiling, since compiling is a step that results in machine code - it then only works for the hardware for which it was compiled).

C++ by it's nature, is compiled - thus suitable only for use on the local machine for which it was compiled. Modules could be referenced and executed by scripting languages, so it might do well as a browser or to support an 'environment' for a local machine to use when accessing the web - but generally would not be well-suited to run on 'random' client machines, as a script language might be... It could perhaps handle some I/O from the web (as many web-interactive games may do), but would benefit from strongly structured interfaces (like a data 'layout' ot specific protocol).

I don't work much with C++, so I may be 'full of it' - if so, I am confident that someone would 'straighten me out' promptly...and even if I am getting it right, someone else may be better able to explain the details.
Better living thru technology...
"Open the Pod Bay Doors, HAL..."
Join Folding team #: 33258
thomas_w_bowman
Black Belt 2nd Degree
Black Belt 2nd Degree
 
Posts: 2884
Joined: Fri Feb 28, 2003 2:59 pm
Location: Minneapolis, MN

Postby aj1pso » Tue Oct 05, 2004 4:11 pm

I suppose I worded my question the wrong way. What I really want them to do is work with tcp/ip protocols, no literally "the web" as one might interpret.

I've been doing some reading on winsocks and whatnot but still cant find a reasonably didactic source on the subject. I'm getting a clear picture of C++'s versatility and why everyone says its so hot though :lol: Theres so many function libraries and stuff you can add to it, not just the limmited set of commands that other languages have. Its very interesting stuff albeit a little confusing at first.

By the way, engineers should stay away from writing manuals. Seriously, hire someone with a psych degree specialized in teaching techniques to write it. Engineers just cant write, its a known scientific fact. They're too used to working with the other side of the brain.
Image
aj1pso
Black Belt 1st Degree
Black Belt 1st Degree
 
Posts: 1248
Joined: Tue Jan 27, 2004 8:08 pm
Location: Venezuela

Postby thomas_w_bowman » Wed Oct 06, 2004 3:55 am

By the way, engineers should stay away from writing manuals. Seriously, hire someone with a psych degree specialized in teaching techniques to write it. Engineers just cant write, its a known scientific fact. They're too used to working with the other side of the brain.


True - however the psych guys don't know how things work - so we're stuck (although there are some books that are readable, sort of like 'translations' of the Engineers manuals).

For TCP/IP, I think you would interface somewhat as you would for a file (you are sending/receiving packets of data ?) - sorry that I have not actually done this in C++, but I'll bet that there are usable routines (Open and Close may be quite different than simple file handling)...

Try these links, perhaps they will be helpful. (Google: TCP/IP C++):
http://www.thefreecountry.com/sourcecode/sockets.shtml

http://www.sashanet.com/internet/download.html

http://sourceforge.net/projects/cpp-sockets/

http://www.simple-sw.com/ec_cpp.htm
Better living thru technology...
"Open the Pod Bay Doors, HAL..."
Join Folding team #: 33258
thomas_w_bowman
Black Belt 2nd Degree
Black Belt 2nd Degree
 
Posts: 2884
Joined: Fri Feb 28, 2003 2:59 pm
Location: Minneapolis, MN

Postby adrianxw » Thu Oct 28, 2004 12:06 pm

The sockets standards abstract TCP/IP. It sounds as if you were on the right track with WinSock, (assuming you are running Windows). WinSock is the Windows implementation of Berkeley sockets. The concept is used by most major OS's and libraries are available for pretty much TCP/IP equipped platforms.

You talk to a socket and listen to a socket, the underlying software packets it up and transfers it. You don't need to worry about the details.
Wave upon wave of demented avengers march cheerfully out of obscurity into the dream.
adrianxw
Initiate
Initiate
 
Posts: 53
Joined: Tue Jan 27, 2004 1:52 pm
Location: Denmark


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest