---------Rexx---------

Rexx Home
Rexx FAQs
Rexx Testimonials
Rexx Tutorials
Rexx Articles
Rexx Reference
Rexx Manuals
Rexx How-tos
Rexx Best Practices
Rexx Standards & Portability
Rexx Downloads
Rexx Tools
Rexx Sample Code
Rexx Forums
Rexx User Group
Rexx Links
Rexx Benchmark
Rexx Macros
Rexx News
Rexx Book
Scripting
Contact Us
Rexx What's New
More topics

  (C) 2005/6/7/8/9/2010

rexx
rexx
Rexx_LA
Windows_security_privacy
Rexx
downloads
revitalize_old_pcs
rexx
rexx
rexx
rexx
rexx
rexx_benchmarking

(not an ad)

     This site
 (C) 2005/6/7/8/9/2010

Rexx Banner
Scripting

Topics on this page . . .

      
The Rise of Scripting
      
What is Scripting?   (benefits & drawbacks)
      
Uses for Scripting  
      
Open Source versus Proprietary Languages
      
The Open Source Languages
      
Language Popularity
      
Links
      
Downloads
      
Free Books  
      
Best Books  
                  

Scripting

There has been little publicity about it and no big headlines but we’re in the midst of a programming revolution.

Back in the 1990’s, if you browsed the computer book section at the big Borders or Barnes and Noble bookstore downtown you would have seen few books on scripting. Today, you’ll see dozens.  What happened? 

Scripting is the Quiet Revolution.  For years the computer and IT industry trade press was flooded with articles on object-oriented programming. OOP was widely heralded as the new paradigm that would quickly obsolete all other approaches to program development.   While not quite that successful, object-oriented programming has surely contributed a lot to today’s higher programmer productivity.  OOP languages like Java have become very important.

But here’s the kicker -- today you’ll see more books on scripting than object-oriented programming at the bookstore, and yet the movement towards scripting has garnered zero attention in the trade press.  Do a quick Google search on scripting versus object-oriented programming and check this out yourself.  Scripting is quietly, relentlessly gaining adherents -- with little publicity.

Of course, object-oriented programming and scripting are not mutually exclusive. Many languages fit in both categories.  Python and Ruby are good examples, as are the object-oriented forms of Rexx and Perl.

This page explores why scripting languages have become so important. It offers taxonomies of the scripting phenomenon and basic descriptions of some key languages. Then, it provides links for learning more.

What_is_Scripting

No hard-and-fast definition of what a scripting language is exists, but generally scripting languages are interpreted programming languages that feature higher productivity than more traditional systems languages like Java, C++, C, or COBOL.  A line of code in a scripting language typically does more than a line of code in a traditional systems language.  In part this is due to the dynamic nature of interpreters, which allows for a higher level of automation in the language.  This gives scripting languages high-productivity features like variably-sized data elements and structures, dynamic variable definitions, built-in interactive debuggers, automatic memory management, dynamic extensibility, and more.  

Scripting languages are glue languages.  They tie together existing software, such as objects, components, widgets, operating system commands, programs, functions, modules, and other forms of existing code.  Scripting languages are higher-level than traditional programming languages because they more easily leverage existing software.

Key benefits to scripting are:

  • Higher programmer productivity
  • Less concern about machine details
  • Ability to tie together and build on existing software
  • Faster, easier debugging

Drawbacks include:

  • Slower run times -- not the best choice for machine efficiency.  Large projects that demand the highest performance (for example, a large online transaction processing or OLTP system) make it worthwhile to code in less productive systems languages like Java, C, C++, or COBOL.
  • Usually not suitable for low-level machine-specific coding (like writing a device driver, for example)
Kinds_of_Scripting

Scripting fulfills many programming needs, and the scripts themselves reside and run in various places.  Examples of the major roles played by scripting languages include --

  • Web browser programming -- applications programmers immediately recognize scripting languages as the means to program browsers.
  • Server-side web applications --scripts also run server-side in many web applications.
  • Glue languages -- most scripting languages are very good at building upon and reusing existing software components (objects, widgets, operating system commands, programs, modules, functions, components, etc). This gives them high programmer productivity and a special role as glue languages.
  • GUI programming -- their role as glue languages leads directly to their use as highly productive vehicles for programming graphical user interfaces (an otherwise detail-oriented task).
  • Applications programming -- general-purpose scripting languages can easily be used as the primary or sole programming language for a project -- and often are.
  • Job control or command languages or shells -- there has always been a requirement for high-level languages that can drive larger applications written in traditional system languages.  Over the years and in different contexts these have been called job control languages or command languages or shells.  Many scripting languages have either been designed for this specific role or function well within it.
  • Systems administration -- scripting languages support the need to develop system administration scripts. This includes network, client, and server administration scripts.
  • Text processing -- because of their interpreted, dynamic nature many scripting languages are excellent at text processing (long a weakness of some traditional compiled languages).
  • Macro programming -- scripting languages are often the application language or macro language used with a specific product, to animate it and make its features programmable.
  • Embedded programming -- embedded languages and product-extension or “extensible languages” are yet another role for scripting.

Since scripting fulfills these many needs, this leads to one key distinction among scripting languages -- between general purpose scripting languages and those special-purpose languages designed for more narrow specific uses.  This chart gives some idea of how scripting languages categorize in this respect --

General Purpose:

Special Purpose:

Perl, Python, Rexx, Tcl/Tk, Ruby, Korn, Bash, Visual Basic, VBScript, AppleScript, Windows PowerShell, others

PHP, JavaScript, JSP, JScript, ASP,
ASP .NET, others

The chart shows that it is not always easy to classify scripting languages.  For example, some might consider VBScript general-purpose, while others view it as special-purpose. PHP faces the same controversy.  Modern releases have generalized the language, yet many still consider it strictly a vehicle for web application programmingTcl/Tk underwent a similar expansion in features and evolution in purpose. So take this chart with a grain of salt, even though the idea of categorizing scripting languages in this manner is useful.

Kinds_of_Scripting

A more important distinction among scripting languages is between those that are open source and those that are proprietary, commercial products. The former run across a very wide variety of operating systems and platforms while the latter address only a limited number of proprietary systems.

Open source scripting languages predominate -- except for the scripting languages from Microsoft.  We thus have a split of the scripting universe into two camps -- open source and Microsoft-led.

This chart lists open source versus proprietary scripting languages --

Open Source:

Proprietary:

Perl, Python, Rexx, Tcl/Tk, Ruby, Korn, Bash, PHP, JavaScript, JSP, others

Visual Basic, VBScript, Visual Basic for Applications (VBA), VB.NET, JScript, ASP, ASP .NET, Windows PowerShell, the Windows Script Host (WSH) framework,
the .NET framework, AppleScript, others

You can see that Microsoft has fragmented its own scripting community by continually introducing new scripting languages and frameworks.  DOS had its DOS command or batch language, which Microsoft extended for Windows NT.  At the same time the company added Rexx to the Windows administation tools packs to placate system administrators who demanded a full-powered administrative scripting language. Microsoft simultaneously expanded Visual Basic as a macro language for Microsoft Office (as Visual Basic for Applications or VBA), building on the strong Visual Basic community but forking the administrative versus macro/application-extension scripting languages.

In the administrative realm, Microsoft eventually dropped Rexx and replaced it with their own proprietary languages in the form of
VBScript (and JScript) and the Windows Script Host or WSH framework.  In 2006 Microsoft superceded the VBScript strategy with PowerShell, yet another language for this purpose.

Meanwhile Microsoft was evolving a related but distinct universe of scripting languages and frameworks for client- and server- side web applications. The COM, DCOM and OLE technologies gave way to
ActiveX as the reusable software component model.  The .NET Framework became more important with the rise of Active Server Pages and later ASP.NETVB.NET replaced earlier forms of Visual Basic.

Microsoft scripting hosts from Windows Script Host to the .NET framework and
Common Language Runtime or CLI are architected such that one can program in languages other than Microsoft’s own. But in practice very few people do -- almost everyone uses Microsoft’s proprietary languages like VB.NET (or C# or maybe even JScript.NET).

This is by design, of course... the “openness” in Microsoft’s architectures is intended for sales purposes rather than for customer use. Microsoft considers it critical to their corporate strategy to keep their customers using scripting languages the company controls.

The bottom line -- use Microsoft’s scripting languages and frameworks if you are a Microsoft-only shop, and if you want to take advantage of all Windows’ facilities and Microsoft paid support.  Use open source languages when you want portability, open standards, and non-commercial software.  Only the open source scripting languages run on operating systems than Windows.

Open source also frees you from the instability of Microsoft’s scripting strategies. Microsoft has shifted focus among its scripting tools so frequently that organizations using them should not expect their code to have much lifespan as state-of-the-art, supported applications.

Scripting

So that you can get a quick idea of what they’re about, here are descriptions of the most popular general-purpose open source scripting languages. The descriptions are objective but brief.  In using most of the languages in the chart, I’ve found that all languages have their own strengths and shortcomings -- there is no “best” scripting language.  There are only languages are that better-suited or not-so-well-suited to the particular projects or goals you have in mind.

Language:

Profile:

 

 

Perl

One of the most popular scripting languages in the world, Perl claims millions of users. It’s an extremely powerful language, but it takes a while to learn and scripts can be difficult to maintain.  Perl features a huge library of free tools and extensions called the Comprehensive Perl Archive Network (CPAN).  Perl is a general-purpose scripting language that fulfills every scripting language role.

Python

Python has a large user base, especially among those who prefer a more thoroughly object-oriented scripting language.   Like most of the languages in this chart, Python runs on almost any operating system or hardware platform.  It features tons of freely-downloadable tools and interfaces. Python offers an easy syntax compared to Perl and the Unix/Linux “shell languages” and most people find it easier to learn and maintain.

Rexx

Rexx combines ease of use with power.  It uses special techniques to bring these two normally-contradictory goals together. Originally known for its dominance on mainframes, there are today 9 free Rexx interpreters that run on every operating system and platform. There are also thousands of free tools.  Rexx is easy to work with and maintain. Like Perl, Rexx is general-purpose and fulfills every scripting language role.

Tcl/Tk

Tcl/Tk was originally designed as a special purpose “embedded command language” but quickly evolved into a well-rounded, easy-to-learn general purpose scripting language.  Tk is an especially popular toolkit for building graphical user interfaces.  Other free scripting languages (Perl, Python, Rexx) interface to Tk to leverage its superior GUI-development capabilities.  Tcl/Tk is powerful yet easy to learn and program.

Ruby

Ruby is a thoroughly object-oriented, relatively new language. Like Rexx it offers power within syntactic simplicity. Ruby enjoys great “buzz” but has a smaller user base than Perl or Python. Enthusiasts especially like Ruby’s development environment, Ruby on Rails

PHP

PHP’s use has exploded in the past few years because the language is increasingly seen as the open-source alternative to proprietary web-development scripting languages from Microsoft.  PHP is very easy to learn and quick to code.  Though originally strictly for web page programming, PHP has been generalized in recent years and is now a general-purpose language. Nevertheless nearly all use of the language is still for web application scripting.

KornShell

The KornShell was developed for Unix systems over twenty years ago.  Its use spread along with Unix -- with which it is still almost exclusively associated.  Korn is like Perl in that it is extremely powerful but also cryptic and very syntax oriented.  It is mostly used for Unix system administration and occasionally for application programming.

Bash

Bash is another evolution of a Unix shell language that finds its greatest use as the default shell in most Linux distributions. Bash features the same blend of power and awkward syntax as KornShell and Perl.  Bash is a further evolution of the original Unix shell, the Bourne shell (there are many other shell variants). Like KornShell, Bash is probably mainly used for systems administration but is also sometimes used for applications development.

JavaScript

Javascript is usually considered a special-purpose scripting language for web development, rather than general-purpose.  I’ve included it in this table anyway due to its very high popularity for client-side (inside-the-browser) scripting.  JavaScript also runs server-side.

You can freely download any of the open source languages in this chart through the links in the language names.

ScriptingLinks

It’s difficult to determine the relative popularity of different scripting languages.  The distribution and licensing of open source makes it impossible for these languages, and if Microsoft knows how many people or licensees use its scripting languages, they’re not telling.  Most would agree with these assertions --

PHP -- PHP has breakout popularity, based on its role as the open source tool for scripting web sites.  Its use has been increasing steadily for years.

Perl -- Many would argue that Perl enjoys breakout popularity, but web sites that track language use usually depict Perl’s popularity as in a long gentle decline.  Nevertheless, it’s still probably the second most popular scripting language after PHP.

Python -- Python is the third scripting language whose numerous devotees separate it from the pack.  Surveys often show its use to be near that of Perl.

The Pack -- All other scripting languages coalesce in “the pack.” Most of those listed on this web page (open source or proprietary) collect together in this range.

Here’s a typical popularity chart based on
SourgeForge statistics (courtesy F. Labelle) --

scripting_lang_popularity

The TIOBE Index of language popularity is another good source for comparative statistics on this subject.

ScriptingLinks

Definition of scripting languages (Wikipedia)

Defines & lists scripting languages (WhatIs)

Chart comparing languages (Wikipedia)

Scripting language website (Softpanorama)

Programming languages by category (Wikipedia)

Why scripting languages matter (Tim O’Reilly)

Server side scripting (Wikipedia)

Scripting tutorials (FreeProgrammingStuff)

Web development scripting (Wikipedia)

Free scripting info & tutorials (W3Schools)

Defines & lists scripting languages (c2)

Language comparison website (Google Directory)

Compares languages (c2)

Websites on scripting (Open Directory Project)

Programming Language Examples Alike Cookbook

Server side scripting (Open Directory Project)

Scriptometer measures scripting capabilities

Scripting languages informal comparison chart

Microsoft and Windows oriented --

Microsoft scripting (MSDN)

The state of the scripting universe (DevSource)

Windows PowerShell website

Windows scripting guide

ScriptingDownloads

               Perl

               Rexx

               Ruby

           KornShell

             Python

               Tcl/Tk

               PHP

               Bash

ScriptingInformation

             Perl

               Rexx

               Ruby

           KornShell

           Python

               Tcl/Tk

               PHP

               Bash

ScriptingLinks

Perl --- free books on Perl and Python, a dozen free Perl books
Python --
free books on Perl and Python, DIve into Python, 10 free Python books
Rexx --  all Rexx manuals are free to download from
here, here’s a good list of Rexx books (none are free)
Tcl/Tk --
10 free Tcl/Tk books, three free Tcl/Tk books, a dozen more free Tcl/Tk books
Ruby --
15 free Ruby books
PHP --
several free PHP books and five free PHP books
KornShell -- O’Reilly’s free
Learning the KornShell, many free KornShell chapters and a few free books are here
Bash -- several free Bash and related Linux books
here, find several more here, shell scripting books here

Many computer books on these and related topics are freely downloadable from
here, here, here and here.

ScriptingLinks

Here are my personal recommendations among the many books on scripting languages, along with explanations of why each is superior --


Perl
-- The classic
Programming Perl (3rd ed.) by Larry Wall et al (O’Reilly: 2000) shows the power of Perl in all its glory (and complexity). Required for serious Perl programmers. Beginning Perl (2nd ed.) by J. Lee (Apress: 2004) is a better choice for Perl newcomers and those needing a tutorial guide.

Python -- There are so many excellent Python books it’s tough to select one or two. 
Python for the Absolute Beginner by M. Dawson (Course Tech PTR: 2009) is worthwhile for neophytes, while Dive Into Python 3 by M. Pilgrim (Apress: 2009) is great for the experienced. The latter is an updated version of the free Dive Into Python book in the “free books list” above.

Rexx --
Rexx Programmer’s Reference by H. Fosdick (Sams: 2005). This is the only up-to-date Rexx book that covers all the different forms and implementations of the language, along with many coding examples.  700+ pages. (By the creator of this web site.)

The REXX Language by M. Cowlishaw (Prentice-Hall: 1990).  This slender volume is the official language definition by its creator. A classic.

Tcl/Tk -- The authoritative
Tcl and the Tk Toolkit (2nd ed.) by J. Ousterhout and K. Jones (Addison-Wesley: 2009) is finally out in its new second edition. Worth the wait.  This is the book to buy on Tcl/Tk.

PHP -- 
Sams’ Teach Yourself PHP, MySQL, and Apache All In One by J. Meloni (Sams: 2008).  Awesome way to get started in a hurry with PHP and using it for web development.  For both Windows and Linux. I recommend the “Teach Yourself” series by Sams on similar topics like ASP.NET, JavaScript, and the “AJAX, JavaScript and PHP All-in-One” book.

KornShell --
KornShell Programming Tutorial by B. Rosenberg (Addison-Wesley: 1991). There are many KornShell books out there, but most are into geeky coding tricks.  This book is different. It is IT-oriented and gives you many simple  examples.  It also demonstrates the different ways to accomplish tasks using Korn and covers syntax complexities.  Much better than many other shell scripting books, IMHO.

Bash -- Like the KornShell, I don’t see much connection between many of the Bash books available and the coding needs and techniques I see at many IT sites. Email me if you know of a good tutorial book I should place in this slot.  (thanks!)

VBScript --
VBScript Programmer’s Reference by Kingsley-Hughes and D. Read (Sams: 2007).  I had to learn VBScript for a particular project at work and found everything I needed in this single 775-page book. Easy-to-read and comprehensive.

Scripting in General --
The World of Scripting Languages by D. Barron (Wiley: 2000). Obsolete, but one of the very few books around that gives a quick introduction and good comparison of some of the major scripting languages. Still worthwhile.

[Home]  [FAQs]  [Testimonials]  [Tutorials]  [Articles]  [Reference]  [Manuals]  [How-To’s
[
Best Practices]  [Standards & Portability]  [Download Rexx]    [Download Tools]    [Sample Code]
[
Forums]    [User Group]  [Links]  [Rexx Benchmarking]  [Macros]  [News]  [Book]
[
Scripting]  [About the Site] [What’s New] [Topics other than RexxThis site (C) 2005/6/7/8/9/2010