Skip to content

Instantly share code, notes, and snippets.

@gururani-abhishek
Last active October 29, 2023 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gururani-abhishek/0aec195d1affcf4303c770e72f641a8f to your computer and use it in GitHub Desktop.
Save gururani-abhishek/0aec195d1affcf4303c770e72f641a8f to your computer and use it in GitHub Desktop.
GSOC '23 Final Report - Mifos Mobile



GSOC '23 Final Report - The Mifos Initiative | Mifos Mobile 6.0


Contents

Pre GSoC Period

During the pre-GSoC period, my efforts were dedicated to a multi-faceted engagement with the Mifos project. I meticulously delved into the project's ecosystem by proactively addressing existing issues, devising effective code solutions that not only fixed problems but also demonstrated my technical prowess. Simultaneously, I enriched the community by generating novel issues, further enhancing the project's vibrancy. My consistent presence and interactions within the community forums and channels underscored my commitment to active engagement. Beyond code, I embraced the opportunity to comprehensively explore the Mifos project, gaining invaluable insights into its architecture and functionality. For me the pre-GSoC phase fostered a deeper connection with the project's mission and collaborative community spirit. During this period following PRs were made by me, and were also merged in the codebase.

  1. PR #1976
  2. PR #1996
  3. PR #2001
  4. PR #2019
  5. PR #2048
  6. PR #2065
  7. PR #2093
  8. PR #2101

Work Accomplished

Butterknife to ViewBinding Migration aka Getting Rid of Butterknife

  • In May 2023, we took a significant step in advancing the Mifos Mobile project by replacing the Butterknife Library, which had been used extensively as an alternative to findViewById. This change was prompted by the need for more modern alternatives and enhanced code readability. Two contenders emerged: ViewBinding and DataBinding from Android Jetpack. After careful evaluation, ViewBinding was chosen due to its seamless compatibility with our existing use cases and its promise of faster compilation. This transition also positions us well for our future plans to adopt Jetpack Compose, where ViewBinding's strengths continue to shine. This decision underscores our commitment to efficiency and adaptability in our development processes.
  • In order to ensure a systematic and comprehensive migration process across the entire project, I prioritized maintaining a well-documented approach. I initiated this effort by crafting an initial report, which received a positive signal from my mentor. Subsequently, I proceeded to execute the migration with a carefully devised plan, ensuring a structured transition. To guarantee transparency and clarity, I meticulously documented every step of the migration process. This documentation not only serves as a reference for future endeavors but also highlights my dedication to organized and efficient project management.
  1. Project Report : Getting Rid of Butterknife
  2. Buttknife to ViewBinding Migration Document
  • These are the merged PRs delivered by me.
  1. PR #2143
  2. PR #2147
  3. PR #2152
  4. PR #2153
  5. PR #2155
  6. PR #2161
  7. PR #2164
  8. PR #2165

Reviewing and documenting existing Pull-Requests

  • Within the Mifos Mobile project, a substantial backlog of existing pull requests (PRs) had accumulated since as far back as 2017/18. In response, I took on the task of reviewing these PRs during Fridays and weekends. Through diligent effort, I successfully managed to significantly reduce the PR count from an initial range of 160/170 down to a much more manageable 30. This proactive approach to addressing the backlog not only contributes to a streamlined codebase but also reflects a commitment to maintaining the project's health and vitality.

  • Driven by a desire to honor and acknowledge the contributions of all individuals who have played a role in the repository, I took a deliberate approach to handling the accumulated pull requests (PRs). My objective was not solely to close these PRs, but to ensure each contributor received their deserved recognition. To achieve this, I established a structured framework for PR review. This framework encompassed a range of actions: modifying existing PRs where necessary, offering guidance to authors on resolving PRs with Git conflicts, expressing gratitude to PR authors for their contributions, and maintaining thorough documentation to track the review progress. By adopting this methodical approach, I aimed to uphold a culture of appreciation and collaboration while systematically addressing the PR backlog.


  • Framework I created to Review existing Pull-Requests in Mifos Mobile
  • I took the initiative to create a Google Sheet that serves as a centralized repository documenting all the PRs that have undergone review. This systematic approach not only ensures that the review process remains organized and transparent but also provides an easily accessible reference point for tracking the progress of each PR. This endeavor further underscores my commitment to maintaining a structured and collaborative workflow within the project. Link to Pull Requests Review Document.

MVP to MVVM Migration

  • Recognizing the limitations of the existing MVP architecture in terms of scalability and unit testing, a crucial decision was made to transition the Mifos Mobile project. In July, we undertook the ambitious task of migrating the entire application from MVP (Model-View-Presenter) architecture to MVVM (Model-View-ViewModel) architecture. This shift not only addresses the project's current constraints but also aligns with modern software design principles that facilitate more modular, maintainable, and testable code. The commitment to such a substantial transformation underscores our dedication to enhancing the project's architecture and overall development process.

  • We have created a repositories package that lists all of the repository interfaces and their implementation. The reason for creating an interface was that it followed two fundamental SOLID principles:

    • Open/Closed
    • Dependency Inversion
  • This strategic shift is a testament to our commitment to not only addressing the project's immediate limitations but also to laying the foundation for a more adaptable, modular, and testable codebase. This monumental transition exemplifies our unwavering dedication to enhancing the project's underlying structure and the robustness of our development practices. Through this architectural metamorphosis, we are poised to achieve greater scalability and maintainability, which will undoubtedly contribute to the project's long-term success and innovation. Listing down all of my merged Pull-Requests related to MVVM migration :

  1. PR #2180
  2. PR #2201
  3. PR #2203
  4. PR #2217
  5. PR #2249
  6. PR #2254
  • The guidance of my mentor proved invaluable in the process of adopting a more reliable iteration of the MVVM architecture. Through insightful discussions, we arrived at the decision to leverage the repository pattern as a superior approach. By introducing the repository layer, we effectively established a robust intermediary between the intricate business logic and the underlying data layer. This strategic choice aligns with best practices and empowers us to maintain a separation of concerns while enhancing the overall maintainability and scalability of the project. The mentor's input played a pivotal role in shaping this architectural direction and underscores the collaborative nature of our pursuit for an optimal solution.

High Level Overview of the layered MVVM architecture used in Mifos Mobile. MVVM


Unit Testing

  • During the migration process from MVP to MVVM architecture, a pivotal aspect of our efforts involved the initiation of robust unit testing practices. Specifically, we directed our focus towards creating comprehensive unit tests for both ViewModels and Repositories.
  • I am pleased to report that I have diligently authored comprehensive unit tests for both view models and repositories, achieving an exemplary coverage rate exceeding 95%. This meticulous testing endeavor underscores our commitment to ensuring the robustness and reliability of the project.
  • To ensure the reliability and accuracy of our tests, we harnessed the power of well-established testing frameworks, namely Mockito and JUnit. By employing these tools, we aimed to enhance the project's code quality, promote early detection of issues, and facilitate a smoother transition to the new architecture. This dedication to establishing a strong foundation of unit testing reflects our commitment to delivering a stable and maintainable codebase within the evolving framework.

In-App Customer Support Chat through Rocket Chat

  • I have successfully developed a primitive in-app customer support chat feature, utilizing Rocket.Chat as the underlying platform. This new feature represents a significant stride in enhancing user experience and engagement within the application. By integrating a real-time chat mechanism directly into the app, we have streamlined communication between users and support personnel, facilitating swift and efficient issue resolution.

High level overview of the working of In-App customer support chat. High Level Overview of the working of In-App customer support chat


In-App Chat Feature version - 1

Working video of In-App chat feature version-1


  • This is the Work-In-Progress Pull-Request for the feature, there's a lot that has to be done over the version 1. And I'm looking forward to get it done.

Weekly Work Updates on Community Channel

  • Consistently updating the community channel with progress reports has been pivotal in maintaining focus and diligence throughout the project. This practice not only kept me accountable but also harnessed the power of collective support and feedback. By openly sharing achievements and challenges, I've cultivated transparency and a strong sense of community involvement, ultimately driving both personal growth and project success.

June 2 | June 9 | June 16 | June 23 | June 30 | July 7 | July 14 | July 21 | July 28 | August 4 | August 11 | August 18

Impact

  • One of the standout achievements was the successful migration from ButterKnife to ViewBinding. This transition not only modernized the codebase but also laid the groundwork for future integrations, such as Jetpack Compose. By meticulously documenting the process and maintaining an organized approach, I ensured that this change would be accessible to future contributors, contributing to enhanced code readability and development efficiency.

  • The commitment to addressing the backlog of pending pull requests demonstrated a strong dedication to the project's health. By meticulously reviewing and documenting each pull request, I not only streamlined the codebase but also acknowledged the valuable contributions of fellow developers. This approach cultivated a culture of collaboration and appreciation within the community.

  • The pivotal shift from MVP to MVVM architecture introduced a transformative change in the project's structure. The meticulously crafted repositories package, combined with comprehensive unit testing for ViewModels and Repositories, fortified the platform's reliability, scalability, and maintainability. This architectural evolution will undoubtedly contribute to long-term development efficiency and code stability.

  • The integration of an in-app customer support chat through Rocket.Chat showcased an acute understanding of user needs and experience. This feature empowers users with real-time communication for issue resolution, enhancing engagement and usability.

  • The weekly updates shared on the community channel emphasized transparency and accountability. By openly communicating progress, challenges, and achievements, I fostered a strong sense of community involvement and support, further enhancing the collaborative spirit of the project.

  • In summation, my contributions have revitalized the project's codebase, fortified its architecture, improved user experience, and nurtured a thriving community. The impact of my work extends beyond code, shaping a more vibrant and sustainable future for Mifos Mobile.

Scope for More Work?

  • The interaction of Mifos Mobile with the Fineract Back-End can be made more safer by including Gravity Adapter as a middle layer. There has been a few meetings related to this and further work on this should be a top priority.

  • The Mifos Mobile Project can be further Modularised, with each module focusing on a specific feature or functionality. This will enhance maintainability and will allow smoother parallel development.

  • With the foundation of ViewBinding in place, consider exploring the integration of Jetpack Compose for building user interfaces. Jetpack Compose is a modern UI toolkit that simplifies UI development and enables a more declarative approach to building UI components.

  • Beyond the current focus on unit testing and middle-layer testing, an important advancement for the Mifos Mobile project would be to incorporate automated UI testing and end-to-end testing. UI Testing can be done by utilising any existing framework like Espresso, it'll be good to integrate UI testing with Jetpack Compose migration.

Conclusion

  • From a personal perspective, the Google Summer of Code program has been an incredibly transformative experience for me. The invaluable guidance and insights shared by my mentors, enriched by their extensive years of expertise and their support, have been the driving force behind a remarkable evolution in my abilities as an Android Developer. This transformation is particularly evident when I compare my current skills to where they stood a few months ago. Throughout this journey, I've traversed a landscape of knowledge, immersing myself in the intricacies of SOLID principles, MVVM Architecture, Layer Migration, Unit Testing, Feature Planning, and seamlessly integrating them into our project's framework. The strides I've achieved owe a great deal to the profound impact of the Google Summer of Code program.

  • Throughout the entire process, my community, The Mifos Initiative, has consistently provided unwavering support. Their encouragement and assistance have played an instrumental role in guiding me through every step of this journey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment