-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Separate business logic from UI #721
Comments
Can I work on this @palisadoes @Sagar2366 ? |
Issue #700 has now been integrated into the pull request process. It will flag all Dart files that are longer than 300 lines to help with readability. Please make sure your contribution reduces file sizes to within this limit. |
@palisadoes and @Sagar2366 can I also work in with @sumitra19jha on this issue. |
@CyberWake I added you as you were the author of the original issue #715. Please work with @sumitra19jha to determine a way to figure out a layout that meets these goals. |
Sure sir |
Great. @CyberWake We will come with the best effective solution |
@rutvik11062000 I checked your code. @CyberWake and I have a conversation on this and we were currently implementing the provider for this solution as assigned by @Sagar2366 This particular file was being worked by @CyberWake |
@sumitra19jha and @CyberWake #721 issue suggests the separation of service from the UI. What #758 suggests is making a function layer between the UI and the service class file. Please see the graphic mentioned in 758 to have a better idea. |
@rutvik11062000 I have gone through the diagram. I am confused about its intended purpose. Why would we need this? When this issue will be resolved business logic and UI will be separated. The reason you stated for the need of issue #758 will be taken care of in this issue itself.
This will be taken care of by having a separate widget file itself. |
@rutvik11062000 I appreciate you for taking your time to explain to me this. I have few more doubts:
So as you can see to the best of my knowledge, point 5 will also be taken care of here in the issue. If point 5 is resolved, is there any need for having a separate distinct file for point 4? I am asking this because I want to make sure that we follow one single method for every UI-related part and logic-related part.Now coming to your point of test-codes. Yes you are right we currently don't have services and functions testing implemented properly. But That will be done after resolving this issue. We can add test code for functions and services separately with help of the provider. The code snippet you share is based on the previous implementation, but it will be taken care of after the provider addition. The test code will be very specific to UI itself. |
@sumitra19jha Actually we are talking about the same things but with a different approach. As this issue quotes "Making a universal class that stores all the data fetching functions" it gave everyone an ambiguity. This issue gave an idea that you both are doing the work of separating services by putting them into an actual class. There is no right and wrong in using the provider or MVVM as a service class both have their own pros and cons. talking about the MVVM pros against the provider:
|
@sumitra19jha I think we should take opinions from mentors and contributors about which direction we should follow😊. |
@rutvik11062000 The purpose here was to separate business logic from UI and to do that we will obviously use Issue #766 #765 #764 #763 #761 all will be covered here and there is no need to duplicate the issue just because the solution is different. Now coming to the use of MVVM or provider(State Management), I will leave it up to the mentor's recommendation of what should we use. @palisadoes @Sagar2366 @DeltaHarbinger All I am saying is either we should use MVVM or Provider but not both. If some files will be using the provider and some by using MVVM then this will destroy the code Uniformity.Now, coming to my opinion of the solution, I would recommend the provider as a lot of contributors have already worked on creating files(codes) related to it. The entire |
@rutvik11062000 as seen in the parent issue #715 there is a link to discussion thread. I guess @sumitra19jha and @CyberWake came to the conclusion of continuing with the provider. |
Parent issue : Refactoring of codebase and separation on data/UI #715
Issue Description:
Making a universal class that stores all the data fetching functions which are currently written individually for each and every file for their own use. Doing so would help in separating the Data fetching functions to a separate place and UI in a separate place. Also, there is an advantage of this as well some functions need not be written again like the
userinfo
.Issue Severity:
Medium
Environment Details:
Project Level
Observed Behaviour:
Business logic is not separated from UI.
Expected Behaviour:
Separate business logic from UI
Does this issue need immediate attention?
Yes
Please ask mentors/maintainers to assign if you are willing to work on this issue.
The text was updated successfully, but these errors were encountered: