Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can also check [**MVP**](https://github.com/ahmedeltaher/Android-MVP-Archite

**Why Promoting MVVM VS MVP:**
- ViewModel has Built in LifeCycleOwerness, on the other hand Presenter not, and you have to take this responsiblty in your side.
- ViewModel doesn't have a reference for View, on the other hand Presenter still hold a reference for view, even if you made it as weakreference.
- ViewModel doesn't have a reference for View, on the other hand Presenter still hold a reference for view, even if you made it as weak reference.
- ViewModel survive configuration changes, while it is your own responsiblities to survive the configuration changes in case of Presenter. (Saving and restoring the UI state)

**MVVM Best Pratice:**
Expand All @@ -26,15 +26,15 @@ You can also check [**MVP**](https://github.com/ahmedeltaher/Android-MVP-Archite
-------------------

**Coroutines :**
Is light wight threads for asynchronous programming, Coroutines not only open the doors to
Is light weight threads for asynchronous programming, Coroutines not only open the doors to
asynchronous programming, but also provide a wealth of other possibilities such as concurrency, actors, etc.

----------

**Coroutines VS RXJava**
-------------------
They're different tools with different strengths. Like a tank and a cannon, they have a lot of overlap but are more or less desirable under different circumstances.
- Coroutines Is light wight threads for asynchronous programming.
- Coroutines Is light weight threads for asynchronous programming.
- RX-Kotlin/RX-Java is functional reactive programming, its core pattern relay on
observer design pattern, so you can use it to handle user interaction with UI while you
still using coroutines as main core for background work.
Expand All @@ -50,7 +50,7 @@ They're different tools with different strengths. Like a tank and a cannon, they
, database , any background processes , sure you can use RX in such cases too, but it looks like
you use a tank to kill ant.*
- RX-Kotlin : *When you would to handle stream of UI actions like : user scrolling , clicks ,
update UI upon some events .....ect .*
update UI upon some events .....etc .*


**What is the Coroutines benefits?**
Expand Down Expand Up @@ -115,8 +115,8 @@ They're different tools with different strengths. Like a tank and a cannon, they

**Keep your code clean according to MVVM**
-----------------------------
- Yes , liveData is easy , powerful , but you should know how to use.
- For livedate which will emit data stream , it has to be in your
- Yes , liveData is easy , powerful , but you should know how to use it.
- For livedata which will emit data stream , it has to be in your
data layer , and don't inform those observables any thing else like
in which thread those will consume , cause it is another
- For livedata which will emit UI binding events, it has to be in your ViewModel Layer.
Expand Down