Fork me on GitHub

How do people tend to organise components in a project? Do people put them in a namespace or just put them in and amongst other code/namespaces?


I generally have a foo.system ns which manages constructing the system, and nses for each component or related group of components.


We have a foo.application which is for the overall application system component, and then each "subsystem" has a nominal "lead namespace" that contains the its component and the "constructor" function that that. That way our tests (for a subsystem) can construct that component and test the subsystem independently of the main application.


(that said, we’re still in the process of migrating our legacy code to Component so things are still a bit in flux)