kandi X-RAY | MVP-Android Summary
kandi X-RAY | MVP-Android Summary
MVP-Android
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create view
- Set the activity s login state
- Set the instance to be saved
- Initializes the login UI
- Authenticates against the given username and password
MVP-Android Key Features
MVP-Android Examples and Code Snippets
Community Discussions
Trending Discussions on MVP-Android
QUESTION
I started learning MVP in the last couple of days and I found this interesting tutorial. I followed the code step by step to implement login functionality in my app. However, I still have difficulties understanding where the input validation should be! In the tutorial inside the LoginInteractorImpl
class inside the login method (2 functionalities in one method!). My questions is, why would I have to reach the Interactor class to validate the credentials? Why not validating the input in the Presenter
class and if the input is correct I pass it to the Interactor?
ANSWER
Answered 2017-Feb-03 at 18:52The input validation could be inside the view or the presenter, but is not the idea. The idea is to have all the "business logic" inside the interactor, while the activity is "dumber" as possible, and the presenter is the link between those two.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MVP-Android
You can use MVP-Android like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the MVP-Android component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page