‎2010 Feb 15 11:22 AM
In my application I have some database tables with a persistency class. Some other objects are implemented by calling the service bus, some others are implemented by function modules.
I want that the developer doesn't need to know where the object is coming from.
Therefore I want to implement the DAO pattern (Data Access Object).
I'm new on abap objects, so can somebody give me a working example or blog, or guidelines how to code this pattern?
‎2010 Feb 15 9:48 PM
I don't have an coded example here, but isn't it sufficient for this pattern to build an interface with some get- and set-methods? This interface can be implemented by several classes with different data retrieval logic. Then a static factory-method could do the job to decide during runtime which actual class is instantiated, returning the interface.
‎2010 Feb 15 9:48 PM
I don't have an coded example here, but isn't it sufficient for this pattern to build an interface with some get- and set-methods? This interface can be implemented by several classes with different data retrieval logic. Then a static factory-method could do the job to decide during runtime which actual class is instantiated, returning the interface.
‎2010 Feb 16 7:37 AM
I created a few class like you described and it works.
Now i'm going to implement the factory class.
Thanks