Architecture: It's Always a Tradeoff
We need to face it -- there are no absolute truths when it comes to software architecture ( I guess that's part of the reason the term always looks so fuzzy. ) Should we use REST? It depends. Should we use OR/M or direct database access? It depends. Sometimes even a big ball of mud can be a good option. The good news is that we can always answer "It depends" to any architectural question and always be correct. The bad news is that it is our role to figure out what does it depend on and come up with a viable trade off.
(This part III of a series -see Part I, Part II)
We need to face it -- there are no absolute truths when it comes to software architecture ( I guess that's part of the reason the term always looks so fuzzy. ) Should we use REST? It depends. Should we use OR/M or direct database access? It depends. Sometimes even a big ball of mud can be a good option. The good news is that we can always answer "It depends" to any architectural question and always be correct. The bad news is that it is our role to figure out what does it depend on and come up with a viable trade off.
The fact everything is a tradeoff doesn't mean that there aren't any cases where the trade-off is simple. For example, if you just have to build a couple of data entry screens and a simple database you probably shouldn't spend a couple of months evaluating your options, just write the damn thing in your spare time. Nevertheless, just hacking it can mean it wouldn't be extensible. If that's what you needed, then cool; iif not, maybe you should have considered that.
This is one of the reasons I don't like the term "best practices". It sends out a "you don't have to think anymore" message which is oh-so-incorrect. Patterns, on the other hand, don't send out this message, as they also include discussion on where to use them as well as their limitations and pointers to other patterns. Unless of course, patterns are seen as an end-goal rather than a means, in which case they look pretty close to "best practices".
To sum this post: Everything is a tradeoff. The most important bit here is to keep that in mind, even when the choices seems obvious. Awareness is the key to better decisions.

