Click to See Complete Forum and Search --> : how does a script work exactly?
zskillz
07-09-2001, 12:09 AM
I know that there are all types of scripts, but I was curious about what types there are.
1. what are the main types of scripts (including scripting languages)
2. do you run them like an exe or what?
thx
-Z
radbasa
07-09-2001, 05:31 AM
disclaimer: been 4 years since I did any web programming
1. client-side: VBScript, JavaScript (now officially called EcamScript), JScript (essentially Microsoft's take on JavaScript, might be dead now)
server-side: Perl (most popular), C, Tkl, just about any Unix scripting language.
2. Script languages are essentially like DOSs batch files. They're a set of commands you would like to run on a system. Now, there are two type, client-side and server-side. The client-sides run on the user's browser, thus on the user's system. They're usually included in the html of a webpage but can be called inline using something like "javascript:xxxx" for instance. The server-sides run on the web server, and their function mostly is invisible to the user except for the output. These programs are called using .cgi urls.
That's pretty basic info I gave you. As I have said, it's been a long time since I last touched web programming.
You could look into informit.com's free library of articles and books (Que, Sam's, etc.) for indepth tackling of this subject.
jamis
07-09-2001, 07:44 AM
Yes and no....
For the most part, radbasa is correct (in regards to scripting in relation to the web).. though a minor point: C and is not a scripting language, but can be compiled and run as a CGI for web use.
Though, there are many other scripting uses that came before the web and have no relation to it... the most fundimental of which is shell scripting... much like DOS's batch files (as radbasa mentioned), though usually with somewhat more powerful capabilities.
The main difference between a script and a compiled program is basically when certain things happen..
Languages such as C, Pascal, VB, Assembly, etc, are compiled at build time into machine code and you are left with the executable. This executable for all intents and purposes can not be modified unless you change the code and recompile.. though it can be distributed and executed without the code.
A scripting language such as Perl, or a shell script (bash, ksh, sh, etc) is run through an interpriter of sorts at execution time and the expressions contained in the script are then evaluated. Most scripting langages resemble batch files, though tend to offer more powerful features often contained in a more powerful compiled language. The script is not compiled, and the code/script file is distributed as the executable but requires the interpritor to be present on the machine the script is to be executed on (a perl script requires the perl binaries, c shell script requires the c shell to be install, etc). Shell scripts are for the most part a unix thing... Perl is mostly unix also, though has been gaining alot of Windows users in recent years. Windows scripting host is a Windows specific scripting langauge with alot more power than just batch files.. though i hear people swearing at it enough to avoid it. http://www.sysopt.com/forum/smile.gif
Also, alot of applications use proprietary scripting languages for internal uses... but thats a whole other story http://www.sysopt.com/forum/smile.gif
I tried to simpify the above and some of the terminology my not be exactly correct.. though for the most part, I think you'll get the idea. http://www.sysopt.com/forum/smile.gif
SysOpt.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.