I'd like to create a custom model that connects to an API instead of the Magento database. It would also be nice to be able to use (or extend) Magento's collection classes. We created a custom module not so long ago that stores information in the database but we're moving this sub-system outside of Magento and making it accessible through an API to Magento and other apps.
If I can somehow extend Magento's core abstract classes (or maybe inplement some interfaces) I think I can manage to swap my model classes without changing most of the other code that already exists in controllers, blocks, views, etc. Right now, I've created a class that connects to the API and makes the returned data accessible in an object, and a (sort of) collection class that is iterable, but I have to go through the existing code to change how everything works because these are not children of
Has anyone done this?
Is this viable? I wonder if implementing these clases would take too much work, maybe nearly as much as just rewriting them from scratch.