I want to develop a library which will have extendable methods but standard format. That can be done using an interface class. For example I have a communication interface which can send and receive data. I'll be using the same class to communicate over UART and SPI (with their own defined methods). If someone wants to define a method for one wire, he'll be able to define his own method in standard communication class. Similarly if i have a class for storage which can load and store data, i might have a pre-defined method of handling on chip memory but if a developer wants to extend it for an SD card, he should be able to define his own method.
Now the question is, that is it a good practice to use interface classes in small embedded systems with prog memory of 1 MB or lesser?
Are there any examples of platforms where this has been done and shows the standard ways?
Does arduino IDE itself uses any such approach?