1

I'm trying to understand if there is a manager/broker/coordinator class in frameworks and I hope so, but what possible ways are in a framework to make it run the pluggable extensions and what the term is for the name of that responsible part.

In the Build dynamically extensible frameworks article there are some keywords like "coordinating class" and "broker class".

Let's say, you have made a framework with a certain design decision like they tell, for example in these Evolving Frameworks: A Pattern Language for Developing Object-Oriented Frameworks or Extension/Service/Plugin Mechanisms in Java articles. When I have researched there are not many articles on framework design, most of them are old and even in them they don't clearly tell how actually the core of framework triggers and make itself rolling by handling all extensions to cover them and run the specific extension and if there is none to run default implementation.

I'm aware of DI, dynamic class loading, reflection, observer, hooks, and my question is not about to design a framework, but how these techniques can be used and more specifically which one is most common or basic to be able to trigger it.

How and in which ways a framework core broker or something initiates the process and run by getting all extensions and selecting most specific one and if there is not the default implementation? Are there any general terms for the component or class that does this task?

How extensions to the later parts in its lifecycle triggered by selecting the specific implementation?

As a sample please consider this from an article I have mentioned. I'm interested in this kind of specific part, but not how to design extension points. Is it most basic approach?

public boolean book( String type, Calendar date ) throws NoStorageFoundException 
  { 
    BookableStorage aStorage = getBookableStorage( type ); 
    if( aStorage == null ) 
      throw new NoStorageFoundException(); 
    Bookable[] someBookables = aStorage.loadAll(); 
    for( int i=0; i < someBookables.length; i++ ) 
    { 
      if( someBookables[i].isFree( date ) ) 
      { 
        someBookables[i].book( date ); 
        try 
        { 
          aStorage.store( someBookables[i] ); 
        } 
        catch( IOException e ) 
        { 
          myMessageWriter.println( "I could not store your request." ); 
        } 
        return true; 
      } 
    } 
    return false; 
  } 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.