I’ve been assigned to take over some WPF-based UI.

The guy that has developed it did a tremendous job and now he’s moving into a higher position, where I’m pretty sure he’ll shine.

While adding new features to his code I realized how much he has struggled to write clean XAML and clean view models. The code looks great, but … the customer is asking for many, many special usage scenarios where the UI is constantly manipulated and many UI events must be handled. To manipulate the view from the view model one has to implement a messaging bus and this is not a nice endeavor. So I’ve notified the customer and the technical board that I’ll make the code work using only event handlers and I’ll try to follow the MVVM pattern in a future iteration. And they’ve agreed, painfully aware of the situation: the industry is filled with buzzwords and patterns and people that turn them into a dogma; many, many times a pattern or a “best practice” will simply not fit the current situation and it takes a senior developer to speak up and shine the truth on the younger ones.

Advertisements