Answer the question
In order to leave comments, you need to log in
How to create a universal site extension?
Hello. I have the following:
example.com/module
Answer the question
In order to leave comments, you need to log in
1. This option is generally well applicable for more modern frameworks, but Yii2 is quite old. It does not support PSR standards, which makes it very poorly compatible with others. That is, it is impossible to write such a module for Yii and connect it to the symphony, as well as vice versa. In addition, Yii uses Active Record, and Symfony uses Doctrine. Therefore, you can only take out some components and connect them in your projects. It will be difficult with a separate module. The Yii module can only be used there. If you go this way, then you need to move this package to the repository and include this package through the composer. Inside the project, it remains to set up the config, set up dependencies through DI. Example .
2. The second option is more flexible. This is more about microservices. Applications will interact through the API. In this case, it doesn’t matter to you what kind of framework and base it is. Modern large systems are exactly like that. However, this is a complex system that requires a lot of knowledge and time.
If I were you, when designing in Yii2, I wouldn't worry about it. Firstly, this iodvl vryat who will need it. Secondly, it is not compatible with other frameworks. If you need such a module - just copy it to another project. If you feel that it changes often and you need compatibility with other projects - take it out into a package and connect it through the composer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question