.net - Arranging/Organizing my classes/interfaces into folders? Not changing namespace with folder (Resharper: Namespace Provider = false) -
I currently have a project and its increasing size is in everyday it is a container for an API that I provide I am doing
I currently have all of my classes and all interface routes
I have separated my Erum, Contents etc. into my folders, but I have a folder named as part of the name space Because they are containers to keep them organized.
I was wondering if anyone has any experience here?
Should I separate my interfaces in my own folder (should not inherit the folder as part of the namespace)
Do I even separate my classes? should do?
I also have classes which are children of other classes .. That is, a class applies it as property so it will never be instantiated outside, so will I separate them further (for example ) "My Products" will be a folder called "Products" and inside this folder, and then my item class and other classes that are specific to the product?
I would love to hear some feedback.
Thanks
/ div>
Same happens ever. In fact, in most cases you leave different projects instead of the same project, which has many and many folders. Personally, I consider a complex project on a clear code odor if nothing is done, then your project will not be compiled quickly because it is compiled as a part, while different projects compiled in parallel (More or less - all are affected by dependencies).
He said, if you really want to keep everything in one project, then here's what to take:
- If anything for all the elements of the project is normal (For example, useful expansion methods), I am creating a folder
Infrastructure , make sure that this is not a namespace provider and keeps all the normal stuff there.
The rest of the project is not different on the basis of behavior, for example, you suggest that these fields are different, but I find it wrong - if I have database organizations that are classrooms or anohum , Then I will have a code known as
Entities . The namespace of
MyProject.Entities ) contains both enums and classes in the same place. (Note that if you were to suddenly move it to a project called
MyProject.Entities then you will not need to change your namespaces.)
- Try grouping files according to functionality, not according to type.
Comments
Post a Comment