Tuesday, November 3, 2015

Facade Design Pattern ( façade pattern)

A design pattern is a common way of solving a recurring problem. Classes in all design patterns are just normal classes. What is important is how they are structured and how they work together to solve a given problem in the best possible way.



  A Facade shields the user from the complex details of the system and provides them with a simplified view of it which is easy to use  It also decouples the code that uses the system from the details of the subsystems, making it easier to modify the system later.

  Facade design pattern is commonly used with Object Oriented Programming.  It Provide a unified interface to a set of interfaces in a sub system. Facade defines a higher-level interface that makes the sub system easier to use. 

Structure of Facade


Fig 1-1







Facade
The facade class abstracts Packages 1, 2, and 3 from the rest of the application.
Clients
The objects are using the Facade Pattern to access resources from the Packages.



References:
Fig 1-1 "Example of Facade design pattern in UML" by Fuhrmanator 
https://en.wikipedia.org/wiki/Facade_pattern :Facade Design Pattern From Wikipedia, the free encyclopedia

Tuesday, September 29, 2015

Windows Presentation Foundation (WPF)

What is WPF ?
    WPF is actually a new framework introduced with .NET framework 3.0 which actually puts forward a new set of classes and assemblies which allow us to write program more efficiently and flexibly. It uses Direct3D rendering which employs graphic card to render the out put on the screen. Thus the drawing in the from will be smooth and also there is a chance to utilize the hardware capabilities installed in your machine. In case of traditional GDI forms application, it is not possible to use advanced graphics capabilities and hence Windows Forms application will always be inefficient in comparison to WPF. Another important thing that I must address in this regard, GDI Windows forms application uses Operating system controls to build its application. Thus it is basically very hard to customize them in your own application. WPF controls are actually drawn over the screen, and hence you can customize controls totally and modify their behavior when required.