Dofactory.com
Dofactory.com
 Back to list
Views:   10K
Replies:  2
Archived

Facade missing in 4.0 - why?

Hi,

The comments in Desing Pattern Framework 4.0 refers to CustomerFacade in multiple places but Facade is not present in the solution. It was present in the 2.0 version and later removed from 3.5 & 4.0.

In my opinion, Facade is a good Design Pattern as it was hiding the logic for business object & data access layer from the service layer. In the current version, the service layer directly interacts with the DAL through various DAO implementations.

Please suggest the reason for not using Facade layer and whether it is advisable to directly access DAO bypassing the business layer?
Sanjay K Singh, Sep 19, 2010
Reply 1
Hi Dan
Thanks for your answer. It seems the service layer is now the facade to the application. That sounds good - however I have another question. Is it good to access the DAL directly from the service layer or through the business layer? In .NET 2.0 PIA the service layer acted just as a very passive layer by just sending the request to business layer (through business facades) whereas in 4.0 PIA it is directly calling the DAL.

What is the preferred approach - accessing DAL directly through Service layer or through Business layer?

Regards
Sanjay 
 
Sanjay K Singh, Sep 27, 2010
Reply 2
Actually the Facade is very much present in Design Pattern Framework.   The Service class, which represents the Service Layer is the main Facade in the application. It really is a great example of the Facade Pattern in action.

As you said, the Facade is an important pattern.
Dan McMillan, Sep 23, 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.