A design pattern for writing extendible software

E

Efi Merdler

Hello,
I would like to write a software that supports extendibility i.e.
plugins that interact with public API.
Is there any kind of a design pattern that supports such idea ?

Thank you,
Efi
 
A

Alex Hunsley

Efi said:
Hello,
I would like to write a software that supports extendibility i.e.
plugins that interact with public API.
Is there any kind of a design pattern that supports such idea ?

There's a pretty fundamental "design pattern" which will do: the
interface. Declare a plugin interface, which 3rd parties can write
implementations of.
i.e. you have something like:

public interface Plugin {
public int connectToChicken(int legs);

public int pollShatner(long kidneys);

public void close();
}

3rd parties then provide classes which implement this interface.

Also see 'delegation', and perhaps 'strategy pattern'. (Search the web
for these terms.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top