I read several articles and watched many lectures / tutorials on YT about DI and IoC, but I did not find the recommended directory layout in the VS solution.
I am talking about a project (for example, in a game) where you have several classes / interfaces, a registrar, a database provider, wcf services, a wpf presentation level (this is actually a different project) ...
Is there any template project that shows how to organize my project, so that the next experienced programmer will not waste time figuring out what is happening? Just as we talk about βcommented code,β I'm talking about a βcomment structure with comments.β
For example, should all interfaces be placed in the Interfaces directory? Or should I (in case of registration) create the "Logger" directory and put the interface, classes, class with extension methods (all oriented to logging) there. The code is focused on the Council, in the Council directory. Separate directory for "Field", etc. Etc.
Now the structure looks like this. I'm not sure about Business and Logger. I have an interface in different directories, and then other log classes. Should I call the Log4Net provider? or adapter? or decorator? This is just a log class that implements the ILogger interface. Here is the screen: link
Here is a sample code (there is no IoC yet, but everyone will notice that 3 interfaces will be displayed there. Very simple):
public class Game { public IBoard Board { get; set; } public Game(IBoard board) { Board = board; } } public interface IBoard {} public class Board : IBoard { public IField[,] Fields { get; set; } public Board(IField field, int boardWidth, int boardHeight) { Fields = new IField[boardHeight, boardWidth]; Fields.Initialize(); } } public interface IField {} public class Field : IField {} public interface ILogger { void Log(LogEntry entry); }