CAR on OS X: Getting Started
November 1st, 2003 | Published in Apple
This article is based on a piece that first appeared in the May/June 2003 issue of Uplink, which subsequent revisions.
Ok, so you’ve made the plunge. Either you’re a PC person who chose to buy a Mac (or had the decision made for) or you’ve always used Apples but not for computer-assisted reporting work. Now you can, thanks to OS X.
But how to start? First, you’ll be glad to know that OS X already comes with a bunch of CAR tools, including scripting languages like Perl and Python and the Apache Web server. It has the ability to connect to Windows and Linux machines, allowing you to share data easily.
That said, you’ll still need to install some applications in order to make your Mac a good CAR machine. In this article, I’ll review some of the best open source applications for OS X and tell you how to get them.
Installing many of these applications is simple and painless - most have installation wizards that guide you through the process. A few may require some post-installation tinkering under the hood, but not much. Since you’ll be using the Unix underpinnings of OS X, you should install the Developer’s Tools, available either on a CD that came with OS X or via Apple’s site. If you’re coming to OS X from a Unix or Linux environment (and even if you aren’t), you’ll find this Mac OS X for Geeks guide handy.
Office-type Suites
If you can’t live without Excel as your spreadsheet or Word as your word processor, don’t worry - both can run on OS X. You’ll just need to shell out some dough for the privilege.
But if you can live without Excel and Word, or want to use such files without forking over cash to Redmond, there are other options for OS X. Thanks to its Unix underpinnings, OS X runs many good applications, including OpenOffice, the open-source companion to Sun’s StarOffice suite.
OpenOffice comes with a word processor and spreadsheet, both of which can read and write to Microsoft formats. They are slower to start up on the Mac simply because they are built for the X Windows GUI, but they run just fine - albeit without some of OS X’s prettier touches. OpenOffice also sports a built-in ODBC client for connecting to remote databases, and while it doesn’t take advantage of all OS X has to offer - common keyboard shortcuts for opening files have to be defined, for example - each version of OpenOffice adds to the list of features.
Another open-source package is OpenOSX Office, which uses AbiWord as its word processor and Gnumeric as its spreadsheet. A popular graphics editor, the Gimp, is optional. A CD containing the basic apps is $40. Either suite works well, but both require that you first install and then start up Apple’s X Windows system, which is free at Apple’s site.
Databases
First the bad news: if you’ve been a PC user, none of the top PC database programs, such as Microsoft’s Access and FoxPro, will run on OS X without emulation software, and even then they are likely to be sluggish.
But that doesn’t mean users are out of luck. OpenOffice users can use an Access-like query window to query databases via ODBC (Open DataBase Connectivity), but that option requires some work to set up the connection. A Linux user is working on a tool that will read Access files, but installation is a complex procedure so far and requires several other Unix libraries. But if MDB Tools succeeds, it means you’ll be able to get data from Access files and export it to other databases that run on the Mac.
One of the more popular database managers for OS X is MySQL, a powerful open-source program that will be familiar to most FoxPro and SQL users, and pretty easy to pick up for others. Many of MySQL’s powerful features can be accessed using the terminal’s command line, but OS X developers have created some nice front-ends to make things even easier.
My favorite is CocoaMySQL, a freeware program that not only allows users to write and save SQL queries but also has an Access-like filter function. Its tabbed interface makes it easy to switch back and forth between tasks like adding a field to a table and running queries. It can import data from delimited text files or XML files. (Why CocoaMySQL? One of the two main programming languages for OS X applications is Cocoa. The other is called Carbon.)
There are several commercial applications that provide front-ends to MySQL, often with loads of features including importing and exporting options that should meet most users’ demands. These programs range in cost from $99 to $299, depending on the features.
Another option is to administer MySQL through a Web browser using PHPMyAdmin, another open source program that requires the Apache Web server and some fine-tuning to set up. This is a good solution if you are working with smaller datasets or want to make Web access an important part of your database. OpenJaguar has created a file combining MySQL, PHP and Apache with good instructions for downloading and installation.
Importing data into MySQL is even easier on the Mac than a PC because the best import utility is via the command line, and OS X allows you to drag and drop file names and locations between folders and the terminal, saving plenty of keystrokes. MySQL’s biggest advantage over other database programs is its speed: queries that take minutes on SQL Server or Access take seconds in MySQL.
Another database that runs well on OS X is PostgreSQL, and it also has several open-source front ends available. Like MySQL, there are Mac downloads that combine PostgreSQL with Apache and other open-source programs.
Other Utilities
Mapping fans don’t have much reason to switch to OS X yet, but an open-source GIS program called GRASS can be run under X Windows on the Mac. Still, it’s hardly a substitute for more refined programs like ArcView at this point.
OS X’s Unix base makes it a great platform for scripting languages. Perl and Python come built-in, along with a host of Unix utilities like grep and curl. PHP works fine, too. And there’s always AppleScript, which has several new development tools for OS X. Apple, along with independent developers, have put together installation packages for most of these languages that rely on a GUI rather than the command line. But you always have the option of compiling from source.
One of OS X’s features, called Rendevous, enables users on a network to share date without much trouble, and its technology can be built into other applications. SubEthaEdit is a text editor designed for editing programming code, but it can be used as a general text editor by more than one user simultaneously (each user is delineated by a different color in the text). Oh yes, it’s free.
Other developers have put Apple interfaces over Unix utilities like grep, a powerful search ability. GrepArtee lets you plug in an expression and choose the directories and/or files you want to search, and displays the results in the same window. FileMerge allows you to compare two documents and find the differences between them.
Internet
Initially, Web browsers for OS X disappointed me. Microsoft’s Internet Explorer for Mac (5.2) isn’t nearly as good as the PC version - and won’t be improved upon, but Apple recently introduced a new browser, Safari, that works quite well. It has tabbed browsing, a nice auto-fill feature and is based on the Linux Konqueror browser. You can also install other popular browsers such as Netscape, Mozilla or Opera.
E-mail applications for the Mac abound: Eudora still has a significant base of users, Microsoft as Outlook and Entourage, and the makers of BBEdit have MailSmith. Apple has its own application (Mail.app) that works fairly well, and will have the ability to follow message threads in the next version of OS X.
Fans of WS-FTP will have little trouble using Transmit ($39) or can opt for RBrowserLite, a free program. If you read websites using their RSS feeds, NetNewsWire is one of the best readers out there, and doubles as a weblog editor to boot ($29). Or you can try AmphetaDesk, Radio UserLand or a number of other RSS readers that work on OS X.
But Can I?
Connect to Windows PCs? Yes, absolutely. VPN support for OS X was slow-going at first, but is improving. But the system does recognize Windows volumes without any trouble, and you can query data from SQL Server. My desktop PC now is little more than a server for my music and data files, which I can work on from my PowerBook.
Use my favorite Linux or Unix apps? Usually, yes, although the degree of difficulty in getting them to run varies. That’s because while many Linux apps have been ported to run on OS X (there are several large projects devoted to the task), others have not, and thus require you to compile them from source and fix any issues you might run across. In the case of MySQL, complete installation packages for the Mac usually take a little longer to develop and thus lag slightly behind the bleeding edge versions.
The Final Word
Short of installing a Linux system on a PC running Windows, OS X probably offers the best of the various operating systems in terms of design and functionality. Certainly there are more well-known applications for Windows at the moment, and Linux offers a lot of attractive options, but the presence of Unix in OS X has closed the gap, and made doing CAR on a Mac an easy choice.