Sunday, 18 August 2013

Store the class into remote location in Android [on hold]

Store the class into remote location in Android [on hold]

pLets say you have instances of class RPComment that needs to get saved
somehow, via a Remote Store of some type./p pDraft up some code,
pseudo-code or a clear description that indicates how you would save these
comment objects to a remote store in such a fashion as to allow:/p pThe
Remote Store to be changed at some unknown point in the future, for
example, from Parse to a RESTful server, minimizing impact on the Android
code – particularly avoiding direct changes to theRPComment class itself.
(Don't worry about the API interface to the datastore unless that is key
to your solution.)/p pThe design pattern(s) adopted and implemented for
RPComment to be leveraged, minimizing code duplication, to allow other
objects (e.g. RPAnnotation) to be saved similarly./p pKey to our interest
in this problem are the design patterns and language features that you
would use to accomplish these two goals efficiently and cleanly,
maximizing OO reusability and flexibility while avoiding over-designed
code./p pMake any assumptions you would like, just make sure that you
clearly state your assumptions./p pe.g. Don't worry about the low level
details like networking code or asynchrony – focus on the *pattern*s that
allow 1) and 2) to be accomplished./p

No comments:

Post a Comment