12. roboguice.org
User Interface
Service Layer
ng
ee d a stri
at if I n ?
wh
do wn here
r esource
Persistence Layer
service layer: goo.gl/7NQVZ persistence layer: goo.gl/j5u74
Wednesday, February 6, 13
13. roboguice.org
public class UserRepository {
@InjectResource(R.string.public_key) String publicKey;
public void saveProfile(UserProfile profile) {
// user publicKey to do some encryption
// Now, save the encrypted profile to db/api/etc
}
}
Wednesday, February 6, 13
14. roboguice.org
public class UserRepository {
@InjectResource(R.string.public_key) String publicKey;
@Inject protected AuthService authService;
public void saveProfile(UserProfile profile) {
// Get auth token from auth service then save
// user publicKey to do some encryption
// Now, save the encrypted profile to api
}
}
Wednesday, February 6, 13
15. roboguice.org
must extend
RoboActivity
RoboListActivity
RoboFragmentActivity
RoboListFragmentActivity
...
Wednesday, February 6, 13
26. kevinsawicki.github.com/http-request/
http-request
A simple convenience library for using a HttpURLConnection to make requests and
access the response.
Wednesday, February 6, 13