OOP / Pattern: Customizing layout based on environment?

If you design your view(s) in terms of interfaces, you can handle those differences in the implementations. For example, let's assume the labelVisible method is in a view called LabelView . It would have a method labelVisible() and then you might have a KioskLabelView WebLabelView and DesktopLabelView .

The correct view class would be injected based on the environment. Because the differences are subtle, I suspect that most of your view class(es) will be implemented in an abstract implementation with just these subtle details left to the subclass implementation.

This is what the Abstract Factory pattern was made for.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions