punto13
New member
- Joined
- Apr 22, 2010
- Messages
- 3
- Programming Experience
- 10+
Hi all,
I've been working with a lot of APIs from diferent products. Now that I'm building my own, I have a .... 'arquitecture issue'.
What I see in others and try to imitate is:
CoreAnimalEngine (a class that manages all. The collections of items and most important, all the activity to Database).
This CoreAnimalEngine has 3 animal instances "Dog, Cat, Horse".
How can I implement a Dog.Save (in the animal class instead of in CoreanimalEngine), if the connection to database and all the application control belongs to Dog's father class CoreAnimalEngine?
I want my API to be used this way
dim mCore as New CoreAnimalEngine
dim mDog as new Animal = mCore.getAnimal("dog")
...
...
mDog.EjeColor = "blue"
mDog.Save
That's it.
hope my explanation helps )
Thanks a lot!
I've been working with a lot of APIs from diferent products. Now that I'm building my own, I have a .... 'arquitecture issue'.
What I see in others and try to imitate is:
CoreAnimalEngine (a class that manages all. The collections of items and most important, all the activity to Database).
This CoreAnimalEngine has 3 animal instances "Dog, Cat, Horse".
How can I implement a Dog.Save (in the animal class instead of in CoreanimalEngine), if the connection to database and all the application control belongs to Dog's father class CoreAnimalEngine?
I want my API to be used this way
dim mCore as New CoreAnimalEngine
dim mDog as new Animal = mCore.getAnimal("dog")
...
...
mDog.EjeColor = "blue"
mDog.Save
That's it.
hope my explanation helps )
Thanks a lot!