Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A Visual Guide to Creating an Embeddable Framework for Mac OSX (intridea.com)
29 points by renaebair on Dec 28, 2010 | hide | past | favorite | 4 comments


On a semi-unrelated topic... A while ago (December 2008) I was playing with writing games. When I wanted to release the games I found that many computers did not have SDL installed so I've had to compile my own binary universal frameworks. (Prowling through the net the only copies I could find at the time were all for the PPC architecture.)

Anyway, if you require those frameworks for your own use you can find them at https://github.com/meric/macosx_sdl_universal

Maybe it'll save you a couple of hours. :)


I might be able to use some advice on this topic... mind sending me an email? I have a few questions about this.


Now that we've got a handle on what frameworks are let's set about building one.

Sorry, but there was no explanation of a framework, just several bullet points about features and capabilities. Framework is a term that's long been in use in programming. It could mean a variety of things. Exactly what is an OS X framework, and how does it accomplish having those features?


Whereas a dynamic library is a single file, a Mac OSX framework is a directory with a specific hierarchy that gives you flexibility in versioning and sharing of common resources.

If I write an RSS parser framework and embed it in an app, when that app is installed it will be put into /Library/Frameworks. If I then open source that framework and somebody else embeds it in their app, it is guaranteed that it will be loaded exactly once. In this respect it is like a dynamic library.

Where it differs however is that multiple versions of that library can live inside the same framework. So if I make substantial improvements to the library, up the version number and embed it, it will continue to live inside that same framework directory and will share the same common resources. OSX recognizes that while these libraries are not the same, they are related.

If you're running on OSX, check out /Library/Frameworks to see what frameworks external applications have installed and how they've organized their resources. Or look in /System/Library/Frameworks for what comes installed by default.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: