views:

68

answers:

2

Silly question really but just was wondering about other peoples naming conventions for DAL and BLL if there were any better names for them than those ones.

+3  A: 

I guess you mean the projects you are creating.

If you follow ".NET Framework design guidelines"

  • Avoid SCREAM_CASE
  • Avoid such abbreviations

I usually see something like this:

CompanyName.Product.Data

CompanyName.Product.Logic

However one might argue where to put the logic or even if you should name it Logic or BLL at all. It depends on the system in wide, if you are creating a Banking system you might not want to put all logic in a Logic namespace but you might want to split it up into more spaces like:

BankName.Web.Authentication

BankName.Web.Transactions

Where these layers have their own set of logic layers.

Filip Ekberg
Arguably, you could combine the best of both by using names such as `BankName.Web.Logic.Transactions`.
Steven Sudit
Or even better `BankName.Web.Transactions.Logic` then you could also have `BankName.Web.Transactions.UI` anyways it all depends on what system you are creating, in a bank-system, I might not want to mix the logic and ui and data together so seperate spaces like this might be nicer.
Filip Ekberg
Depends on how you organize the code: do you group transactions-related classes together or logic-related classes? I'm not offering an answer, just saying that a plausible argument can be made for either.
Steven Sudit
@Steven, I aggree but when you are on that "level" of discussion, you need to know a bit more about the application to give a more accurate answer / analysis. But in the bank situation i think grouping it like you said makes more sense. BankName.Logic.Transactions that way they can still share the logic between other applications such as winforms.
Filip Ekberg
@Filip: Actually, I might agree, in that business logic is defined as a layer, not a tier. For example, we may well need the same business logic exposed on the server and on the client (mostly because the server isn't responsive enough and the client simply isn't trusted). So a layer-first approach encourages proper reuse.
Steven Sudit
Uhm, to be clear "Transactions" isn't a tier, either. It's a functionality category, and while it may be useful to think of the layers and tiers within such a category, it can't be primary. I think the strongest general argument we could make would have us organize the namespaces by layer, the executables by tier, and spread the functional categories across both as needed.
Steven Sudit
I prefer 'Domain' over 'Business', 'Login' or 'BLL'.
Guilherme Oenning
A: 
OrganizationName.ProductName.LayerName
Popo
Ok, but where do you put tier? In the above example `Logic` is the layer, `Web` is the tier.
Steven Sudit
Hello Steven, maybe this article would help you.http://msdn.microsoft.com/en-us/library/893ke618%28v=vs.71%29.aspxCheers.
Popo