Why serious .Net developers should stop building LOB “frameworks” which look promising on the outside and are inherently simplistic on the inside.

Introduction

Indeed, a provocative title in this article. For a good understanding what I mean, you should first read my previous article on LightSwitch which is in my view simple on the outside but rich on the inside. A property which I see as a great quality but which sometimes can confuse people and sometimes raises following statement: “it looks simple, so it can’t be good”, which is for the specific case of LightSwitch completely wrong of course.

What are you doing when you don’t use LightSwitch?

Honestly, personally I can hardly imagine any longer. :)

If you want to build software in a predictable and robust way, you will probably want to use kind of framework approach. I don’t know that many complete end-to-end line of business frameworks. So, in most cases and especially in enterprises, software development teams roll their own framework.  In practice, this means bringing together a whole series of technologies, SDKs, design patterns, etc.   Mostly, this is done by the most competent people of the team and they mostly share a common property: they are quite good in “abstracting” things. Sometimes, they are so good in abstracting things, that in the very end, they are the only persons around that still understand the abstractions they invented. Since they basically bring together a whole series of technologies, which they know quite well but don’t have the complete intimate knowledge about, the eventual framework lacks often coherence and consistency.

Measuring the quality of the framework

Now, let’s stay optimistic and let’s assume your framework leads to good results. What can be the root cause of this? Now let’s suppose that the usage of your framework is highly complex (so… not simple on the outside) because, and I can’t find a less silly example, it uses and requires intimate  knowledge about quantum mechanics. How will you measure the qualities of your quantum mechanics based framework? Let’s give it a try.

  • The first and most easy explanation can be because your framework is intrinsically extremely good. Great, commercialize it !
  • A second reason can be that people using the framework are extremely competent. For example because they have a Phd in quantum mechanics or other sportive disciplines.
  • A third reason can be that given the framework’s complexity, less competent people are hindered to use the framework and thus can even not try to produce output by using the framework.
I have no problems with the first two potential root causes, but the third one is slightly increasing my blood pressure. Especially in the situation where the things you are doing “inside” are maybe not simple but not extremely complex neither. Let’s face it: building an advanced line of business app can be difficult, but it’s not the most complex activity  in the world. Understanding quantum mechanics or establishing world peace or understanding women logic, just to call something, is more difficult.
Things brings me to completely rephrasing my point:
Never measure the success of a framework based on its artificial entry level barriers.
Lightswitch is such a great example of a framework that is not exposing artificial entry level barriers. That’s why typical Microsoft access developers might like it and see it as a next step in a growth path to scalable apps build on stronger foundations.
LightSwitch, as a framework, is so good that it leads to good design most of the time and discourages automatically bad design in a large series of cases. Just to give one example, LightSwitch  will make it you very difficult to do a direct database call from the code behind of a button.  When creating a LightSwitch screen, you are even without knowing it applying MVVM. But indeed, when used by people with no vision at all on the architectural foundations of software, you will see once in a while “strange things”. Nothing to do about, but it doesn’t say anything at all about the intrinsic qualities of LightSwitch. People have the right to make mistakes as a process of improving their skills, don’t they?

Conclusion

I have not the skills to  provide a complete “epistemologic” analysis on framework design. I’m doing nothing more than sharing some thoughts. I promise next time I’ll write again about a custom control… or maybe about notepad which  is both simple on the outside and simple on the inside. Well, I even don’t know how simple it is on the inside, I have never seen the source code :)