code metrics - Does McCabe formula consider data flow? -


when using mccabe formula

m = e-n + 2c

does take consideration if data restricted flowing in 1 direction? seems graphs show data flowing in many directions, regardless if happens or not.

a codebase has 1 direction of data flow vs (very similar) code base in data can go , forth less complex.

this article facebook, mvc , flux great example of i'm asking about: http://www.infoq.com/news/2014/05/facebook-mvc-flux. had data going forth mvc (from view model , vice versa). once switched out mvc flux, data flowed in 1 direction.

the article linked replacing 1 (misapplied) architectural pattern another.
concept of "data flow" not defined, doesn't matter question.

the mccabe formula examines program flow - informally see measure of number of decisions made. measured looking @ every control statement, scale of measures finer grained scale of architectural changes propose.

let's go "the mccabe formula doesn't measure data flow".

if make breadth of changes required redesign architecture, formula of course produce different result. based on branching factor of program, always.

suppose redesign program code - , decisions - repeated less often. complexity go down. may judge better architecture.

but cyclomatic complexity isn't way of describing large architecture really. way of looking @ small chunks of code; methods, classes. using evaluate architecture pretty meaningless, architecture implemented or badly.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -