8
It’s wrong, bad practice or I might have problems with class like namespace? Example:
namespace Cielo {
public class Cielo {
...
}
}
It’s been working, in some places it gets a little strange to call Cielo.Cielo.etc
.
You should change the class for example to CieloService
or something like?
Unfortunately, the convention to use Uppercamelcase also in namespace names can cause technical problems when using the same name in the class and in the namespace (in java the convention is to name namespaces with lowercase letters, avoiding the possibility of collision). In his article, Eric Lippert says that using the same name would be a design flaw in the hierarchy, but he cites a good example Pobrinho (a namespace List classy List), only that in Enterprise applications it is common to want namespace and class with equal names; and in C# we ended up having to forge pro namespace an unnatural name :-/
– Caffé
This is a valid hierarchy pattern in Enterprise systems: company.domain.context.entity.Rootentity, company.domain.context.entity.Aggregateentity1, company.domain.context.entity.Valueobject1. For example: dorathoto.erp.Stock.product.Product, dorathoto.erp.stock.producto.Category, dorathoto.erp.stock.product.Location. In C# I have to forge another name for the aggregation namespace of the entity Product. Which name would be more natural than simply "Product"?
– Caffé