‎2005 Feb 18 10:36 AM
Hello Friends,
I would like to know, if ABAP Objects can be used to do pattern oriented programming ?
For example GANG of four has provided almost more then 30 design pattern ( MVC, singelton, Obserable, FACADE,,,etc) can we implement patterns using ABAP ??
Many thanks
Haider Syed
‎2005 Feb 18 10:50 AM
Hi,
of course, you can. This week I implemented the observer pattern in one of my bsp applications and it works great. All the popular patterns like command, singleton, factory, visitor are very easy to implement when using ABAP OO.
regards
Thomas
‎2005 Feb 18 11:12 AM
Hi Thomas
nice to listen that u implemented observer pattern in BSP, is there some kind of utility avaiable like in java we have Observer and obserable ( interface and class) in I think java.util package avaiable, or all logic of observer you have implemented by your own ??
Thanks
Haider Syed
‎2005 Feb 18 10:51 AM
Hello Thomas,
It would be great if you could provide a link which introduces the various design patterns.
Regards,
Anand Mandalika.
‎2005 Feb 18 10:53 AM
‎2005 Feb 18 11:07 AM
Hi
Thanks to all for their reply
Yes it would be great, if some one point out any useful resourse in this regard,
Many thanks,
Haider Syed
‎2005 Feb 18 11:20 AM
Hi,
Take a look at the following site:
It has all the basic patterns from the GOF and a lot more. I can recommend the ones from Martin Fowler but be sure you start with the ones from the GOF.
All patterns are described by using UML so it's very easy to translate them into ABAP OO code.
Regarding your other question. For the observer pattern I used an interface which the SAP had already created if_cm_observer and created my own abstract observable class. The observable class is nearly a 100% copy of the java.util. one
regards
Thomas
‎2005 Feb 18 11:54 AM
hi
Thanks for sharing the knowledge, I was in search of if_cm_observer interface
with regards,
Haider Syed.