Home   Info   DevZone   Wiki  
UsersWeb  |  MainWeb  |  InfoWeb  |  DevZoneWeb  |  SupportWeb
API ] [ not logged in ] [ Web: Imported ] goto:  options
[ get info on or edit ] login or new user ] [ list of topics, hubs & nodes, or recent changes ]

API = Applications Programming Interface

A set of interfaces for developers to use when creating own code.

API Pages

If done right, an API can be programmed to in such a way that the application need not even be recompiled if the implementation of the API changes.

Here, I mean the API to be synonymous with a set of interfaces or base classes which are compiled. The implementation comes in the form of implementing the interfaces or subclasses the base classes. In this case, in order to use an implementation, the programmer of the application will still need to know the names of the subclasses which implement the functionality of the API in order to use them. Thus when the implementation of an API may need to be switched, all of the applications which use the API will need to be updated, recompiled, and reinstantiated. There are ways to get around this such that the application never needs to know the implementation which it is using and it is actually up to the API itself to choose its own implementation. Usually this can be done by the API checking either a Property or maybe consulting a registry of some kind. This is how I propose we architect everything from device drivers to system services.

-- AveryRegier

This sounds like a great idea; could you give some more details? The API can also hide details of its implementation by creating Interfaces using the Interface keyword in Java. An Interface promises to implement certain methods but does not care how they are implemented.

-- BradNeuberg

That is exactly what I was talking about. But even using the interface keyword, the application still needs to know the name of the class which implements the interface in order to instantiate it. I propose we develop SmartAPI's which get the class name of the implementation from either the Properties or a registry (which would probably work in concert with a class repository.)

-- AveryRegier

Sounds like what you're advocating is something similar to CORBA. At least with some of the implementations like Visigenic's VisiBroker, you can specify that you want an object of a given interface type and the ORB and Smart Agent find an instance for you, possibly starting one up with the Object Activation Daemon, if that's the way your system is designed.

I don't think we'd necessarily want to use CORBA for all situations of this type, but I believe it might provide a good model for what you propose.

-- EddieSheffield

Exactly. :)

I personally think that a key component of the operating system will be a registry. All OS API's should be interfaces only and there should be a way to obtain the "current implementation". In this way we allow vendors to replace parts of the JOS operating system without having to modify our code. It also provides for a clean future migration path.

-- ClarkEvans

A small suggestion here. Let's add a version control and security bit to the registry. That way parts of the classes could be replaced with newer versions if the security bit would allow it.

-- FenixBird

For more information on the registry API, see also RegistryPages. -- GilbertHerschberger (9 June 1999).

Content of these pages are owned and copyrighted by the poster.
Hosted by: