Educado-App / educado-mobile

The repository for the educado mobile education application
GNU General Public License v3.0
1 stars 3 forks source link

Refactor `StorageService.js` by Splitting Into Smaller, More Readable Files #219

Open ITPini opened 11 months ago

ITPini commented 11 months ago

Issue Description

The StorageService.js file in our codebase encompasses various functionalities, making it complex and difficult to maintain. This contradicts our coding best practices that emphasize readability and modular design.

Steps to Reproduce

  1. Review the StorageService.js
  2. Observe the multiple responsibilities student information management, course data handling, etc.) handled within a single file.

Expected Behavior

Ideally, the code should be modular, with separate files for distinct functionalities. This would enhance readability and make maintenance easier.

Actual Behavior

The file combines various unrelated functionalities, leading to a lack of clarity and potential difficulties in maintenance and scalability.

Proposed Solution

Refactor StorageService.js by splitting it into smaller, more focused files. For instance:

Stefan's suggested solution:

Additional Information

Feedback Reference

"Perhaps we should split up this file by moving the different parts into separate files. Would make it more readable"

_Originally posted by @Jatewo in https://github.com/Educado-App/educado-mobile/pull/214#discussion_r1407419142_

Donhusum commented 10 months ago

Se my suggested solution in the description