gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: NSBundle frameworkWithName:


From: Stefan Urbanek
Subject: Re: Proposal: NSBundle frameworkWithName:
Date: Wed, 13 Aug 2003 15:00:19 +0200

On 2003-08-12 05:17:55 +0200 Adam Fedor <address@hidden> wrote:


On Friday, August 8, 2003, at 10:37 AM, Stefan Urbanek wrote:


Is frameworkForClass: supposed to work for not loaded frameworks? If 'class' is 
a Class, then of course not, but if it is a class name, then it should. 
Functionality I am proposing is to be able to get framework bundle without 
knowing it's filesystem path. It should be by name, class or whatever 
identifier - no filesystem involved at all. Is there some method for that?



Aren't frameworks supposed to be loaded in by default? Wouldn't it be a bundle 
otherwise? I don't really know how frameworks are used in general, so perhaps 
I'm wrong. Do you have an example of how frameoworks would be used in a 
loadable (e.g. bundle) fashion?


There are two points about this proposal: to be able to load framework 
dynamically and to create an interface without having filesystem involved. 
First think allows you to not to create dependencies for an application, that 
means that the presence of a framework is not required on the system where 
application is being run. Second is a simplification of the bundle interface 
and is a small step towards integrated environment. GNUstep already knows where 
frameworks are, I just need to specify a name.

Framework is a bundle and more. It should contain development interface and 
more versions. For the application, it is just a bundle, for developer it is 
more.

Concrete example is scripting support with StepTalk. Scripting is optional. Proposed 
functionality will remove need of writing bundle searching code from all applications and 
servers that use scripting optionally. Like application scripting support now is bundled 
in a bundle which is loaded when requested. I would like to extend that bundle with 
programming interface so developers can have more controll when using it, therefore it 
should be turned into a framework. So to look for a scripting support will be sufficient 
to check for [NSBundle frameworkWithName:@"AppScripting"] instead of traversing 
all possible rameworks directories.

Another example is optionally scriptable servers where one can add optional 
scriptability to the object environment of the server. It is analogous to SQL 
queries (StepTalk scripts) on database servers (GNUstep DO servers).

The proposal is also about reusability of code. I think that this kind of code 
can be reused in many other applications/tools. And because there are already 
some private methods with similar functionality, I think that they can be made 
public, slightly modified and made ready to be reused.

What do you think?

Stefan
--
http://urbanek.host.sk

First they ignore you, then they laugh at you, then they fight you, then you 
win.
- Mahatma Gandhi






reply via email to

[Prev in Thread] Current Thread [Next in Thread]