I am handling a project which needs restructuring set of projects belonging to a website. Also it has tightly coupled dependency between web application and the dependent project referenced. Kindly help me with some ideas and tools on how the calls could be re factored to more maintainable code.
The main aspect is that there are calls to apply promotion (promotion class has more than 4 different methods available) consumed from various functions, which could not be stream lined easily.
Kindly help me here with best practices.
Sorry guys- i could not share much code due ot restriction, but hope the below helps
My project uses N-Hibernate for data access Project A- web project - aspx and ascx with code behind Project B- Contains class definition consumed by project C (data operation class) Project C - Business logic with saving to database methods (customer, order, promotion etc.)
The problem is with project C - which i am not sure if it does too many things or needs to be broken down.But there are already many other sub projects.
Project C supports like saving details to DB based on parameters some of the class methods in this calls the promotion based on some condition, I would like to make things more robust - sample code below
Project -C Class - OrderLogic
public void UpdateOrderItem(....)
{
....
....
...
}
Order order = itm.Order;
promoOrderSyncher.AddOrderItemToRawOrderAndRunPromosOnOrder(itm, ref order);
orderItemRepository.SaveOrUpdate(itm);
So just like the above class the promotion is called from may other places, i would like to streamline this calls to promotion class file. So i am looking for some concepts.