i in need develop application used access(get data from) web accessible resources twitter,facebook,linkedin,salesforce etc. using appropriate rest api's. can please suggest me pattern , architecture design logic of application?
since coupling many online providers, there's increased chance api implementation changes overtime.
- think api services other datasource. implement api service requester
provider
class. create abstraction betweenprovider
, actual process (where use data once it).provider
act source of data rest of application. changes api service not affect whole application. - create separate provider classes each online platform need. create
model
represents data api services , passmodel
object betweenproviders
,consumers
.
something this
public interface ifbconnect { public fbdata getfbdata(); public bool postfbdata(); //etc. etc } public class facebookprovider : ifbconnect { public fbdata getfbdata() { //call webservice //parse json model object return fbdata } }
Comments
Post a Comment