
Why Patterns Suck?
I was really surprised when I heared some people saying “Patterns suck”, I wanted to know why some people hate these precious guidelines who save us from reinventing the wheel and lets us use it.
Fortunately after just few days I had to work with some confident people, known to be pattern-lovers. Having a lot of technical knowledge, they remembered the names of patterns and writers on finger tips. People, you can speak technobabble with for not just hours but for days. In the first place I admired them and found myself among knowledgeable people.
Then I found something strange, besides all their knowledge they had very few success stories and their managememt was not satisfied with their problem solving skills.
I had started observing the causes of their failure. Mean while I had to design an architecture for a coming enterprise project. I started scaffolding by enhancing and optimizing my legacy libraries and framework with my team. I asked these people to review my approach to let my approach become foolproof.
Geeks love technicalities so I got a prompt response and they started highlighting the weaknesses, I was very glad as I got a chance to improve. But unexpectedly most of the issues identified are as follows:
Geeks: Aren’t you using NHibernate?
Me: Nope, I preferred these liberaries because these are recommended by technology vendor and I found them performent for this kind of data driven applications. Another reason is our management don’t want to use NHibernate because we haven’t developed enough experties to use it in an enterprise project that’s why we had faces some serious issues in the last project using NHibernate.
Geek: What? Do you know where NHibernate came from, it’s a port of Hibernate, being used in the most powerful language Java. It has nothing to compete with Microsoft.
Me: Yes, I agree that Jave and it’s platforms are a lot more mature but every language or technology has some of its own specifications and advantages. Our framework and liberaries are optimized with the objects provided with .Net. Our wrapper classes exploiting some new features provide in the current version of .Net.
Don’t use ADO objects
These objects are mess.
Me: Why?
Geeks: Because these are not open-sourced
Me: I admire the benefits of open source but these object are rich, free, built-in, tested and performing well in enterprise applications. I do not very often use them but I found them very useful in such kind of applications
Geeks: You incorrectly applied this pattern; let me show you the documentation.
Me: This pattern like other patterns have different applications, I am following this approach because it performs well in this scenario. This flexibility is also allowed by some experts.
Geek: No, patterns should be followed as is. They are not to be changed for performance or whatever. And remember enterprise applications, built on great technologies like EJB, looks graceful even if they are not enough performant.
Geek: Increase your number of layers like we have did in that application. You have not decoupled enough.
Me: Yes previously I do have the same number of layers but I found it as an overkill so I modified this framework for medium-sized performance-hungry applications.
Geek: And why did you coupled these two major tiers, this is an unacceptable violation of N-Tier Architecture
Me: No, these are still two different layers, but I am keeping them in a single project during development as most of the developers are working on both layers. They still can be deployed on different servers.
Geek: I’m still not satisfied, it is not recommended by our gurus and we follow them because we know they are the best.
Me: They might have recommended it for some different type of project and this approach may be suitable in that particular scenario.
Geek: We found their practices the best in all type and size of projects, whatever, it’s not that simple you think it is, you have to add a lot more.
… and finally I got the answer to my question “why people hate patterns?”
About the Author
Seasoned Microsoft Certified Professional having more than six years of experience in analysis, design, and development of enterprise applications; utilizing true world class software development patterns & practices.
Computer Science Colloquium – March 5, 2009
|
|
Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions $43.95 *Would you like to use a consistent visual notation for drawing integration solutions? Look inside the front cover. *Do you want to harness the power of asynchronous systems without getting caught in the pitfalls? See “Thinking Asynchronously” in the Introduction. *Do you want to know which style of application integration is best for your purposes? See Chapter 2, Integration Styles. *Do you want … |
|
|
Patterns of Enterprise Application Architecture $39.99 Developers of enterprise applications (e.g reservation systems, supply chain programs, financial systems, etc.) face a unique set of challenges, different than those faced by their desktop system and embedded system peers. For this reason, enterprise developers must uncover their own solutions. In this new book, noted software engineering expert Martin Fowler turns his attention to enterprise appl… |
|
|
Professional ASP.NET Design Patterns $26.72 This unique book takes good ASP.NET (MVC/Webforms) application construction one step further by emphasizing loosely coupled and highly cohesive ASP.NET web application architectural design. Each chapteraddresses a layer in an enterprise ASP.NET (MVC/Webforms) application and shows how proven patterns, principles, and best practices can be leveraged to solve problems and improve the design of your… |
