# Mediator pattern or facade or …?

I'm writing an app which tracks device location and based on some factors (user gets an assignment), it needs to change the location tracking settings (for example, frequency).

I have an issue with how to design this.

// I left out methods to start\stop tracking
interface ILocationTracker
{
event EventHandler LocationChanged(Position pos);

void UpdateTrackingSettings(TrackingSettings settings);
}

interface IUser
{
}


I don't want to couple the IUser to the ILocationTracker, so I added this (I'm leaving fields out so it looks simpler to read):

class UpdateLocationTrackingSettings
{
public UpdateLocationTrackingSettings(ILocationTracker tracker, IUser user)
{
}

// I need to somehow start/stop it listening to AssignmendAdded event
public void Start() {
}

public void Stop() {
}

{
TrackingSettings settings = GetSettingsByAssignment(a);
_tracker.UpdateTrackingSettings(settings);
}
}


The questions I have:

• How to 'start' the UpdateLocationTrackingSettings? Should I have a façade for the location tracking which contains ILocationTracking and UpdateLocationTrackingSettings and calls Start() on each?

• I feel like for GetSettingsByAssignment I should use use strategy pattern. I am thinking to implement something like ITrackingSettingProvider which computes and returns the tracking settings based on the assignment.

• Is this overthinking\over engineering?

• Any suggestions of a different or better design?

• Don't try and fit the problem to a "Design Pattern". Figure out the problem, and then see if a commonly-accepted pattern will solve it. – Mark Benningfield Jan 20 '18 at 21:15
• @MarkBenningfield I know that theory, I am not trying to find patterns just for the sake of it. – Daniel Jan 21 '18 at 7:49

• Thanks, but you didn't mention which part I'm overthinking. I really don't want to couple the location tracker to the IUser. I already had a hunch I might be overthinking but I really don't want to couple things just for the sake of making it as simple as possible, I'd appreciate if you could share some feedback, thanks again – Daniel Jan 20 '18 at 20:27