Skip to content

Comment on Ask HN: PHP Directory structure and code organization

Comments

There are several solutions that work well in conjunction: 1. Start moving code into code libraries. These can be reused in multiple projects, are framework-agnostic, and can be managed via composer. 2. Once you've reached a certain codebase size, switch to using modules. This will help create logical separations of code, and will limit devs stepping on each other's code 3. Start putting common utility code into helpers, and base controllers/models. 4. If you have common view components, consider breaking them out into partials

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.