Bahmni@next meets OpenMRS 3.0

@dkayiwa and @mksd, thanks for your comments

Your feedback and challenge on React and Rewrite is fair and I will let you read this great post and comments on moving Bahmni codebase from AngularJS to React.

In addition here are my thoughts…

Firstly, I don’t think the focus here @mksd is to Reactify the code to make it look current/modern. Neither the current code state is ugly that it could be solved with just refactoring to make it read better. The rationale for slicing was to uplift the overall fronted architecture and technically speaking - just pure slicing of current codebase for MF is possible but I wouldn’t underestimate the efforts and I would challenge on the value it would provide as-is with current stack?

While Joel Spolksy 20 years old essay is still fair to indicate that “Rewriting the code to keep the same functionality is the worst strategic mistake that an organization can make” - But at the same time there are situations where attempting an incremental rewrite is comparatively a better approach. Here are few important question (which are inter-related) that would justify a rewrite and should eventually pay off for software that is planned to be maintained for dozens of years like Bahmni…

  • Is the original technology unsupported?
  • Is the capability rapidly diminishing in the industry?
  • Is the original technology choice preventing you or constraining you from making improvements?

With no emotions attached to React, for me is just one of the current mainstream frontend frameworks with a larger community and perhaps its more of piggybacking OpenMRS to have consistency for contributors. One of the thought was to make Bahmni completely framework independent e.g. using a web standard like web components, however to use it productively we might still need to use a framework - hence, have the same issues. And no-matter whatever we use now, we may land-up in the same situation as you rightly called out @dkayiwa, i.e. the current mainstream would suffer depreciation sooner than we can estimate.

This is where want to take the opprotunity to rethink about Bahmni frontend and decouple the overall architecture with the value proposition of

  • Uplift the user experience of Bahmni as we rewrite
  • Cleanly componentize UI so that we can deal with obsoleting frontend frameworks more gracefully and incrementally
  • Reuse OpenMRS 3.0 Frontend and not reinvent the square wheel to duplicate future problems

Lastly I would argue on having too may frontend stack to be supported @dkayiwa. Perhaps micro frontend anarchy would be a maintenance disasters if there aren’t any plans for standardization and consistent approaches. I know @dkayiwa you intent was more towards wrapping currently invested codebase to be used in the new Architecture - I just wanted to call out the future consequences.

These are some of the great pointers for us to discuss in the PAT call tomorrow.

Regards

1 Like