Following the Apple Design MantraCheckout offers an impressive list of features, including inventory management, support for any form of currency, extensive reporting, and support for barcode scanners, receipt printers, and cash drawers. Moreover, Checkout was painstakingly designed to make even the most complex task simple and even fun to use. Checkouts workflow is based on software developers Koen Boks and Dirk Stoops own experiences working for a Mac reseller in Amsterdam. Starting with pencil and paper sketches, the Apple Human Interface Guidelines, and previous work on Mac OS X applications, Bok, Stoop, and designers Hauser and Hugo Van Heuven worked to apply what the four call the Apple design mantra to a small business application. As Hauser explains, Apple provides awesome resources for developers and designers new to the Mac. The documentation explains how to make your application fit into the platform. Van Heuven adds, Each of us has a background in visual arts. We found Apples interface guidelines really sensible. And Apple provides Cocoa, which enabled us to make the program what it is now. Theres really nothing like Cocoa on Windows. The Cocoa frameworks provide infrastructure for windowed applications, including copy-and-paste, drag-and-drop, and undo; seamless internationalization and Unicode text; tools for printing, imaging, and multimedia; and a vast library of extensible user interface objects. Stoop explains that Checkouts interface was built entirely using Cocoa. A truly remarkable part of Cocoa, Dirk says, is its beautiful AppKit classes, which we eagerly and easily subclass to create custom controls where needed. Ease of LocalizationAnother remarkable feature of Mac OS X development is the ease with which developers can localize their software into multiple languages. Stoop says, Its almost effortless. We generate all of Checkouts localization resources at build-time and dynamically resize views to fit oversized strings. Checkout is currently one of the very few POS applications that can show any native currency, complete with the appropriate decimal and thousands separators. And, as far as we know, Checkout is the only POS software available in Catalan. Thanks to Cocoa, we actually get a good enough return on investment to localize for really small language regions. The use of Cocoa also allows Checkout to sync its customer list with Address Book in its customer relationship management (CRM) interface and to interact with the specialized peripherals that are commonly used in retail. Talking to HardwareAn efficient retailer typically assigns barcodes to each piece of merchandise to track incoming and outgoing inventory and to manage prices centrally in a computer. Checkout supports a wide variety of hardware, and it automatically detects the type of receipt printer. It interfaces with USB barcode scanners, including any keyboard-emulating USB scanner. And with the addition of an electronic cash drawer, Checkout and a Mac can entirely replace a legacy cash register. As Bok explains, the team was somewhat anxious about peripherals, at least at first. Bok says, But the work turned out to be a breeze, as long as the hardware manufacturer supplied well-documented protocols. Those hooked into Cocoa easily. Not all hardware is compatible with the Mac, but the best quality peripherals, the ones we would use in our own store, work well. Star Micronics makes some really nice receipt printers with great CUPS drivers, and the company sells some cash drawers we recommend. Symbol and Axicode have at least six barcode scanner models that work with the Mac. Using PyObjC to Write a Native Mac OS X Application in PythonWhile Checkout is clearly a Cocoa application, you might be surprised to learn that under the covers, it is written in Python. Python is a modern, object-oriented, interpreted scripting language available as open source. Python is part of Mac OS X, and a freely available library called PyObjC—Python to Objective C—allows developers to write native Mac OS X applications solely in Python. Bok explains how this combination contributed to the development efforts. Using Python and the PyObjC bridge gives you the best of all worlds—Python and Cocoa, Koen says. Python is great for unit testing and agile development. Because Checkout manages critical business information, we swear by writing unit tests for everything that even comes close to any financial data. Koen continues, And since Python is interpreted and not compiled, launching a debug session takes seconds. You can make a modification and see the effect of the change immediately. Dirk has more reasons for liking Python, including its open-source nature and all the things you can add to it. He adds, Python uses automatic reference counting (similar to garbage collection), meaning fewer lines of code—fewer than Objective C and plain C. Plus, you can also build on an enormous number of great Python libraries to save work. For example, Checkout relies on open-source Python libraries to connect to the underlying database. And although its more of a personal preference, Python syntax is very readable and easy to maintain. The performance of PyObjC applications is excellent. Dirk explains, Python is interpreted, so its slower, by nature, than a compiled language like Objective C. But the speed of the Intel Macs really counters the difference. Checkout itself is a Universal application. It screams on Intel Macs. In fact, since most of the heavy lifting in Checkouts interface is done by Apples highly optimized drawing code, any sluggishness is negligible. And in some cases, Python is even faster if you use a framework implemented in raw C, such as cPickle, which serializes and unserializes Python objects. However, in a small number of cases, user interface object subclasses were converted to Objective C. A Model to EmulateCheckout is Madebysofas first commercial application, but youd never guess its a freshman outing. The software is polished and robust and well integrated with many Mac OS X services. Not content to rest, however, the team continues to pursue innovations. Bok says, Were focused on improving Checkout. We want to add some of the most requested features and want to expand Checkout to suit larger stores. We also want to continue to refine the user interface and add Leopard technologies. We want the entire interface to be resolution independent. The latter enhancement might seem strange for a POS system, but since were an interface design shop, it makes a lot of sense to master the technique. There are lots of cool new features in the pipeline, which we cannot say too much about right now, but keep an eye on our website around the launch of Leopard. The Madebysofa staff have made the Mac its platform of choice. Bok advises that the Mac is the right platform, the one where real innovation is happening now. Stoop agrees, and offers this perspective gained by their experience: Making your application behave like a good Mac OS X citizen can take a lot of work, especially when you run into a situation where none of the standard controls fit your needs. There are a lot of tiny details in Aqua that can make or break the user experience. Its very satisfying to get a behavior right, and thankfully, after some practice, it gets easier and easier to implement those wild ideas. Finally, the Madebysofa team decided to become ADC Select members and attend seminars that helped them work through any problems. Stoop advises, Get to know Apple. Weve been lucky to meet with several great people there. Apple has helped us learn about new technology, has tracked down bugs we ran into, and provided assistance in countless other ways. Im convinced that Apple would do the same for any developer who is passionate about building beautiful Mac software. Bok says that Madebysofa has plans to create even more Mac applications, either solely or in cooperation with others. We've teamed up with some great Mac developers, and you'll see the results soon. For more information about Checkout, see the Madebysofa website. |
|