MMF3 extension/plugin design plans
In this thread I want to discuss the needs and wants for extensions/plugins in MMF3. I think it is important to solidify the abstract ideas for this before MMF3 is too far in development so that MMF3 can be designed with the preferences of extension developers in mind. Here are some of my rough ideas for starters:
Extension Packaging
Currently in MMF2 extensions have several files that get distributed from zips to several directories in MMF2:
-The edittime MFX in \Extensions\
-The runtime MFX in \Data\Runtime\
-The various runtime versions in the various folders in \Data\Runtime\
-The help file or files in a folder in \Help\
-The example files in \Examples\Extension-Name\ (or sometimes even just \Examples\)
-The DLL dependencies in \ (root MMF2 folder)
And all these things are spread around in the MMF2 application folder.
For MMF3, I think it will be important for extensions to keep all their files together, and for them to be out of the MMF2 folder (so they're not in Program Files). Perhaps somewhere in the All Users folder or the Shared Documents folder, just somewhere easily accessible.
Consider: each extension is either a folder or zip archive (preferable folder) with this structure:
ExtensionName
├Help
│└(Help files, etc)
├Examples
│└(Examples, etc)
├Implementation
│├(various property files to define global information for the extension)
│├Edittime
││└(Implementation files for dealing with the extension within MMF3)
│├Platform-Name (one for each supported platform)
││├Debug
│││└(Platform specific implementation files for running from MMF3)
││├Release
│││└(Platform specific implementation files for built runtime files)
││├Dependencies
│││└(files to be distributed once for all instances of the extension)
A self-contained folder for the extension and its help and examples, and each runtime it supports.
Notice the edittime implementation: it is simply for the user interfaces when designing the MFAs, and contains no actual runtime code. This would be responsible for the A/C/E setups and the menus, along with the object properties and such.
Another thing to note is that I haven't given any file extensions for this - extensions may be implemented not only in native code, but also in MMF2 applications or in some text formats for very simple extensions - whatever can be done reasonably. For example the Windows runtime implementation can be a C++ DLL or a Java class, since both are supported on Windows. Or, if the Windows runtime is not provided but the Java runtime is, the Java runtime can be substituted for the Windows runtime.
Another benefit is that users can pick and choose or mix and match platform implementations for the extension and they will all always be compatible - this allows for the author to provide different versions of the runtime implementations that optimize for different things (eg only implementing a specific set of A/C/Es to optimize for space).
Finally, since this is all just some files in folders, if the structure and layout have to change the MMF3 patcher/updater can easily batch-update the structure of existing extensions (or MMF3 can do it at startup or when needed). No more being stuck with old designs that are too late to change.
Extension Implementation / MMF3 SDK/API
The current MMF2 SDKs use code and implementation layouts based on very early MMF-style products, as early as Click'n'Create. The SDK is also mainly optimized for C. While for Windows this is OK, it makes a mess for other platforms and things get really inconsistent.
For MMF3, I think it would be great if the same design for the code is used for C, C++, C#, Java, Python, Flash, etc. based on the average of what these languages can do. In general I think object-oriented programming should be encouraged, eg for the higher-level programming languages (C++, C#, Java, Python, Flash, etc), but for the lower-level language implementations (eg C) implementations it should still be able to interact with the MMF2 runtime in a fast, low-level way. In any situation, however, there should be as much flexibility as possible in the design so that new features in MMF3 can be added to the API/SDK and naturally fit in with existing code.
If breaking changes have to be made, they should update the version of the SDK so that old implementations can remain compatible. This is a real issue and is not very easy to solve without making a mess of the MMF3 runtime code, so in some cases it may be best for MMF3 to deploy the use of proxy objects that can handle older extensions. This way the MMF3 code stays clean and older incompatible extensions can be supported.
Currently in MMF2 a lot of limiting factors come from not having access to the behind-the-scenes data. In general it should be easy and common for extensions to interact with eachother, including 3rd party extensions and the 'default' extensions in MMF3. It should be encouraged that extensions give eachother access to specific implementation details and low-level/private data. While this can make the life of extension developers somewhat more challenging, it can also open up opportunities for simpler programming in MMF3 and the ability for extensions to directly transfer data in the most efficient manner.
Another problem with MMF2 is that many extensions are closed-source and the developer left the online community without giving anyone the code. To solve this, all extensions for the standard-level of MMF3 should be required to have their source published to the MMF3 extension repository before the extension or its updates can be made public on the extension repository. Extensions for the professional/developer-level of MMF3 will have to have their code submitted to Clickteam.
This sums up my major ideas and abstractions for MMF3 extension development. I know a lot of details need to be worked out and some ideas refined, so post your ideas and input so that when MMF3 comes around, extension developers will be able to quickly and easily create fantastic extensions!
Some things to refine in specific:
-How to handle inheritance and other object oriented concepts
-How to allow for the creation of proxy extensions that can, for example, pretend to be another extension (eg so old MMF2 extensions can work via proxy extensions)
-What the SDK/API design should incorporate and allow for
-How extensions can be created within MMF3 rather than another programming language