Skip to content

Commit 816985f

Browse files
README updated
1 parent f80a59c commit 816985f

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,52 @@ Allow the user to tap an issue to display next screen (detail screen) containing
2121
All the comments should be shown on the detail screen. The complete comment body and username of each comment author should be shown on this screen.
2222

2323
Implement persistent storage in the application for caching data so that the issues are only fetched once in 24 hours. The persistent storage should only contain the latest data and any old data can be discarded.
24+
25+
26+
### Libraries
27+
* [Android Support Library][support-lib]
28+
* [Android Architecture Components][arch]
29+
* [Android Data Binding][data-binding]
30+
* [Dagger 2][dagger2] for dependency injection
31+
* [Retrofit][retrofit] for REST api communication
32+
* [mockito][mockito] for mocking in tests
33+
34+
35+
[Gson](https://code.google.com/p/google-gson/) is another popular choice and being a smaller library than Jackson, you might prefer it to avoid 65k methods limitation. Also, if you are using
36+
37+
<a name="networklibs"></a>
38+
**Networking, caching.** There are a couple of battle-proven solutions for performing requests to backend servers, which you should use rather than implementing your own client. We recommend basing your stack around [OkHttp](http://square.github.io/okhttp/) for efficient HTTP requests and using [Retrofit](http://square.github.io/retrofit/) to provide a typesafe layer.
39+
40+
41+
**RxJava** is a library for Reactive Programming, in other words, handling asynchronous events. It is a powerful paradigm, but it also has a steep learning curve. We recommend taking some caution before using this library to architect the entire application. We have written some blog posts on it: [[1]](http://blog.futurice.com/tech-pick-of-the-week-rx-for-net-and-rxjava-for-android), [[2]](http://blog.futurice.com/top-7-tips-for-rxjava-on-android), [[3]](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754), [[4]](http://blog.futurice.com/android-development-has-its-own-swift). For a reference app, our open source app [Freesound Android](https://github.com/futurice/freesound-android) makes extensive use of RxJava 2.
42+
43+
If you have no previous experience with Rx, start by applying it only for responses from app's backend APIs. Alternatively, start by applying it for simple UI event handling, like click events or typing events on a search field. If you are confident in your Rx skills and want to apply it to the whole architecture, then write documentation on all the tricky parts. Keep in mind that another programmer unfamiliar to RxJava might have a very hard time maintaining the project. Do your best to help them understand your code and also Rx.
44+
45+
Use [RxAndroid](https://github.com/ReactiveX/RxAndroid) for Android threading support and [RxBinding](https://github.com/JakeWharton/RxBinding) to easily create Observables from existing Android components.
46+
47+
A collection of samples using the [Architecture Components](https://developer.android.com/arch):
48+
49+
- [Lifecycle-aware components](https://developer.android.com/topic/libraries/architecture/lifecycle)
50+
- [ViewModels](https://developer.android.com/topic/libraries/architecture/viewmodel)
51+
- [LiveData](https://developer.android.com/topic/libraries/architecture/livedata)
52+
53+
54+
### Test Frameworks
55+
56+
**Use [JUnit](https://developer.android.com/training/testing/unit-testing/local-unit-tests.html) for unit testing** Plain, Android dependency-free unit testing on the JVM is best done using [Junit](https://junit.org).
57+
58+
#### Local Unit Tests
59+
##### ViewModel Tests
60+
Each ViewModel is tested using local unit tests with mock Repository
61+
implementations.
62+
##### Usecase Tests
63+
Each usecase is tested using local unit tests with mockito & junit
64+
##### Repository Tests
65+
Each Repository is tested using local unit tests with mockito & junit
66+
67+
[Medium]https://medium.com/mindorks/effective-livedata-testing-13d17b555d9b
68+
69+
https://medium.com/mindorks/unit-testing-for-viewmodel-19f4d76b20d4
70+
71+
https://medium.com/mindorks/unit-testing-viewmodel-part-2-4a1fa93d656d
72+

0 commit comments

Comments
 (0)