We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Instead of grouping project files by type, we should group them by "use cases" or "modules".
Old structure (typical for Yii2), grouping by type:
/src/Controllers/Module1/Module1Controller /src/Controllers/Module2/Module2Controller /src/Components/Module1/Component1 /src/Components/Module2/Component2 /views/module1/index /views/module2/index /tests/module1/Testcase /tests/module2/Testcase
New refined modern structure with grouping by module:
/src/Module1/ Controllers/Module1Controller Components/Component1 Views/index Tests/Testcase /src/Module2/ Controllers/Module2Controller Components/Component2 Views/index Tests/Testcase
1 module = 1 folder
Not only classes should be grouped by modules, but views and tests too.
Benefits:
Store in one place all that is used in one business feature. For example, code with tests that testing it. Easy to find, easy to manage.
Reuse module between projects with copy-paste module folder. Easy!
Fork modules to reuse in same project. Just copy that folder, and replace some logic.
Work in single folder at one time, tinkering some feature. No need to open 3-4 folders in project tree (code, tests, views, etc).
The text was updated successfully, but these errors were encountered:
Moved to yii-demo
Sorry, something went wrong.
No branches or pull requests
Instead of grouping project files by type, we should group them by "use cases" or "modules".
Old structure (typical for Yii2), grouping by type:
New refined modern structure with grouping by module:
1 module = 1 folder
Not only classes should be grouped by modules, but views and tests too.
Benefits:
Store in one place all that is used in one business feature. For example, code with tests that testing it. Easy to find, easy to manage.
Reuse module between projects with copy-paste module folder. Easy!
Fork modules to reuse in same project. Just copy that folder, and replace some logic.
Work in single folder at one time, tinkering some feature. No need to open 3-4 folders in project tree (code, tests, views, etc).
The text was updated successfully, but these errors were encountered: