Open Office contains 7.5 million lines of code, and produces 240
megabytes of executable code. It isn't just a large project;
it's a huge project.
Before you start porting something like this, you have to ask
yourself what kind of programmers you have. Old mac coders may
not know Unix, and vice versa. You need both. And you have to
ask yourself about your users. Do they want something with
typical Mac "fit and finish"?
Phase 1: Get it to compile. (Just treat Mac OS X as another
Unix)
Phase 2: Wean it away from X11. (Get it to run without an X
server.)
Phase 3: Adopt Aqua look and feel. (Make it behave like a Mac
application.)
Phase 1 (just getting it to compile) took a whole year. Key differences between BSD and Mac OS X that got in the way:
Mac OS X is evolving, so we had to keep up with changes to tool
behavior and interfaces, and not depend on undocumented features.
Next week, public beta of the X11 release for Darwin 6, Mac OS X 10.2. It's not available
for download till next week, but Ed gave out CDs to attendees of
the session.
It works, but is it done? It still has Unix interface
conventions, poor connectivity with other Mac OS X apps, sluggish
user interface. There's a lot more to be done to create helpful
installers and launchers to keep novices away from the shell and
provide extension mapping for the Finder. Good Mac applications
adopt the Aqua Human Interface Guidelines, they leverage Mac OS X
specific technologies, and interact well with other Mac OS X
applications.
Figuring out how to get there is the next challenge. Options:
Rewrite the core graphics layer
OpenOffice.org has a significant amount of user interface code
and user documentation, making a full rewrite difficult. the
existing graphics structure is broken into layers.
The chosen approach: port the core graphics layer.
The result: it still looks like Windows, but it no longer
requires X11 to run. Why is this better? Users don't need to
worry about installing X, performance is improved, etc. But it
still can be better. Controls are still drawn looking like X11
style controls. It looks like a Unix app, not a Mac OS X app.
To get that far, you need to rethink the whole UI. Use Aqua
controls, high quality icons, adopting sheets and drawers,
remove modality, etc.
Getting the look first -- if you take the approach of using a
cross platform widget set, you may already have the Aqua look,
but if you port the graphics layer first, you then need to port
the widgets as well.
The alternative is to use native controls directly. The
feasibility depends on the event handling and interaction between
widgets. So what we do is use native calls to draw the controls,
but do event handling and state changes in platform independent
widget code. This gets the program closer to the Aqua look,
adapts to changes in aqua, and there's no change in how the
widgets need to be used by other UI code.
The Appearance Manager provides functions to render controls and
parts of controls without needing to instantiate a full native
control. This allows widgets to be accessed from the platform
independent graphics layer through introducitng new calls, if we
retool the widgets to use these routines when running on Mac OS
X. The resulting code isn't pretty, but it works. And the users
don't care how the code looks.
More work remains, but the fact is, we've been able to make
enormous progress with just 2-3 people. It does seem possible to
undertake large Unix porting projects with involve user interface
and adapt them to Mac OS X. We have to finish adapting complex
controls to Aqua, and
To find out more, go to mac.openoffice.org. Drop by to help us
finish the Aqua port, help us test this out, find out more about
detailed porting strategies and platform pitfalls, and examine
the source code to help you in your own porting efforts.
Tim O'Reilly
is the founder and CEO of O'Reilly Media, Inc., thought by many to be the best computer book publisher in the world, and an
activist for open standards. O'Reilly Media also publishes online
through the O'Reilly Network and hosts
conferences on technology topics, including the O'Reilly Open Source
Convention, the O'Reilly Emerging Technology Conference, and the Web
2.0 Conference. Tim's blog, the O'Reilly Radar "watches the alpha
geeks" to determine emerging technology trends, and serves as a
platform for advocacy about issues of importance to the technical
community. For everything Tim, see tim.oreilly.com.
Comment on this weblog
You must be logged in to the O'Reilly Network to post a comment.
Showing messages 1 through 3 of 3.
-
Aqua is here!
2006-08-06 23:33:33
OPENSTEP
[Reply | View]
-
http://www.neooffice.org
2002-10-04 13:39:03
anonymous2
[Reply | View]
|
Showing messages 1 through 3 of 3.
|
Return to weblogs.oreilly.com.
Weblog authors are solely responsible for the content
and accuracy of their weblogs, including opinions they
express, and O'Reilly Media, Inc., disclaims any and
all liabililty for that content, its accuracy, and
opinions it may contain.
This work is licensed under a
Creative Commons License.
NeoOffice is finally done and is finally stable. It is totally possible to port Unix applications to Aqua, even if they are 8 millions line plus of C++ code!