Building software for many learning centers without rewriting it each time

CenterSubject

Each center chooses the subjects it teaches in its settings.

UserRole

One person can hold several roles.

RolePermission

What each role may do is defined in one place.

RoleScreen

For the same task, each role sees the screen that suits it.

Four concerns kept separate. Changing one does not force changes in the others.

Every learning center works in its own way. An English center arranges classes differently from a math center. Progress is tracked differently, and so is reporting to parents.

If every difference gets its own piece of code, a few subjects later the software becomes so tangled that nobody dares to change it.

Four concerns, kept apart

In a platform for learning centers that we built, we separated four things, so that changing one does not force a change in another:

  • Center and subject. Each center chooses the subjects it teaches in its settings. No code change is needed.
  • User and role. One person can hold several roles: center owner, advisor, operations, accountant, teacher.
  • Role and permission. Which menus a role sees and what it may do is defined in one place.
  • Role and screen. For the same task, an accountant and a teacher see two different screens, each showing what that person needs.

As a result, adding a new subject is a settings change. Adding a new role is adding a profile. Nothing else has to be modified.

What to take from this

Before choosing technology, list the things that will change independently of each other. If two things change for unrelated reasons, do not let them live in the same place.

Facing a similar problem?

Tell us what you are building or fixing.