Macintosh Programmer's Workshop
Encyclopedia
Macintosh Programmer's Workshop or MPW, is a software development environment for the Classic Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

, written by Apple Computer
Apple Computer
Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

. For Macintosh developers, it was one of the primary tools for building applications for System 7.x and Mac OS 8.x and 9.x. Initially, MPW was sold as a commercial product but Apple eventually made it a free download. On Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, it was replaced by the Project Builder IDE that was eventually transformed into Xcode
Xcode
Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS. Xcode 4.2, the latest major version, is available on the Mac App Store for free for Mac OS X 10.7 , and on the Apple Developer Connection website for free to registered developers Xcode is a suite of tools,...

.

Design

MPW provided a command line
Command-line interface
A command-line interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks...

 environment and tools, including 68k
68k
The Motorola 680x0/m68000/68000 is a family of 32-bit CISC microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and were the primary competitors of Intel's x86 microprocessors...

 and PowerPC assembler
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

s as well as Pascal
Pascal (programming language)
Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring.A derivative known as Object Pascal...

, C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

s. The shell environment is somewhat similar to Unix shell
Unix shell
A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems...

s in design, but is designed around the Macintosh's character set and GUI
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

, replacing the usual terminal environment with a "worksheet" interface, allowing the user to select and run arbitrary sections of a shell script or to redo commands with no retyping. In addition, command line tools were commonly provided with a somewhat standardized graphical interface named Commando that provided limited access to the command line capabilities of the program. The debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

s were not integrated into MPW like most IDEs
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 of today but the language compilers supported the symbolic debugging information file format used by the debugger. MPW supported a source-level debugger called SADE (Symbolic Application Debugging Environment). SADE was not an MPW Tool, but ran as a separate application with a user interface similar to MPW.

Apple's compilers had some features that were not common on other platforms—for example, the Pascal compiler was object-oriented, while the C and C++ compilers included support for length-prefixed strings (needed for Pascal-oriented APIs). In addition, the original MPW C compiler was known for its casual and frequently humorous error messages, a quirk not carried on after the PowerPC transition, when Apple moved to a front-end developed by Symantec
Symantec
Symantec Corporation is the largest maker of security software for computers. The company is headquartered in Mountain View, California, and is a Fortune 500 company and a member of the S&P 500 stock market index.-History:...

. Pascal support was no longer provided by the mid-90s due to declining popularity of the language.

MPW was always targeted to a professional audience and was seldom used by hobbyist developers due to the considerable price for the package; by the time it was made freeware it had long since been superseded by offerings from Symantec and Metrowerks
Metrowerks
Metrowerks was a company that developed software development tools for various desktop, handheld, embedded, and gaming platforms. Its flagship product, CodeWarrior, comprised an IDE, compilers, linkers, debuggers, libraries, and related tools...

, as well as Apple's own development tools inherited from NeXT and distributed for free with OS X. It was also occasionally available as a wrapper environment for third-party compilers, a practice used by both Metrowerks and Absoft among others. Apple has officially discontinued further development of MPW (it has difficulties running on recent versions of Mac OS and requires the Classic environment on OS X) but does maintain a web site for the software.

MPW Shell

The MPW Shell featured redirection of output to files, and to windows. If a file were open, the output would go to the file and to the open window. This redirection of output required significant patching out of the file system calls so that tools need not do anything special to inherit this feature: the MPW Shell did all of the work.

The MPW Shell command language was based on the Unix csh
C shell
The C shell is a Unix shell that was created by Bill Joy while a graduate student at University of California, Berkeley in the late 1970s. It has been distributed widely, beginning with the 2BSD release of the BSD Unix system that Joy began distributing in 1978...

 language, but was extended to support the main features of the Macintosh GUI. It had simple commands to create menus, dialogs (prompts), and new shell windows. The cursor could be controlled, and MPW scripts or tools could easily be attached to a menu item. Command key shortcuts could be specified. Window size and location could be controlled. These features were popular in commercial production environments, where complicated build and packaging processes were all controlled by elaborate scripts.

The shell had some important differences from its Unix counterparts. For instance, the classic Mac OS had nothing comparable to Unix fork
Fork (operating system)
In computing, when a process forks, it creates a copy of itself. More generally, a fork in a multithreading environment means that a thread of execution is duplicated, creating a child thread from the parent thread....

, so MPW tools were effectively called as subroutines of the shell; only one could be running at any one time, and tools could not themselves run other tools.

Look and feel

Functionally, a worksheet is a cross between a text editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

 document and an xterm
Xterm
In computing, xterm is the standard terminal emulator for the X Window System. A user can have many different invocations of xterm running at once on the same display, each of which provides independent input/output for the process running in it .xterm originated prior to the X Window System...

 window. Each worksheet window is persistently bound to a file. The user may type anything anywhere in the window, including commands, which can be executed via the keyboard's Enter key; command output appears at the insertion point. Unlike an xterm window, an MPW worksheet is always in visual editing mode and can be freely reorganized by its user. Hence a worksheet can be purely a command script or purely a text document or a mixture of the two, an integrated document describing the history and state and maintenance procedures and test results of a software project. The commercial BBEdit
BBEdit
BBEdit is a proprietary text editor made by Bare Bones Software. It was originally developed for Macintosh System Software 6 and is now available for Mac OS X.BBEdit is marketed under the trademark slogan, "It doesn't suck."-History:...

 text editor retains a feature it calls "shell worksheets" on Mac OSX.

Other tools

MPW included a version of make. Its syntax was conceptually similar to that of Unix make, but it used a special 8-bit character for dependencies. More significantly, since the limitations of the shell precluded the make program from running tools itself, it had to work by composing a script of compile/link actions to be run, then delivering that to the shell for execution. While this was good enough most of the time, it precluded makefiles that could make on-the-fly decisions based on the results of a previous action.

Writing MPW tools

MPW included a set of standard C libraries sufficient for developers to build their own MPW tools. Many Unix utilities could be ported with little change. One point of difficulty was the Mac OS newline
Newline
In computing, a newline, also known as a line break or end-of-line marker, is a special character or sequence of characters signifying the end of a line of text. The name comes from the fact that the next character after the newline will appear on a new line—that is, on the next line below the...

 convention, which was different from Unix. Another was the pathname separator
Path (computing)
A path, the general form of a filename or of a directory name, specifies a unique location in a file system. A path points to a file system location by following the directory tree hierarchy expressed in a string of characters in which path components, separated by a delimiting character, represent...

, ":" in Mac OS, but many Unix utilities assumed "/". Many Unix utilities also assumed pathnames would not have embedded spaces, a common practice on Macs.

For a number of years, the GNU toolchain
GNU toolchain
The GNU toolchain is a blanket term for a collection of programming tools produced by the GNU Project. These tools form a toolchain used for developing applications and operating systems....

 included portability support for MPW as part of libiberty
Libiberty
GNU libiberty is a software library with a collection of subroutines used by various GNU programs.It was originally intended to be a sort of standard cross-platform library, thus enabling it to be linked by just saying "-liberty". The contents consisted of a variety of useful functions...

. This was used to support MPW-hosted cross-compilers used by General Magic
General Magic
General Magic was a company co-founded by Bill Atkinson, Andy Hertzfeld and Marc Porat that developed a new kind of handheld communications device they called a "personal intelligent communicator", which was a PDA precursor that stressed communications....

 and several other developers.

History

MPW was started in late 1985 by Rick Meyers, Jeff Parrish, and Dan Smith (now Dan Keller). It was going to be called the Macintosh Programmer's System, or MPS. (Notice that coincidentally the three last names start with MPS.) 'MPS ' has always been the creator signature of the MPW Shell as a result of this. Since MPW was to be the successor to the Lisa Workshop, they decided to rename it the Macintosh Programmer's Workshop.

Early contributors included Rick Meyers (project lead and MPW Shell command interpreter), Jeff Parrish (MPW Shell editor), Dan Smith (MPW Shell commands), Ira Ruben (assembler and many of the tools including Backup, PasMat, and more), Fred Forsman (Make, Print, SADE, and assembler macro processor), Al Hoffman (Pascal compiler), Roger Lawrence (Pascal and C compilers), Ken Friedenbach (linker), Johan Strandberg (Rez, DeRez, RezDet), Steve Hartwell (C libraries), and Dan Allen (MacsBug, editor). The Apple Numerics Group also contributed math libraries. During MPW's twilight years, Greg Branche supported MPW unofficially through the Apple MPW-dev mailing list.

MPW 1.0 was completed on September 24, 1986. A shell memory leak was fixed on October 10, 1986 and MPW 1.0.1 was born. MPW 2.0 was completed on July 20, 1987, and MPW 3.0 was done November 30, 1988. MPW 3.1, 3.2, and 3.3 came in the next few years. MPW 3.4 was completed July 14, 1995, and MPW 3.5 was done December 17, 1999. Work was being done on MPW 3.6 when work was halted in late 2001.

Legacy

MPW can still be used to develop for Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, but support is limited to Carbon applications for PowerPC
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

-based computers. To develop Mac OS X applications based on other technologies, one must use either Xcode
Xcode
Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS. Xcode 4.2, the latest major version, is available on the Mac App Store for free for Mac OS X 10.7 , and on the Apple Developer Connection website for free to registered developers Xcode is a suite of tools,...

 or another OS X compatible development environment. MPW also included a version control system called Projector; this has been superseded by Git
Git (software)
Git is a distributed revision control system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on...

, CVS
Concurrent Versions System
The Concurrent Versions System , also known as the Concurrent Versioning System, is a client-server free software revision control system in the field of software development. Version control system software keeps track of all work and all changes in a set of files, and allows several developers ...

 and Subversion and is no longer supported in Mac OS X.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK