'How to naming namespaces for product that have sub-products/modules?
I read that carefully. And yes very helpful!
https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces
Assuming you have following products and namespaces
Microsoft.Dynamics.Inventory is a DLL
Microsoft.Dynamics.Bank is a DLL
Each of above have (Views, Reports, Utils, etc)
Microsoft.Dynamics.Inventory.DLL
Should I go for that?
Microsoft.Dynamics.Inventory.Sales.Reports
Microsoft.Dynamics.Inventory.Sales.Views
Microsoft.Dynamics.Inventory.Sales.Controls
Microsoft.Dynamics.Inventory.Purchase.Reports
Microsoft.Dynamics.Inventory.Purchase.Views
Microsoft.Dynamics.Inventory.Purchase.Controls
Or Go for that? (Currently used)
Microsoft.Dynamics.Inventory.Reports.Sales
Microsoft.Dynamics.Inventory.Views.Sales
Microsoft.Dynamics.Inventory.Controls.Sales
Microsoft.Dynamics.Inventory.Reports.Purchase
Microsoft.Dynamics.Inventory.Views.Purchase
Microsoft.Dynamics.Inventory.Controls.Purchase
When you write using directives the first one appears good. But the folder structures will be bad.
- If I use second approach I got very good structured folders See Image
- If I use first approach each Sub-Module have Views, Reports, Controls (Duplicated)
Please its not opinion based. I actually afraid for a bad structured later will become worse.
I can't imagine an example with System.Data.SqlClient are not System.SqlClient.Data alright?
Usually
System.Data.Common can used bellow
System.Data.OleDb
System.Data.SqlClient
System.Data.AnyProvider
How to apply that structure to My example above?
Notes
- A Sales maybe doesn't have Reports (So are first approach bad?)
- A Purchase maybe doesn't have controls (So are first approach bad?)
I see that in MVC architecture they go with second approach. I don't sure about that.
https://github.com/cruzerM/erp-bank-net/tree/master/ERP_BANK.Web/Views
So should I fllow second approach?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
