Lesson 21

[Sprint Four] - Refactoring Feedback

More refactoring

PRO

Lesson Outline

Sprint Four

We are going to begin our next sprint now. For those of you not following the project management module, these are the items we are including in this sprint:

  • refactor: move feedback service into shared folder #96
  • refactor: feedback form to be simplified #104
  • feat: feedback button on the home page #103
  • feat: see the dates that feedback forms were submitted #102
  • feat: send a client a link to the questionnaire #14
  • feat: results of the users questionnaire to be visible #15

This will be the last sprint that we complete for this module!

Refactor: Move feedback service into shared folder

We are going to start this sprint with our refactoring tasks, focusing on the feedback features first. We will tackle refactoring the FeedbackService first - if you are not doing the project management lessons, this was the reasoning for why we are addressing this now:

There was one issue raised recently where we "broke the rules" by using the FeedbackService from the feedback feature from within our clients feature. If a service is within the feedback grouping folder, then it should only be used by code within that folder. What we should do is make sure that we move that FeedbackService into a shared folder. This isn't incredibly important at this point, but we really should draw a clear line and not make exceptions on our architecture. If we do start getting sloppy with things like this it can snowball and make our lives difficult later on down the road.


Project management

Remember to move the card for this task to the Test column, and create a new task branch to work on.


Our approach for this one is going to be relatively straightforward - move it and see what breaks! Remember, we have our tests in place protecting us so we don't have to be too scared about making an architectural change like this.

Move these files:

  • feedback/data-access/feedback.service.ts
  • feedback/data-access/feedback.service.spec.ts

to

PRO

Thanks for checking out the preview of this lesson!

The full version of this lesson is only available to pro members. If you would like full access to this module and all of the other pro modules on Elite Ionic you can become a pro member (or log in if you are already a member).