Facade patterns: The foundation to web services

Discussions about technical architecture

Facade patterns: The foundation to web services

Postby emence » Mon Apr 19, 2010 10:34 am

When in the design phase of your project, one of the common decisions that needs to be considered is if you plan on exposing your business objects/modules to other applications or customers. This decision can then lead to making your business objects into flexible web services. Many times these decisions can become overwhelming during the design phase and are abandoned. This leads to tightly coupled code with no room to expand or share their functionality.

Enter the simple Facade design pattern.

By simply adding a Facade layer to your design, you can prepare for immediate or future web service implementation. The basics of a Facade pattern offer an 'interface' to your business modules and database code. This interface layer consists of methods that either pass directly through to identical methods on the business objects or they combine multiple business calls into one interface method. This allows for easier updates to application code, better control of your business logic, and most importantly an easy path to web service development.

The Facade layer you create easily maps to a fully functional web service, with many of today's development IDE's like Visual Studio automatically recognizing the interface methods on the Facade and allowing you to expose them as web methods on web service layer. Even existing applications can be updated by introducing the Facade pattern into the application logic. And, by using the Facade pattern, you also made life easier when trying to performance tune or scale your application code later down the road.

So if you need web services now, plan to use them in the future, or aren't quite sure if you'll ever need them, consider always introducing a Facade interface design pattern into your application code and feel confident that you'll have a 'web service' ready application.

Feel free to comment or ask questions. :ugeek:
Image EMence eCommerce Architect
Contact me: ImageImage services@emence.com
emence
Site Admin
 
Posts: 5
Joined: Sun Mar 14, 2010 9:42 am

Return to Architecture

Who is online

Users browsing this forum: No registered users and 12 guests

cron