[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] Re: web publishing with perl



Aplogies to tedd@sperling.com..  I forgot to include the MacPerl WebCGI
email mailing list with my reply, so he's going to get two copies.  Sorry,
man!

Please read below in regards to my 2 cents worth

>Adam:
>
>>It is fairly straightforward, if I am thinking of the right thing,
>>and I do it a lot. I use perl to manage databases of information
>>which are then inserted into html pages through a special and very
>>simple system of custom tags within html template files...
>
><snip>
>
>I posted a question twice on the perl newsgroup and received no replies
>regarding this -- which was:
>
>    How do you execute a perl script from within an html document?
>
>Now, since I posted that question, I've been reading that what I asked
>could not be done because html and java script are client side operations
>while perl, and other, cgi's are server side operations/insructions (ssi).
>Am I correct?

There are two main sides of script execution.  Either client side or server
side.  It is possible to use both; but I see that as being difficult.

Client side scripting include some of the following, but this list is *NOT*
a exhaustive list.  There's bound to be more, eventually
  * JavaScript
  * Java
These two items are what *SLOW* computer users hate.  I'm one of them.  I
disable Java and JavaScript before I browse any sites.  Any sites that
complain that 'you must enable JavaScript' I leave.  JavaScript is the tool
of the devel..  at least, that's how I think of it.

Server side scripting can include more than one item.  The items that
server side can do depends on how the server is set up.  Some of the server
side items are below, and this is not an exhaustive list, either.
  * Perl scripts (including some CGI, if needed)
  * C/C++ scripts (ditto)
  * shell commands (ditto, but more complicated, I do think)
  * ...  any program that the server has installed........
  * Special on-the-fly document parsing, such as SSI, ASP, etc.
As you can see, it does benefit that you can do server side scripting, you
have more tools available to you.  If you were to make a SSI page that
includes Java/JavaScript, you can get a really cool site, but beware of
people who disable JavaScript.

The Macintosh is an excellent machine, no doubt.  However, the items that
CGI have been geared toward are *nix machines, and Macintosh and *nix do
not interpret the same things the same way.  Heck..  \010 on the Macintosh
is the equivelant to \012 on a *nix machine.  (mentioned in perldocs)  I do
make my scripts on Macintosh, and try to make them portable to either Mac,
*nix, or Win* machines, however..  :)

I've put in my 2 cents worth.  Good luck.

>Many thanks for your answer and direction.
>
>tedd

--Tim



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org