Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Scripting Possibilities of OSX

Scripting Possibilities of OSX
Thread Tools
bluedog
Mac Elite
Join Date: Aug 2000
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Nov 13, 2000, 01:28 PM
 
To answer a question about web scripting and languages, I've compiled a personal description of languages and how I understand them to be used. Please contribute and correct any ommissions or errors.

The original question was posted in the "I'm an Apple Employee..." forum. Hopefully this discussion will be useful for many people.

Originally posted by [email protected]:
Since were on the subject of scripting I have some questions. I hear a lot of talk about programing and scripting. What is the difference between programming in Java as aposed to Javascript. I hear the same refrence when people talk about Visual Basic and VBscript. What is PHP. Is it going to be something that will run on OS X with MySQL? When people start learning this stuff do they learn it all or stick with one envirement and language?
11-13-2000).]
I've never seen so many questions that could be detailed in seperate essays to each their own. I'll answer your last question, first.

Many people begin with one language, but I've never met someone who stuck with one language who continued to work as a web professional. Once a person has the basic ideas behind programming and scripting, other languages become easier to pick up and learn. After learning several languages and seeing their strengths and weaknesses most people will use the one best suited to their task. I suggest you dig in and learn one according to your current needs and learn others as your needs grow.

Here's a brief and inconcise summary of many popular programming and scripting options used on the internet today. I implore others to add any I neglected to mention and correct any misconceptions I may have on the languages less familiar to me.

Visual Basic is a language developed by Microsoft that has 'similar' functionality to Applescript. It can tie together applications and data, passing information from one to the other in a fairly easy manner. (Correct me if I'm wrong on any of this, but I believe VBScript is a short name for Visual Basic or a subset of the language). Visual Basic has been the delivery method and catalyst for so many Windows-based viruses. One reason for that is its inherent 'trust' to be able to execute on any command and file in Windows 9x. Its functionality comes with great risk to your security.

Applescript is a language developed at Apple for connecting applications and data together. It has also been useful to create full scale applications in the past by putting an interface onto the scripts via 3rd party products like FaceSpan. Applescript is wholeheartedly to be incorporated into OSX. Sal has intimated good things about its inclusion. We've seen the beginning in the public beta. Applescript being incorporated into a multi-user, secure environment will provide all the functionality it has in the past, including better protection against the use of Applescript to create havoc by malicious users.

Javascript is a scripting language used withing web pages to provide dynamic functionality or calculations. It acts as a go-between in many cases with the server but can be used as a stand-alone option on a web page to provide dynamic data. There are many other application for using Javascript. It has some limitations (often related to creating a secure environment).

JScript is Microsoft's diluting the importance of Javascript. It is a language embedded into HTML code that adds functionality similar to Javascript. Microsoft added nonstandard functions to the standards suggested by Internet Standards committees and released it with their browser for free. This has led to meaningless toil by web developers trying to support all browser versions and ideosyncracies between end-user's browsers.

Both JScript and Javascript are children to a language called Ecmascript (sp?) upon which the standards are based.

Java is altogether different from JScript or Javascript. The similarity is they all can run through a web browser in a Java Virtual Machine. This is a software-based creation of a computer system (almost like having a computer built within a computer) that allows a person to program in Java and run it on any computer that has a Java Virtual Machine available for it.

Many programmers are using Java for more than web programming. Security was created in Java from the beginning but there have been security holes discovered. I believe the security of Java is fairly good, and holes are dealt with rather than ignored.

Java can be used in the end-users browser or on the server as a "java servlet" which is a custom programmed application that interfaces with the webserver and returns information for the webserver to send. The java servlet could interface with databases, do its own processing of data or interact with other applications on the server side.

PHP (hypertext preprocessor) is a scripting language that resides on a server. It is often used as a go-between for the webserver to send data from a database such as MySQL. When a web server is configured with a PHP interpreter installed it can read the PHP scripting within HTML pages and produce dynamic content from the scripting.

PHP scripting is often compared to ASP (Active Server Pages) which Microsoft has incorporated into its software offerings. Both PHP and ASP have similar purposes. There are even translators that will change the syntax from one language into the other. Both ASP and PHP are used to create links to databases and build rapid web applications for business.

I feel it necessary to mention Python and ZOPE as another scripting combination popular in web development. Python is the scripting language and ZOPE is the interface which allows Python to be used by the webserver in providing dynamic content. My experience has been very minimal with Python, but I've heard it mentioned as a peer to Perl.

Perl is a scripting language that resides on the server only and is not interpreted by the end-user's browser (as happens with JScript and Javascript). Perl extensions added to a webserver allow unlimited flexibility to access the server's data or other applications. Python also has this capability and each has their loyal supporters.

OK, in summary:

JScript and Javascript are interpreted by the browser and incorporated within the HTML of a web page.

PHP, ASP, Perl, and Python can be included within the HTML and interpreted at webserver BEFORE the web page is sent to the browser.

Java, Perl and Python can be used on the server to do dynamic tasks and interfacing with other appliations.

Only Java has a virtual machine that can be sent and interpreted by many web browsers. There are some cross-platform issues with the development of Java applications even though it was intended to be a completely cross-platform solution.

If you're still with me, thanks for reading and please contribute your thoughts and suggestions on computing languages.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:01 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,