API excitement...

Hi,



I was looking through the preliminary docs - very excited to see this direction being taken… I have a small question about how this works in real life…



From what I read, the framework is sortof a cascading engine environment… so that there is a core set of functions loaded first, then add-ons.


  1. Where does the core get notified that there is a new add-on? Is this the addon.xml file? Do you need to insert hooks into the core?


  2. Are functions added in add-ons only able to create new functions? Can core functions be extended? Can they be replaced - assuming the dataset returned matches what is expected from the core function?


  3. Is it necessary to have an add-on on both the admin and the user side (probably a good practice, but I am curious.)



    As an example, something I’ve wanted to add-on for awhile for 1.3.5… I want to add-on a way to assign different downloads to variant for the same product. I have photographs and I want to give the customer the option to buy a hires portion of only part of the photograph if they don’t think they will use the whole thing, but need the hi-res version. i.e. instead of just being a single directory, it would be productid/variantid/files



    So the workflow is:


  1. Create an entry for the addon in the xml.
  2. Create the codebase for the add-on including hooks out of the core system.
  3. Create the new php code for the product configuration area for the hooks
  4. Create templates in admin and on the user side for the hooks result - possibly returning data to the core functions?



    Am I getting the basics of this right? In other words, to create an add-on now, you have to know where your process pulls data out of the process, as well as where that data might apply if it goes back into what the core functions use?



    Will there be a list of reserved function names and variables/arrays that we might want to avoid populating due to unintended consequences when the add-on code is done running? I suppose running phpxref on the source could answer some of these questions for me but…



    Thanks,