Chapter 9. Networking and Internet Programming


REALBASIC OFFERS A RICH SET OF classes for creating networked applications that use the Internet. A network consists of two or more computers that are connected to each other and can send data back and forth. A network application is one that leverages this connectivity to perform some task. Another way of saying that computers "send data back and forth" is to say that they are communicating, and "communicating" is probably a better word to describe it because the two computers aren't just sending unrelated streams of data to each other. Instead, one computer sends some information to the other computer, and the other computer responds to that information.

It's very much like a conversation between individuals. When you meet someone on the street, you might nod your head and expect a nod back. If you thrust out your hand for a handshake, you'd expect the other person to reach and shake your hand. If you say, "Hello! How are you?" it is likely that the other person will say, "I'm fine. Thanks." For a conversation or exchange like this to work, you not only have to physically have a way to communicate with the other person, you also have to have a common language that you speak. But this is not enough because even if you are physically capable of talking and you know the same language, you won't get much done if you are both talking at the same time. Because of this, humans have certain customs, or protocols, they use when communicating that makes meaningful communication possible.

When two computers communicate, they need to have similar rules so that each one knows when to speak and when to listen. The computers need to know how to find each other, how to introduce themselves, and how to have a meaningful conversation, and they use protocols to make this happen. All of REALbasic's networking classes use Internet protocols.

To understand how all of this works, I want to talk about something most everyone is familiar withviewing an html page in a web browser. Later on in the chapter I will create a web server using classes provided by REALbasic.




REALbasic Cross-Platform Application Development
REALbasic Cross-Platform Application Development
ISBN: 0672328135
EAN: 2147483647
Year: 2004
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net