Introduction to X-Code
February 17th 2004
Equatorial Hotel, Kuala Lumpur
This was organised by Apple Malaysia, with speakers brought in from
Singapore. It started off mainly as a marketing talk with regards to
Apple's offerings to developers, and of course, was very Panther
specific (OS X 10.3).
A bit about X-Code:
- It is based on gcc 3.3.
- It has an iTunes styled interface; so it's beautiful. It has the
Fast Search capability.
- Has predictive compile
technology - it compiles bits and pieces of the code while you're
typing it in, to save time.
- Distributed compiles exist - the technology is based on distcc
and is nothing new. It won't interface with other distcc compliant
machines because you need Rendezvous to be working and setup; so no
chance of having a cross-compiled build working. There is no mention of
whether ccache or something similar is being used.
- Zero Link is some marketing hype - it only links the objects
needed to launch the application. Any good compiler can do that.
- Fix & Continue - allows you to make changes to your code
while the program is running. Andrew Tridgell of Samba fame has talked
about something similar in his linux.conf.au 2004 talk titled "A Tour
of my junkcode directory". This is a great tool for debugging, and
certainly improves productivity.
- Can import CodeWarrior projects, if you used it before. It's not
faster than CodeWarrior unless the distributed compiles are being made
use of.
- Built in support for CVS and some commercial offering from
Perforce.
- Project Builder: had a good GUI to the existing Unix tools that
Apple provides.
- Interface Builder: Build's Aqua compliant UI's, and supports
Carbon/Cocoa. The Web kit allows anyone to build a web browser without
code, just via drag & drop. It's dead easy to hook in with Safari
for instance.
- Jar Bundler: utility to package Java applications (Aqua-fied),
and make it executable via one-click; even get a funky icon to work
with it.
- Video profiling tools for OpenGL, driver monitor, and Quartz-wm
debugging.
- Desiging a calculator with the Interface Builder and Xcode seems
easier to build applications than Glade-2 even. Like all good demos,
something was borked; revert to a saved file of course!
Other Apple-isms:
- Cocoa: an object-oriented system framework. Can program in Java,
AppleScript or Objective-C. You save time using Cocoa as the system
provides all the low-level hooks.
- Carbon: provides easy migration of existing System 8 or System 9
code towards OS X. Uses C/C++, and has access to the core services that
Cocoa provides too.
- In terms of Java, the GUI interface supports Swing/AWT. Cocoa's
applications make use of Apple's extension to the JDK - not that this
extension will break exsiting Java applications. The Aqua-fied Java
apps will run only on Mac OS X; it should be noted that Java is
referred to as a "1st class citizen" in OS X terms. That's why Java
apps can be made to look like native apps.
- Notepad is a complete Swing based app, but you get the Aqua look
& feel when running under Mac OS X (look under the Xcode examples,
Java, for a whole bunch of stuff).
- The Notepad.jar looks like a regular
.jar file. The icon is that of a jar file. Jar Bundler will allow you
to package a Jar file. Jar Bundler crashed (with a similar message
like XP's crash message that tells you to report the problem).
Apple is surviving because they're
looking at a niche market – very unique and innovative with the
product.
Colin Charles
<byte@aeon.com.my>, ©
1996-2004