MacApp

Last updated

MacApp is the object oriented application framework for Apple Computer's discontinued classic Mac OS. Released in 1985, it transitioned from Object Pascal to C++ in 1991's version 3.0 release, which offered support for much of System 7's new functionality. MacApp was used for a variety of major applications, including Adobe Photoshop [1] and SoftPress Freeway.[ citation needed ] Microsoft's MFC and Borland's OWL were both based directly on MacApp concepts.

Contents

Over a period of ten years, the product had periods where it had little development followed by spurts of activity. Through this period, Symantec's Think Class Library/Think Pascal had become a serious competitor to MacApp, offering a simpler model in a much higher-performance integrated development environment (IDE).

Symantec was slow to respond to the move to the PowerPC platform in the early 1990s, and when Metrowerks first introduced their CodeWarrior/PowerPlant system in 1994, it rapidly displaced both MacApp and Think as the primary development platforms on the Mac. Even Apple used CodeWarrior as its primary development platform during the Copland era in the mid-1990s.

MacApp had a brief reprieve between 2000 and 2001, as a system for transitioning to the Carbon system in MacOS X. [2] However, after demonstrating a version at Worldwide Developers Conference (WWDC) in June 2001, all development was cancelled that October.

History

Pascal versions

MacApp was a direct descendant of the Lisa Toolkit, Apple's first effort in designing an object-oriented application framework, led by Larry Tesler. The engineering team for the Toolkit included Larry Rosenstein, Scott Wallace, and Ken Doyle. Toolkit was written in a custom language known as Clascal, which added object-oriented techniques to the Pascal language. [3] [4]

Initially, development for the Mac was carried out using a cross-compiler in Lisa Workshop. As Mac sales effectively ended Lisa sales, an effort began to build a new development platform for the Mac. Lisa Programmer's Workshop became in 1985 the Macintosh Programmer's Workshop, or MPW. As part of this process, Clascal was updated to become Object Pascal and Lisa Toolkit offered design notes for what became MacApp. [4]

Writing a Mac program without an application framework is not an easy task, but at the time the object-oriented programming field was still relatively new and considered somewhat suspect by many developers. Early frameworks tended to confirm this suspicion, being large, slow, and typically inflexible.

MacApp was perhaps the first truly usable framework in all meanings of the term. Compiled applications were quite reasonable in terms of size and memory footprint, and the performance was not bad enough to make developers shy from it. Although "too simple" in its first releases, a number of follow-up versions quickly addressed the main problems. By this point, around 1987, the system had matured into a useful tool, and a number of developers started using it on major projects.

MacApp 2.0 was released in 1989. Among the improvements was a simplification of some of the UI element interactions, and support for Multifinder. [5] As Apple announced it was dropping MPW Pascal support in 1992, [6] this version didn't get updated, not even with System 7 support, and Pascal developers were left out on their own to port MacApp 2.0 to the PowerPC. [6] [7]

C++ versions

By this point, in the late 1980s, the market was moving towards C++, and the beta version of Apple C++ compiler appeared in 1989, around the MacApp 2.0 release. [5] At the same time, Apple was deep in the effort to release System 7, which had a number of major new features. The decision was made to transition to an entirely new version of MacApp, 3.0, which would use C++ in place of Object Pascal. [8] This move was subject to a long and heated debate between proponents of Object Pascal and C++ in the Usenet and other forums. Nevertheless, 3.0 managed to garner a reasonable following after its release in 1991, even though the developer suite, MPW, was growing outdated. Apple then downsized the entire developer tools group, leaving both MacApp and MPW understaffed.

One of the reasons for this downsizing was Apple's long saga of attempting to introduce the "next great platform" for development, almost always in the form of a cross-platform system of some sort. Their first attempt was Bedrock, a class library created in partnership with Symantec that ran on the Mac and Windows, which died a lingering death as both parties eventually gave up on working with the other. One of the reasons for their problems was the creation of OpenDoc, which was itself developed into a cross-platform system that competed directly with Bedrock. There were some attempts to position Bedrock as an OpenDoc platform, [9] [10] but nothing ever came of this.

While these developments were taking place, MPW and MacApp were largely ignored. It was more important to put those developer resources into these new projects to help them reach the market sooner. But when Bedrock failed and OpenDoc found a lukewarm reception, the Mac was left with tools that were now almost a decade old and could not compete with the newer products from third parties. Through the early 1990s competing frameworks grew into real competitors to MacApp. First Symantec's TCL garnered a following, but then Metrowerks' PowerPlant generally took over the entire market.

Lingering death

The core developers of MacApp continued to work on the system at a low activity level throughout the 1990s. When all of Apple's "official" cross-platform projects collapsed, in late 1996 the team announced that they would be providing a cross-platform version of MacApp.

Soon after, Apple purchased NeXT and announced that OpenStep would be Apple's primary development platform moving forward, under the name Cocoa. Cocoa was already cross-platform, at that time having already been ported to about six platforms, and was far more advanced than MacApp. This led to strong protests from existing Mac programmers protested that their programs were being sent to the "penalty box", effectively being abandoned.

At WWDC'98, Steve Jobs announced that the negative feedback about the move to Cocoa was being addressed through the introduction of the Carbon system. Carbon would allow existing Mac programs to run natively under the new operating system, after some conversion. Metrowerks announced they would be porting their PowerPlant framework to Carbon, but no similar announcement was made by Apple regarding MacApp.

Through this period there remained a core of loyal MacApp users who grew increasingly frustrated at Apple's behaviour. By the late 1990s, during the introduction of Cocoa, this had grown to outright dismissal of the product. Things were so bad that a group of MacApp users went so far as to organize their own meeting at WWDC '98 under an assumed name, in order to avoid having Apple staffers refuse them a room to meet in.

This ongoing support was noticed within Apple, and in late 1999 a "new" MacApp team, consisting of members who had worked on it all along, was tasked with releasing out a new version. Included was the new Apple Class Suites (ACS), a thinner layer of C++ wrappers for many of the new Mac OS features being introduced from OpenStep, and support for building in Project Builder. MacApp 3.0 Release XV was released [11] on 28 August 2001 to the delight of many. However, in October the product was killed once again, this time forever, and support for existing versions of MacApp officially ended.

The Carbon-compliant PowerPlant X did not ship until 2004, and today Cocoa is almost universal for both MacOS and iOS programming.

MacApp today

MacApp is being kept alive by a dedicated group of developers who have maintained and enhanced the framework since Apple stopped supporting it in 2001. MacApp has been updated to fully support Carbon Events, Universal Binaries, Unicode Text, MLTE control, DataBrowser control, FSRefs, XML parsing, Custom Controls, Composite Window, Drawer Window, HIView Window and Custom Windows. MacApp also has C++ wrapper classes for HIObject and HIView. Also the Pascal version, based mainly on MacApp-2, has been ported to Mac OS X and Xcode. It features long Unicode filenames and streamed documents with automatic byte-swapping.

MacApp supports the Xcode IDE. In fact at WWDC 2005, after Apple announced the transition to Intel CPUs, it took a single developer 48 hours to update MacApp and the MacApp example apps to support Universal Binaries.

Description

This description is based on MacApp 3.0, which had a more advanced underlying model than the earlier 2.0 and differed in many significant ways.

The Mac OS itself has a very simple event handing system. The event structure passed from the operating system to the application has only an event type like "keypress" or "mouseclick", and details of its location and the modifier keys being held down. It is up to the application to decode this simple information into the action the user carried out, for instance, clicking on a menu command. Decoding this could be difficult, running through lists of on-screen objects and checking if the event took place within their bounds.

MacApp provided a solution to this problem using the command pattern, in which user actions are encapsulated in objects containing event details, and then sent to the proper object to carry them out. The logic of mapping the event to the "proper object" was handled entirely within the framework and its runtime, greatly decreasing the complexity of this task. It is the role of MacApp's internal machinery to take the basic OS events, translate them into semantically higher-level commands, and then route the command to the proper object.

Not only did MacApp relieve the author of having to write this code, which every program requires, but also as a side-effect this design cleanly separated code into commands, user-facing actions, and their handlers, the internal code that did the work. For instance, one might have commands for "Turn Green" and "Turn Red", both of which are handled by a single function, ChangeColor(). A program that cleanly separated commands and handlers was known, in Apple parlance, factored.

Factoring of a program was particularly important in later versions of the Mac OS, starting with System 7. System 7 introduced the Apple Events system, which expanded the original Mac OS's event system with a much richer one that could be sent between applications, not just from the OS to a particular application. This was combined with the AppleScript system which allowed these Events to be generated from scripting code. In MacApp 3.0, Apple Events were decoded into the same commands as if they had been initiated by direct user actions, meaning that the developer didn't have to write much, if any, code to directly handle Apple Events. This was a major problem for developers using earlier systems, including MacApp 2.0, which had no such separation and often led to Apple Event support being left out.

In keeping with its role as an application framework, MacApp also included a number of pre-rolled objects covering most of the basic Mac GUI—windows, menus, dialogs and similar widgets were all represented within the system. Unfortunately, Apple typically supplied lightweight wrappers over existing internal Mac OS code instead of providing systems that were usable in the "real world". For instance, the TTEView class was offered as the standard text editor widget, but the underlying TextEdit implementation was severely limited and Apple itself often stated it should not be used for professional applications. As a result, developers were often forced to buy add-on objects to address these sorts of needs, or roll their own. The lack of a set of professional quality GUI objects can be considered one of MacApp's biggest problems.

These problem has been addressed with the release of MacApp R16. MacApp R16 uses standard Carbon controls for all MacApp GUI objects. For instance, Carbon introduced the Multilingual Text Engine (MLTE) for full Unicode text and long-document support. In R16, the original TTEView class has been superseded by the TMLTEView, which uses the MLTE control.

Notable Users

Adobe Photoshop was originally written with MacApp 1.1.1, in Object Pascal, and later ported to C++ and MacApp 3.0 for Photoshop 2.5. After MacApp cancellation by Apple, maintenance was taken over internally by the Photoshop development team, ported to PowerPC, and transformed to be shared with the Windows platform port. [1]

Related Research Articles

macOS Operating system for Apple computers

macOS, originally Mac OS X, previously shortened as OS X, is an operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and laptop computers, it is the second most widely used desktop OS, after Microsoft Windows and ahead of all Linux distributions, including ChromeOS.

<span class="mw-page-title-main">OpenStep</span> Defunct object-oriented application programming interface specification

OpenStep is an object-oriented application programming interface (API) specification that was developed by NeXT Computer. It provides a framework for building graphical user interfaces (GUIs) and developing software applications. OpenStep was designed to be platform-independent, allowing developers to write code that could run on multiple operating systems, including NeXTSTEP, Windows NT, and various Unix-based systems. It has influenced the development of other GUI frameworks, such as Cocoa for macOS and GNUstep.

Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS.

Carbon was one of two primary C-based application programming interfaces (APIs) developed by Apple for the macOS operating system. Carbon provided a good degree of backward compatibility for programs that ran on Mac OS 8 and 9. Developers could use the Carbon APIs to port (“carbonize”) their “classic” Mac applications and software to the Mac OS X platform with little effort, compared to porting the app to the entirely different Cocoa system, which originated in OPENSTEP. With the release of macOS 10.15 Catalina, the Carbon API was officially discontinued and removed, leaving Cocoa as the sole primary API for developing macOS applications.

The history of macOS, Apple's current Mac operating system formerly named Mac OS X until 2011 and then OS X until 2016, began with the company's project to replace its "classic" Mac OS. That system, up to and including its final release Mac OS 9, was a direct descendant of the operating system Apple had used in its Mac computers since their introduction in 1984. However, the current macOS is a UNIX operating system built on technology that had been developed at NeXT from the 1980s until Apple purchased the company in early 1997.

<span class="mw-page-title-main">OpenDoc</span> Software componentry framework standard

OpenDoc is a defunct multi-platform software componentry framework standard created by Apple in the 1990s for compound documents, intended as an alternative to Microsoft's proprietary Object Linking and Embedding (OLE). It is one of Apple's earliest experiments with open standards and collaborative development methods with other companies. OpenDoc development was transferred to the non-profit Component Integration Laboratories, Inc., owned by a growing team of major corporate backers and effectively starting an industry consortium. In 1992, the AIM alliance launched between Apple, IBM, and Motorola—with OpenDoc as a foundation. With the return of Steve Jobs to Apple, OpenDoc was discontinued in March 1997.

In computer programming, an application framework consists of a software framework used by software developers to implement the standard structure of application software.

<span class="mw-page-title-main">WebObjects</span> Java web application server and framework originally developed by NeXT Software

WebObjects is a discontinued Java web application server and a server-based web application framework originally developed by NeXT Software, Inc.

<span class="mw-page-title-main">Xcode</span> IDE including tools for developing software for Apple platforms

Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, tvOS, and visionOS. It was initially released in late 2003; the latest stable release is version 15, released on September 18, 2023, and is available free of charge via the Mac App Store and the Apple Developer website. Registered developers can also download preview releases and prior versions of the suite through the Apple Developer website. Xcode includes command-line tools that enable UNIX-style development via the Terminal app in macOS. They can also be downloaded and installed without the GUI.

The Worldwide Developers Conference (WWDC) is an information technology conference held annually by Apple Inc. The conference is usually held at Apple Park in California. The event is usually used to showcase new software and technologies in the macOS, iOS, iPadOS, watchOS, and tvOS families as well as other Apple software; new hardware products are sometimes announced as well. WWDC is also an event hosted for third-party software developers that work on apps for iPhones, iPads, Macs, and other Apple devices. Attendees can participate in hands-on labs with Apple engineers and attend in-depth sessions covering a wide variety of topics.

<span class="mw-page-title-main">Macintosh Programmer's Workshop</span> Software development package for the Classic Mac OS

Macintosh Programmer's Workshop (MPW) is a software development environment for the Classic Mac OS operating system, written by Apple Computer. 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 available for purchase as part of Apple's professional developers program, but Apple made it a free download after it was superseded by CodeWarrior. On Mac OS X it was replaced by the Project Builder IDE, which eventually became Xcode.

CodeWarrior is an integrated development environment (IDE) published by NXP Semiconductors for editing, compiling, and debugging software for several microcontrollers and microprocessors and digital signal controllers used in embedded systems.

Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods.

Bedrock was a joint effort by Apple Computer and Symantec to produce a cross platform programming framework for writing applications on the Apple Macintosh and Microsoft Windows platforms. The project was a failure for a variety of reasons, and after delivering a developer preview version the project was abandoned in late 1993.

<span class="mw-page-title-main">Rhapsody (operating system)</span> Apple operating system

Rhapsody is an operating system that was developed by Apple Computer after its purchase of NeXT in the late 1990s. It is the fifth major release of the Mach-based operating system that was developed at NeXT in the late 1980s, previously called OPENSTEP and NEXTSTEP. Rhapsody was targeted to developers for a transition period between the Classic Mac OS and Mac OS X. Rhapsody represented a new and exploratory strategy for Apple, more than an operating system, and runs on x86-based PCs and on Power Macintosh.

<span class="mw-page-title-main">Metrowerks</span>

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. In 1999 it was acquired by Motorola and in 2005 it was spun-off as part of Freescale, which continues to sell these tools. In 2015, Freescale Semiconductor was absorbed into NXP.

<span class="mw-page-title-main">Architecture of macOS</span> Layers of the operating system

The architecture of macOS describes the layers of the operating system that is the culmination of Apple Inc.'s decade-long research and development process to replace the classic Mac OS.

Think C, originally known as LightSpeed C, is an extension of the C programming language for the classic Mac OS developed by THINK Technologies, released first in mid-1986. THINK was founded by Andrew Singer, Frank Sinton and Mel Conway. LightSpeed C was widely lauded when it was released, as it used the Macintosh user interface throughout and was extremely fast. It quickly became the de facto C environment on the Mac, and the related Think Pascal quickly did the same for Object Pascal development.

PowerPlant is an object-oriented GUI toolkit, application framework and set of class libraries for the Classic Mac OS, created by Metrowerks. The framework was fairly popular during the late Classic Mac OS era, and was primarily used with CodeWarrior. It was designed to work with a GUI editor called Constructor, which was primarily a resource editor specializing in UI elements. Constructor used several custom resource types, 'PPob', 'CTYP', and Mcmd. Later it was ported to also support MacOS X development with a single code base.

References

  1. 1 2 Mark, Dave (December 1997). "Sean Parent: The Photoshop Development Process". MacTech . Vol. 13, no. 12. pp. 42–44.
  2. Turner, Mark (March 2001). "Carbon: An Essential Element of MacOS X". MacTech . Vol. 17, no. 3. pp. 58–61.
  3. Williams, Gregg (December 1984). "Software Frameworks". Byte . Vol. 9, no. 13. pp. 124–127, 394–410.
  4. 1 2 Loeb, Laurence H. (December 1988). "Program Extenders". Byte . Vol. 13, no. 13. pp. MAC 53-MAC 60.
  5. 1 2 Poole, Lon (April 1989). "C++ and MacApp 2.0". Macworld . Vol. 5, no. 4. p. 91.
  6. 1 2 Arnold, Brian; McCarthy, Guy (November 1995). "MacApp Pascal Rides again". MacTech . Vol. 11, no. 11. pp. 30–31.
  7. Arnold, Brian (February 1996). "MacApp 2 for PowerPC in Object Pascal". MacTech . Vol. 12, no. 2. pp. 25–32.
  8. Knepper, Chris (February 1991). "Approaching MacApp 3.0". MacTech . Vol. 5, no. 2.
  9. Damore, Kelley; Quinlan, Tom (December 6, 1993). "Bedrock not as solid as Apple originally planned". InfoWorld . Vol. 15, no. 49. p. 8.
  10. Daly, James (December 20, 1993). "Apple, Symantec rethink role Bedrock will play". Computerworld . Vol. 27, no. 51. p. 69.
  11. "New Mac OS X Related Releases". MacTech . Vol. 17, no. 2. February 2001. p. 24. Mentions MacApp 15d3 with some of the features.