Frameworks or libraries
Frameworks or libraries
- Subject: Frameworks or libraries
- From: Christian Mike <email@hidden>
- Date: Wed, 11 Jul 2001 16:19:44 -0500
Our department writes a lot of applications that are only used in-house . We
currently develop for Mac OS 9.x using MPW and Windows NT using Microsoft's
Developer Studio in Visual C++. We are now looking at porting this whole
mess to Mac OS X and Cocoa. I need some help (or pointers to documentation)
on how to set this up.
Most of the code we use is about 80% common between all applications. That
80% is split about 50-50 between common C code and platform-specific user
interface code. The remaining 20% is custom tailored for each application.
This looks something like:
1.) Platform specific GUI
2.) Cross platform common C utility routines
3.) Application Specific routines
Currently on the PC side, item 1 is a Windows EXE that contains the main
thread. Items 2 and 3 are built as DLLs. You have to go through some back
flips to get each one to build before the others exist because they are
heavily cross linked. A stub application DLL exists that contains all of the
item 3 entry points to make everyone happy. To tailor each application, you
simply create a new item 3 DLL and drop it in place of the stub DLL.
On the Mac side, items 1 & 2 are static libraries. The GUI library contains
main( ). To build the final product, item 3 is linked against the first two
to create one application that contains all of the code and resources. You
don't have the cross-linking problem here.
Now I need to make all of this happen under Mac OS X and Cocoa. I am a
little at a loss as to where to start. I have several questions, and the
answers to some of them may make other questions meaningless.
Q1.) Is it better to implement this as static libraries (with one final
large application), independent frameworks (with item 3 built against the
other two), or something else?
Q2.) Items 1 & 3 will contain NIBs. Where should the "main" exist?
Q3.) How do you create a static library (or dynamic for that matter) library
using the Project Builder?
Q4.) Does the problem with cross linking things with pieces that don't exist
yet exist in this model?
Q5.) Does Apple have any documentation about this type of thing?
Thanks for any help that you can give. I'm sure after these questions are
answered, I'll be back for more info.
Michael Christian
Thomson multimedia Inc.