mik
mik copied to clipboard
Deprecate file manipulators?
@MarcusBarnes I'm still unsure of the general use case for file manipulators, especially if we are now using post-write hooks. I'd like to consider deprecating them for the 1.0 release and have added the following note to the wiki page:
Please note that file manipulators may be deprecated for the 1.0 release of MIK in favour of post-write hooks. If you need to retrieve or modify a source file, or create an additional datastream file for loading into Islandora, we recommend that you implement a post-write hook instead of a file manipulator. In any event please open an issue so we can discuss your use case.
I guess my main argument for using post-write hooks is that they run in the background, so are better suited for potentially expensive operations like creating derivative files or modifying existing files. However, if we can think of a couple of good specific use cases for file manipulators I'm happy to retain them.
@mjordan Once nice thing about how we set up the current filemanipulators is that it's rather easy to add the functionality back-in should a suitable use case come up. Based on how we've been using them, post-write hooks are suitable place for our "filemanipulators" and, as you point out, better suited for expensive operations like creating derivatives.
I agree that we should consider deprecating filemanipulators for the 1.0 release. Let's review this once we get past the 0.9 milestone. Thank you for the suggestion.
@MarcusBarnes grepping through the MIK source code the only places I can see any reference to file manipulators is in the CONTENTdm toolchains, which do use https://github.com/MarcusBarnes/mik/blob/master/src/filemanipulators/ThumbnailFromCDM.php. We probably should supply a post-write hook script to replace this functionality before we remove filemanipulators from the source code tree and documentation.