Thursday, July 12, 2012

when you have a hammer in your hand, everything looks like nail to you

A few years ago, when I joined a company as the Application Development Manager, I found some specific technologies were widely used there. “Open query from SQL server to access Oracle database data” is a typical case.  They use open query in SQL/Sever to update, insert and of course, get data in Oracle database. In the way, this is the standard way for them to access Oracle database, even when there is no need to integrate data from SQL/Server database.


First of all, it is difficult to maintain, when you issue a select statement in SQL/Server, it is hard to imagine that in fact you are updating some data in Oracle.
Secondly, it created some point of failure unnecessarily. If SQL Server is dead, your application will not be available, even if there is no need to access SQL/Server data.
Thirdly, the power of PL/SQL is not unleashed.
Finally, the performance of the application is comprised. All data need to go through 2 hops back and forth.


With that, I started to implement a new architecture for these applications.


With the new architecture, I had stored procedures in the form of packages created directly in Oracle database and had a DAO Layer developed to access Oracle database calling these stored procedures via Database Application Block.


It was a big success. Slowly, this new architecture had been accepted as a standard way of accessing Oracle database. “Open Query” from via SQL/Server database been slowly faced out…


One day, I had lunch with one of the developers.  During the lunch, when we talk about technologies, he said “Peter, when you have a hammer in your hand, everything looks like nail to you.”


Yes, that’s it! If in your tool box, hammer is the only tool you have, you will try to use it as long as it works. it does not matter if hammer is the best tool for the job or not.

As an architect, in order to design a system with all best practices, you need to enrich your tool box. First you need to know all kind of tools available in the market well, and then you need to know when to use what tool. Use a specific tool for the sake of using it is one of the infamous antipatterns. Use a specific tool because that is the only tool you are comfort with is equally bad. 

1 comment:

  1. I know this one..it's so true.
    And, single tooled workman doesn't even realize it.
    hopefully, they can learn new tools also.. Worse is when these single tooled workman gets into a decision making position.. imagine the "damage"

    ReplyDelete