Re: Modules in Objective-C like e.g. OSGi-Bundles in Java
Re: Modules in Objective-C like e.g. OSGi-Bundles in Java
- Subject: Re: Modules in Objective-C like e.g. OSGi-Bundles in Java
- From: Jonathan deWerd <email@hidden>
- Date: Thu, 7 Aug 2008 17:56:15 -0600
On Aug 7, 2008, at 5:31 PM, Lars Sonchocky-Helldorf wrote:
Am 07.08.2008 um 21:45 schrieb Matthias Luebken:
Hi
I'm new to Cocoa and Objective-C. Please point me to a different
group
/ forum if this mailing-list isn't appropriate.
I have a fairly basic language question: Is there a module concept in
Objective-C / Cocoa? I'm thinking in terms of OSGi bundles[0]. What
would I do if I would like to encapsulate a certain functionality
that
consists of several classes? Could I define an API how to use this
module and make sure private classes of this module aren't visible to
the outside?
Thanks in advance.
Looking forward to learn Obj-C and Cocoa
Matthias
[0] http://www.osgi.org/About/Technology#Framework
see:
http://www.google.com/search?ie=utf8&oe=utf8&q=NSBundle
first hit (and links therein)
regards,
Lars
I'm not sure if this is what he was asking for – NSBundle doesn't
offer the level of encapsulation that OSGi would. All classes are
still loaded into the flat namespace, and every function and byte of
memory in the process that loads the bundle is available for the
bundle's code to access. The only way I am aware of to get "private"
functionality would be to prefix each classname with something unique
like the reverse DNS system that's so popular with the kernel
programmers.
Unless there is a way to automatically isolate loaded classes... I'd
love to hear it. Magic dyld options are useful to know about :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden