Yes, when I a custom ModelBinder
in MyReallyGreatArea
only I put it - as you suggested - into a folder within that area, e.g. Areas/MyReallyGreatArea/Binder
s. When a ModelBinder
is later used by a different area I then move it up into a folder named Areas/Shared/Binders
or similar. That way I keep classes located close to where they are used. Why bother with the customer ModelBinder
if MyOtherEvenGreaterArea
doesn't use it?
The same applies for everything else. If it is used by MyReallyGreatArea
only it will be located in there. If it is shared with a different area I put it into Area/Shared
(and possibly properly named subfolders in there).
While this is likely to be only a minor issue if you work alone on this project or when then the project is still small, a well thought-through structures pays off as the project grows or as a larger team works on it. In some cases different areas are even worked on by different teams.