[REBOL] A word to all novice port programmers
From: cribbsj:oakwood at: 19-Oct-2000 15:41
This message goes out to all you who, like me, are novices when it comes to
using ports to communicate between your Rebol script and other programs.
I am in the process of learning Rebol. I have been writing some small
applications that use text files to store any data needed.
Because Core does not allow you to run system commands and because I do not yet
have much experience using ports to communicate, I thought that I would have to
wait until I purchased Command or someone wrote a script that connected Core to
MySQL (or the like) via ports.
Then I found MDBMS (www.hinttech.com). This is a very small, simple DBMS
written by a guy named Marty Bochane. Basically, you start it up on a Linux
box, then you can communicate to it interactively using telnet.
But, wait, it gets better. MDBMS has a little utility called FOP (Fast
Opendatabase Protocol). FOP allows you to open a port (default 2224) to your
MDBMS database and interact with it via simple ASCII strings terminated by
newlines.
Using FOP, I was able to very easily open up a port while in Rebol, send sql
queries to my MDBMS database, and receive the result set. It was so cool!
Here I was, a guy who knows VERY little about port programming, basically
building a client/server app in less than 30 minutes.
I know that this will be very mundane, basic stuff to the people on this list
that have a lot of port programming experience. But, if you are a novice like
me, this might be a way to get your feet wet in this subject. I know I am
already learning a lot.
I guess this is also a testament to Rebol's incredible knack for making things
easy to do. The ability you have to easily open, read from, and write to ports
is incredible!
Anyway, just thought I would pass this info along.
--
Jamey Cribbs