Food for thought – Designing Presentation Layer
I was having discussion with a fellow architect where he shared an idea with me. It was pertaining to automating forms creation in presentation layer. Normally there are techniques like visual inheritance relevant here. But what he did is created few custom controls. Specialty of these controls is they take an object graph and automatically build the UI depending on the properties and associations of the object.
1) If tomorrow you update your object model with additional properties you don’t have to alter your UI as its auto generated.
2) You update your custom control UI changes throughout the application.
This would normally require you to map every primitive type to a UI control, but what he did is created his own custom types by inheriting from primitive types & these custom types would then map to the corresponding UI control. Though he has a successful running application build on this framework I am yet to try it. Let me know if you have similar ideas (can I call this a pattern ???) for UI or if you use this one in your project.