lundi 15 octobre 2018

Looking for design pattern suggestion for multiple hock-able conditions

We are developing an HR ERP. We have leave module. One of the basic features is the request for time off or leave application submission. We have a method for validating leave application for submission with almost 1000 line. Lot's of if, else and dynamic data conditions are presents on this method. Point to be noted this method comes from the legacy system. I am planning to use Strategy pattern to separate the business conditions and will refactor this 1000 line method into multiple small pieces of the method.

If would be honored if some experts suggest which design pattern are more appropriate in this scenario? Please take an advance thanks on behalf of me.

We are using Asp.Net Core 2.0 MVC (.Net Framework dependent version.) with C#.

Aucun commentaire:

Enregistrer un commentaire