0

Hi,
I would like to ask please
If you were given a project to work on and it has some business rules. How do you work with it?

The reason I am asking this is because I created an application in C#
I created an application in two different ways.
The first one worked correctly
But the second one I followed the business rules as specified in order
same project but I didn't get same results.

Is the order on how / what to code first is important?
If yes, how will I know which part has to be coded first.

Thank you.

Comments
  • 2
    Always conform to business rules. It's a business application first.
  • 1
    @champion01 You are right.
    But if the business rules say:
    1-Make sure the new assignment date of my staff is set 12 days from today and the end date of new assignment i set to 22 days from today.
    2-if 12 days are not selected between assignment display an error
    3-assignment cost per day $100 and if Assignment exceeds 22 days add $500.

    (What I meant in this example if I code it as per order the application won't work properly)
    I tried solution I was given which is
    first code rule 1 and then 3 and last thing code rule 2)
    I tried it and everything worked fine.
    I am not breaking anything in business rules but the way how we code it so everything to work correctly.

    (My question is how can I know what rule has to be applied first)?
  • 1
    I would do it in order of what rule is most important to them.

    It may be that the business rules are illogical and cannot be done with out "breaking" them. Then in that case, go talk to business and tell them they are crazy and illogical
Add Comment