Im thinking of implementing a parser framework that would utilize a set of interfaces to make it easy to adapt to different types of data formats. I want to create structure around the way my controller object interacts with this parser and have come up with the following simple structure. I was hoping the community could provide any comments or thoughts on what the advantages / disadvantages are of implementing in this manner :
package
{
public interface IParser
{
function loadAd(adURL:String):void;
function parseAd():Object;
}
}
package
{
public interface IXMLParser implements IParser
{
function setAdData(adData:XMLNode):void;
}
}
package
{
public interface IJSONParser implements IParser
{
function setAdData(adData:JSON):void;
}
}
- Are there any ways to expand the features of these interfaces?
- Are there any glaring limitations to these interfaces?
- Are there disadvantages to using interface inheritance?