In my Application, I wanted to seperate GUI and business logic with some kind of ModelViewPresenter-Design.
Therefore I made some Presenter classes, which have not much more code than the properties my forms are databound to.
To provide persistance (load and save) I made new classes with methods setting the properties of the above mentioned presenter classes to seperate concerns (present data to GUI and persist data).
Since my presenter classes are now only datacontainers without any behavior, I wonder if I should better merge persistance and presenter to simplify my code. It seems very overdone to me as it is at the moment.
Here is some C# snippet from one of the Persistance classes:
public override void LoadData()
{
Presenter = (PersonalColorSettingsPresenter) PresenterFactory.GetPresenter(m_User, "ColorSettings");
loadData();
}
private void loadData()
{
var color = Settings.GetSelectionColor(m_User);
Presenter.ActiveRowBackColor = color.BackColor;
Presenter.ActiveRowBackColor2 = color.BackColor2;
Presenter.IsActiveRowBackgroundGradientActive = color.GradientActive;
Presenter.ActiveRowForeColor = color.ForeColor;
}