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

Relation with MVP #9

Open
Konrad-Morawski opened this issue Oct 14, 2016 · 1 comment
Open

Relation with MVP #9

Konrad-Morawski opened this issue Oct 14, 2016 · 1 comment

Comments

@Konrad-Morawski
Copy link

Hello Konstantin,
I'm trying to wrap my head around this pattern.
I think I get the gist of it: I appreciate the benefits of immutability and purity, how it simplifies tracking changes, it makes sense.
I'm also fairly familiar with MVP on Android.

I don't really get why they're mutually exclusive though - so apparently something escapes me.

In MVP, the Presenter is notified about user actions (detected on UI level), reacts to them by notifying the Model and propagates the results back to the layout.

But it can very well propagate them back by dispatching Reducer actions - right? Why not?

Basically I fail to see why would both these approaches rule eachother out rather than complement. Is it semantics? Doesn't Store become an alias name for the Presenter? What is it that I'm missing?

Thanks for any insights / clarifications

@konmik
Copy link
Owner

konmik commented Oct 14, 2016

Hi, the difference in fact is between OOP and FP.

In OOP you have an entity (collection of mutable variables) that need to be notified, react, fight multithreading issues, fight with order of variable changes, fight with lifecycles, etc. There is a lots of "accidental complexities" with this approach. Your app does not need them, why do you fight with them then?

FP is the main cure against such complexities. Instead of fighting with complexities, FP removes them.

So, mixing MVP with Flux is the same as mixing OOP with FP. You get half of your app cured, but...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants