12. roboguice.org
User Interface
Service Layer
ed a string
wha t if I ne e?
d own her
r esource
Persistence Layer
service layer: goo.gl/7NQVZ persistence layer: goo.gl/j5u74
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
}
}
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
}
}
15. roboguice.org
must extend
RoboActivity
RoboListActivity
RoboFragmentActivity
RoboListFragmentActivity
...
26. kevinsawicki.github.com/http-request/
http-request
A simple convenience library for using a HttpURLConnection to
make requests and access the response.