簡體   English   中英

Using business object in presentation layer

[英]Using business object in presentation layer

In a 3-Layer application, from better design/architecture point of view, can/should i instantiate a business class (which resides in Business Layer) in Presentation Layer? I mean, is that a bad practice? If so, then what are ways to refer to any business object from the Presentation Layer?For example, how i'm gonna save an "Employee" object in session state if i can't create it in the Presentation Layer(code-behind)?

If you don't instantiate the business object in the presentation layer, how would you call it? So you shall have to do it. Of course, if you wish the code for business layer to run off somewhere else, you can think of services. But still, at that time you shall instantiate the proxy from the business/service layer only. So just go ahead.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM