There are 2 functions in TYPO3 which seem to more or less do the same:
ExtensionManagementUtility::addModule
/** * Adds a module (main or sub) to the backend interface * FOR USE IN ext_tables.php FILES
ExtensionUtility::registerModule
/** * Registers an Extbase module (main or sub) to the backend interface. * FOR USE IN ext_tables.php FILES
So, according to the comments, they basically do the same, but one registers and one adds and for one it's an Extbase module. I have seen examples for both online and seen TYPO3 extensions use one or the other methods.
Which of these methods should be use to create a TYPO3 backend-module and what is the difference?
I can just use one or the other methods, but I would like to get some more guidance on these general things and what is the best practice for the future.
The obvious answer is probably, if you use Extbase, you use registerModule, if not, you use addModule. Ok, but then, why does the core do it this way in some cases and that way in the other?
Another obvious answer is that registerModule calls addModule.
See also this comment.