Things Developers Should Know About Leopard

Things Developers Should Know About Leopard

Posted Sep 21, 2007 — 34 comments below Posted Sep 21, 2007 — 34 comments below

Leopard brings a lot of changes for Mac programmers. If you haven't been tuned in, here's a cheat sheet of some things you'll want to be aware of in the coming months and years. Xcode is getting major upgrades for Leopard. There are some high-level UI features like code highlighting and inline errors and warnings, but some of the bigger changes are refactoring support and Snapshots. The refactoring hits not just code but also bindings and such in NIB files. Snapshots work as a sort of low-tech version control that allow you to muck around with some experimental changes and then snap back if it isn't going to way you want.Interface Builder is a brand new application. It's a complete rewrite — at least from the user's perspective. After using this for more than a year, I can tell you I'm really excited about how much more polished the process of creating and editing user interfaces feels in Leopard. The app feels very solid, look gorgeous, and adds many things that users have long waited for. You can even add Core Animation effects visually from IB.There's a brand new performance measuring tool in Leopard called Xray. The user interface is clearly based on the GarageBand-ish model, with each "track" displaying a different aspect of performance, such as memory consumption, CPU load, etc.In case you haven't heard, Objective-C 2.0 is a major revamp of the language. There's garbage collection (opt-in), properties with synthesized accessors, a foreach language construct, dot-syntax support for accessors, and much more. It's a good thing.Several scripting languages are getting the official Cocoa language bridge treatment, including Ruby and Python. Some see this as "no need to learn Objective-C," which may be the case for many situations — but really I think developers should view this as another tool in their toolbox.Neither Ruby nor Python are drop-in replacements for Objective-C. Each languages has its strengths and weaknesses. But certainly official support for scripting languages makes it easier to get started writing Cocoa apps. For me, one of the most interesting uses of these bridges are creating Cocoa UIs on top of existing administration tools.Core Animation is not just for animation. Yes, it does 3D towers of album artwork very well, but this framework offers a completely different way to do graphics programming. A lot of the manual work you had to do in a custom view prior to Leopard can be handed off to a layer in Core Animation. Not only does this make the code simpler, but it also means the app can potentially be much more responsive because the rendering happens in a separate thread.There's much, much more say about this, but it will have to wait until Leopard ships. I really think this framework will be as significant to Leopard as Cocoa Bindings was to Panther or Core Data was to Tiger.Core Data now allows you to write your own custom stores with NSAtomicStore, which is something I think a lot of people have been waiting for. Core Data also now includes a formal process for migration and schema versioning.FSEvent offers file system notifications, which may save you from mucking around in kqueue events. As we know, Leopard will also be the start of a real push for resolution independence. Icons will need to go as high as 512x512 pixels, for example, and custom views should not assume that one pixel is one unit.This is all just an overview of a bunch of stuff that popped into my head. I've written a lot of Leopard code this year, reading about the new APIs practically every day for months, and I still don't feel like I have a complete picture of what's available. There are tons of new frameworks everywhere, and drastically upgrades to most of the existing frameworks. There's plenty to chew on here for a while.Also, the application frameworks now have full 64-bit support.