It’s a well known fact that Prism is the best thing since sliced bread. However, more often than not, I see one project after the other where Prism killed the project. And here’s why;
Prism is a very cool framework. It helps us implement a LOT of very very important Design Patterns; including:
1. View Injection
2. Dependency Injection
3. Inversion of Control (with the help of Unity, or any other IOC Containers.)
4. Event Aggregation.
5. MVC-like UI Architecture (be it MVC, MVP, PresentationModel, or MVVM)
Now don’t get me wrong. All of the above Design Patterns are extremely important, and being an architect without being fluent with them all is impossible. BUT, and that’s a big BUT.
What if I don’t need it all?
Almost everything Prism gives me as a bundle, I can get as parts. If I need DI then I’m going to add DI. If I need MVVM I’m going to use MVVM. Prism gives me too much, and it’s all bundled!!
Of course, one might argue that you don’t have to use everything in Prism, just use some parts of it, and they would be right. Only that’s not what I’m seeing in the industry in projects that implemented Prism. They don’t implement a subset of it, they try and implement it all… emphasis on TRY.
IMHO, if there’s one deadly sin in the software arena, is to use a Design Pattern you don’t understand. This causes that biggest problems of all, and as far as I’m concerned I’d rather see Anti-Patterns then see someone use IOC Containers without fully understanding who exactly is creating the dependencies, and how does this magic work. Magic == Bad.
To top all that, the one thing that Prism brings to the table that is Prism’s own doing is View Injection / Region management.
It’s a sophisticated Design Pattern, which I don’t like for two reasons.
a. Who the hell needs it? This is an overkill for 95% of projects. I do agree that for 5% it’s important, but for the rest it adds a layer of sophistication that is purely redundant!
b. It’s sophisticated. And sophisticated == bad. Good architecture is simple architecture, or as my former CEO would say KISS.
Dedicated to Alex Golesh & Tomer Shamam