architecture – Turning sequential cohesion into functional cohesion?

architecture – Turning sequential cohesion into functional cohesion?

The phone call is left out in your example for good reason. Its one of the unrelated tasks. If you assume the phone call is still in … than the whole thing would loose its cohesion again. Otherwise you might argue that all the other activities are necessary for preparing a meal. This might start a discussion whether CleanUtensilsfromPreviousMeal is actually valid here because this activity might only be necessary in the circumstance that there was no cleanup before. StackExchange questions are not for such discussions thow … so we would need a far clearer example for the decision to be agreed on by multiple software architects. Otherwise some people might argue different than others.

This is a very interesting question, and yes, the answer is relative and depends on the way we understand things [written in the article] and how they correspond to what the author meant.

Particularly between procedural and functional cohesions, theres a slight difference: procedural cohesion is something which contains steps unrelated to each other, i.e. there is no goal for the procedure which is something repeatable and would be needed to have it fixed defined and re-used. Whereas, functional cohesion is basically a function (probably accepting input and giving an output) which can be used for different inputs and will produce the correct output (depending on the input) when re-used.

Conclusion, as per your question: no, putting each in separate methods and calling them in the same order does not change it from procedural to functional, unless your procedure becomes a function which really has some goal.

architecture – Turning sequential cohesion into functional cohesion?

Leave a Reply

Your email address will not be published.