Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a truly extensible module #13

Open
samdark opened this issue Jun 27, 2014 · 10 comments
Open

How to create a truly extensible module #13

samdark opened this issue Jun 27, 2014 · 10 comments
Labels

Comments

@samdark
Copy link
Owner

samdark commented Jun 27, 2014

  • Comments module.
  • Interface for user.
@rubenheymans
Copy link

@lynicidn
Copy link

@hashie5 i think, for this logic is better way use di :)

@rubenheymans
Copy link

@lynicidn what do you mean, better way use di?

@lynicidn
Copy link

@hashie5 create interfaces and set classes via di container

@samdark
Copy link
Owner Author

samdark commented Mar 26, 2015

artkost/yii2-qa#24

@samdark
Copy link
Owner Author

samdark commented Apr 20, 2015

@samdark
Copy link
Owner Author

samdark commented Jun 15, 2016

There are two problems Yii modules could solve:

  1. Grouping alike functionality.
  2. Isolating functionality for future reuse within different projects.

When Yii core team developed modules the purpose was always about both. When it went into the wild, community started using modules for grouping only more often than for isolation which is understandable since proper isolation is hard to achieve. If the module is isolated it never uses anything from outside of it. If it needs something, it provides an interface to be implemented by the one using the module. Same applies the other way around i.e. external usage of the module internals is strictly prohibited except what’s provided by module’s interfaces.

@samdark
Copy link
Owner Author

samdark commented Jun 20, 2016

@samdark
Copy link
Owner Author

samdark commented Jun 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants