konmik / konmik.github.io Goto Github PK
View Code? Open in Web Editor NEWBlog: Programming theory, Java, Android
Home Page: http://konmik.com
Blog: Programming theory, Java, Android
Home Page: http://konmik.com
What category are we going to place AysncTaskLoader or how do we Use Presenters with AsyncTaskLoader which is attached to a Fragment when using MVP Pattern
The method getView() on Nucleus is deprecated, would be a good idea to change the example to use restartable or deliver methods
Throwing in RxJava without any preface in the introduction of MVP throws in a new element that developers may not be familiar with. This breaks the flow of trying to understand the issue the article is about.
https://github.com/konmik/konmik.github.io/wiki/Introduction-to-Model-View-Presenter-on-Android
Technically speaking, MainPresenter has three threads of events: onNext, onError, onTakeView.
It's misleading to use "thread" here - I think you did not mean a Thread. Please change it.
getView() of RxPresenter is deprecated and we should use restartableXX and deliverXX methods for pushing data from RxPresenter into View.
There is no good explanation how these methods work. What is "latest onNext value"?
How do we set the user input from the view back to the models (no example of that either). This library should be simple. Maybe it is because I'm a little stupid but I don't understand a thing of it...
You mentioned here that people should not use this
.switchMap(it -> serverApi.login(name, password)
.switchMap(loginResult -> serverApi.requestChatToken(loginResult.loginToken)
.switchMap(chatToken -> serverApi.doOtherThingsAfter(chatToken))))
but instead use this
LoginResult loginResult = serverApi.login(name, password);
String chatToken = serverApi.requestChatToken(loginResult.loginToken);
return serverApi.doOtherThingsAfter(chatToken);
This is the classic usecase for USING RxJava, NOT avoiding it. The network is inherently asynchronous & your blocking recommendation is a terrible suggestion as each API call blocks the thread that its run in
RxJava can use network backpressure to request only the set of details you need without actually blocking any thread thru non blocking IO & without paying thread switching cost if you use RxJava variant. So your example is completely counter productive
This is a great post!But I doubt the situation in case 3 .
Fragment with setRetainInstance(true) | no change | save/restore | save/restore
How to provethe retained fragment will re-create after the process restart?
The KISS principle link on MVP page (https://github.com/konmik/konmik.github.io/wiki/Introduction-to-Model-View-Presenter-on-Android) leads to 404 Not Found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.