Support for design patterns

Aug 2, 2012 at 1:04 PM

What about the idea to provide support for built-in functionality to model patterns? For instance, if a programmer wants to implement Observer pattern, the tool can let the user apply such solution on classes and functions. Another example of using Observer pattern is like class A is notifier and class B is subject. In this case when a user selects class A as notifier and class B as subject then the code automatically implements required functionality. What do you guys say?

Aug 5, 2012 at 12:07 AM

C# and .Net already contains implementations of the observer pattern (Events, IObservable etc...)

Aug 5, 2012 at 7:08 AM

Thanks Gilnaa for your feedback. I am aware of the development languages support for modeling patterns. Let say C# allows to implement IObservable interface and then adds a skeleton function that needs to be manually filled. However, in the new functionality, we can select a function, let say UPDATE, and declare it as a participant of Observer class. The benefit may not be obvious for a pattern like Observer. But if you think about an MVC pattern, with a couple of clicks the MVC pattern can be added to the design. This is my general idea about the use of patterns and it is not necessary that we incorporate it in Mad Library at this stage.

Aug 14, 2012 at 4:29 AM

Implementing design patterns are already supported in the .NET Framework. It's like saying we have to create our own cryptography class and just make a mistake while there is already a robust existing one.