After exploring the Repeating module name for each module component issue, we have decided to adopt the organizational recommendations outlined in the Best Practice Recommendations for Angular App Structure blog post. This approach has been implemented in a small internal application used for measuring connection quality.
The current structure of the project includes:
$ tree -L 1
.
├── app-config-service.js
├── app-config-service_test.js
├── app-connection-service.js
├── app-connection-service_test.js
├── app-controller.js
├── app-controller_test.js
├── app-countdown-directive.js
├── app-countdown-directive_test.js
├── app-footer-directive.js
├── app-footer-directive_test.js
├── app-footer-service.js
├── app-footer-service_test.js
├── app-math-service.js
├── app-math-service_test.js
├── app-stats-directive.js
├── app-stats-directive_test.js
├── app-status-directive.js
├── app-status-directive_test.js
├── app-status-service.js
├── app-status-service_test.js
├── app-time-directive.js
├── app-time-directive_test.js
├── app.css
├── app.js
├── bower_components
├── config.json
├── countdown.html
├── footer.html
├── img
├── index.html
├── ping
├── stats.html
└── status.html
This setup, with a mix of directives, services, partials, controller, and other files all grouped under a single module, is becoming difficult to manage and work with due to the high number of files involved.
Considering that everything is contained within a single module, would it be beneficial to transition to a component-oriented approach? Should we introduce separate directories for services
, controllers
, directives
, and partials
in this simple application? Or does the "Organized by feature" method only prove effective for large-scale applications?