-2

In our project there are C# classes which does something (engine code), and some data transfer (DTO) classes to parameterize the engine fuctions. One of the project member likes to separate the classes into folders:

 DTO\class1.cs
 DTO\class2.cs
 engine1.cs
 engine2.cs

Other project member is bothered by this folder separation, he likes it in the same folder as these codes are part of the problem:

 class1.cs
 class2.cs
 engine1.cs
 engine2.cs

First method separates the valuable classes from the 'worthless' ones, and speeds up the searching in the Solution Explorer - but the DTO name is not a nice one. I am interesting in how you guys separate the code into folders (and how to name them) in your (bigger) projects?

2
  • 1
    Please ask these kind of questions on codereview.stackexchange.com . As far as I can see you don't have a problem, and looking for of an opinion.
    – Adarsha
    Sep 15, 2015 at 6:11
  • @Adarsha we on code review are reviewing code. There is no code so that would be off topic.
    – Heslacher
    Sep 15, 2015 at 6:17

1 Answer 1

0

It's whatever you like. I personally use folders to group certain files. For games i.e.

  • Logic
  • Client
  • Data
  • Connection
  • Connection/Messages
  • ... more

There are more ways to do things like this, but it's all personal. Just think of something good. If you code with other people, you should discuss and write down the code convention first.

2
  • Yep, should have been written down... :( The problem is that we cannot agree :) All ideas are welcome :) Now it looks that DTO/ is more symphatics than Data/ name (at this time). Data is ... something... input. DTOs are often used for making containers for function arguments and return values. Sep 15, 2015 at 6:39
  • Well, I am afraid no one here can really help you out. It's something you need to deal with together with your team. Just write down good arguments why yours is better. In my opinion it is better if you sort everything like this. Searching through a huge list of classes is a pain and something that should be prevented by mapping. Sep 15, 2015 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.