Input about API design interface
Input about API design interface
- Subject: Input about API design interface
- From: Pascal Robert <email@hidden>
- Date: Sun, 16 Sep 2012 15:22:08 -0400
Hi guys,
I'm going to add some stuff (MS Exchange and CarDav support…) to ERGroupware in the next couple of months and I'm wondering how I should construct the API.
Each groupware do mostly the same (adding events, getting a list of contacts, etc.), the main difference is how they do it. For example, CalDav is an extension of WebDav + XML for the body, and MS Exchange is using SOAP.
So I was thinking of the following:
- Using interfaces for common methods (createFolder, fetchEvents, etc.) and have a store (MSExchangeStore, CalDavStore, etc.) that will implements those interfaces.
or
- Using a type to specify the kind of store we will connect to. For example, when constructing a CalendarStore, the constructor will ask for a type (MSExchange, etc.) and the addEvent method will check the type of store to call the corresponding method to add the event in the asked store.
or
- Using interfaces + delegates.
Any input?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden