Fixing the 7 Minute Workout app

As it stands now, the 7 Minute Workout (or Workout Runner) app can play only one specific workout. It needs to be fixed to support the execution of any workout plan built using Personal Trainer. There is an obvious need to integrate these two solutions. We already have the groundwork done to commence this integration. We've got the shared model services and WorkoutService to load data, enough to get us started.

Fixing 7 Minute Workout and converting it into a generic Workout Runner roughly involves the following steps:

  • Removing the hardcoded workout and exercises used in 7 Minute Workout.
  • Fixing the start page to show all available workouts and allowing users to select a workout to run.
  • Fixing the workout route configuration to pass the selected workout name as the route parameter to the workout page.
  • Loading the selected workout data using WorkoutService and starting the workout.
  • And, of course, we need to rename the 7 Minute Workout part of the app; the name is now a misnomer. I think the complete app can be called Personal Trainer. We can remove all references to 7 Minute Workout from the view as well.

An excellent exercise to try out yourself! And that is why we are not going to walk you through the solution. Instead, go ahead and implement the solution. Compare your implementation with the one available at checkpoint 5.4.

It's time to end the chapter and summarize your learning.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset