Back to list
Views:   13.9K
Replies:  3

Class names in Presentation Layer reference


I am exploring Patters in Action 4.0 framework.On Product.aspx.cs page there is reference to Product object.
ActionServiceReference.Product product = repository.GetProduct(ProductId);

I cannot find Product class in Service layer, how does it get referenced in Presentation layer. I can find  Product in Business layer and another one in Presentation layer.


Praveen Surendran, Sep 27, 2010
Reply 1

Yes, you are right, the attributes are on the DTOs rather than the BOs.

Also, separating your Facade, Service Layer, Business Layer and Data Access Layer into separate projects is very much a matter of your particular requirements and/or preferences.

Dan McMillan, Sep 29, 2010
Reply 2
Thanks Dan, So in the above code Product is referring to ProductDto in service layer and not Product in Business Layer.
Snippet  [DataContract(Name = "Product", Namespace = "")]     public class ProductDtoAlso as in the example, if Data Access object does not have any methods, do we need separate Dto objects if we move Data Access objects to separate project. I am working on a project where business logic is implemented in service layer implementation, client makes call on Facade and it calls service layer.


Praveen Surendran, Sep 29, 2010
Reply 3

This is a nice WCF feature.  You can decorate your classes in the BO with attributes like [DataMember] and [DataContract] that allow you to specify the names of the generated proxy classes on the client.

Hope this helps.

Dan McMillan, Sep 28, 2010
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.