Skip to main content

Understand how things are coupled

Problem

This problem was to add new filtering for one of already completed search scenario as well as another scenario. The search part is completely had been built using dynamic SQL. There for decided to build generic method which can used by all the scenario with the intension of reusability. Implemented filtering with the design pattern. ok.. Fine..Everything fine...But last moment find another placed which used this filtering which is tightly couple with the another SP..So couldn’t use this newly implemented method..Cant help...Had to written that filtering inside the SP. In this problem not much harm raised. We couldn’t achieve reusability because of tightly couple module.

Mistake

Missed one of the affected scenarios of the filtering.

Lesson learned

Before getting into a decision we need to identify the all the affected paths those areas already exist. And also need to understand how much each of them couple with other modules and SPs...

Anyway got chance to improve my knowledge on designed pattern.

Comments

Popular posts from this blog

The transaction is in doubt

Sometimes you may get this error when you use transaction scope . The transaction is in doubt I also got this error recently and able to find the reason for it. That is because of the some of the readers had not properly disposed. Actually in this case you can use Using keyword to overcome this. Exception : System.Transactions.TransactionInDoubtException was unhandled by user code Message="The transaction is in doubt." Solution : using (reader) { }

MySQL Stored Procedure Error

In our project we had many many stored procedures and many parameters passes to those sps. But in only one sp it gives error message something like this; "Incorrect number of arguments for PROCEDURE sproc_t_l_Contract_Select_BySearchCriteria; expected 3, got 2” Work long time on this sp but coudnt find it. So i tried to write it again from the begining. In this time it was work perfectly.This problem occurs because of the space between data type and its length. Ex. pName varchar(50) - working pName varchar (50) - Not working But it does not mention syntax error or something.So this error message make us vulnerable.