开发者

How do you name the "same" entity in different tiers of an application?

You've got an N-tier application which deals with companies, so you've got a table called Company, an object in your DAL called MyApp.DAL.Company, an object in your application layer called MyApp.Core.Company, and in your service contract called MyApp.Contract.Company, and in your client proxy called MyApp.ServiceReference.Company, and in your client model called MyClient.Model.Company. You've probably a开发者_如何学Golso got one in your viewmodel called MyClient.ViewModel.Company.

Questions:

  1. How do you deal with the boilerplate code that converts from Company to Company at each layer?
  2. How do you deal with the fact that they've all got the same name? This is a problem in those layers where you have to deal with both (e.g. in the service contract implementation), but also in unit, integration and (less so) system tests.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜