Saturday, March 24, 2007

Backwards Compatible

I realized that as new versions of PixMod came out it could break the functionality with older modules so I decided to build backwards compatibility into PixMod.

The XML image file contains the version number. If a version 1 module gets a version 2 xml file it will display a warning and continue. The warning displays what version was passed and what version was expected. If it works, great! If not, then you can specify the version number when calling PixMod and it will generate that version XML file for that module.

You can see the header in the XML file contains tag.

http://pixmod.wikispaces.com/Version1.0+XML+Image

The parameters for version 2.0 lets you specify the version number for each module.

http://pixmod.wikispaces.com/Version2.0+Parameters

PixMod is not forward compatible. There is no way for version 1 PixMod to know what the XML file format is for version 2 is. So if you try to use a version 2 module with PixMod version 1 you will simply have to upgrade if it does not work.

Again, the module will check to see the version number and report a warning if it does not match their own version number but it will continue because it might just work.

No comments: