Wheres your IoC container code? Wheres your MVC framework? Where are your objects :-) ? How to unit test both UI and code with your example? How do you interface with database platform X (oracle, mySql, etc) in your code? Wheres your authentication/authorization code? And the list goes on and on.
Not the same comparison I'm afraid.
Cyclomatic complexity can be useful with small code fragments where there is a one to one mapping of their functionality, which is what I want to gauge.
________________________________________
From: Nathan Andelin [nandelin@xxxxxxxxx]
Sent: Friday, June 22, 2012 7:02 PM
To: Midrange Systems Technical Discussion
Subject: Re: Calculating Cyclomatic Complexity of an RPG program
This topic about RPG program complexity roughly parallels a recent discussion on LinkedIn, where a Java programmer recommended the Spring framework. That led me to the following tutorial.
http://static.springsource.org/docs/Spring-MVC-step-by-step/index.html
My review of that Spring tutorial moved me to create an essentially identical application using HTML templates and RPG as follows:
http://www.radile.com/rdweb/ptl/ptl100/launch.shtml?app=invp100
The HTML templates:
http://www.radile.com/rdweb/temp/begin.html
The RPG source:
http://www.radile.com/rdweb/temp/invp100at.txt
If you take the time to review both implementations of this very simple application you will see how overwhelmingly complex the Spring implementation is compared to the RPG, but that would probably NOT be evident by calculating cyclomatic complexity.
You'll find "if", "do while", and "select ... when" blocks in the RPG code. You'll find "if", "for each", and "try ... catch" blocks in the Java code. But that's not where the mystery and complexity lie. What makes the Spring implementation so overwhelmingly complex?
-Nathan.
________________________________
From: Matt Olson <Matt.Olson@xxxxxxxx>
To: "midrange-l@xxxxxxxxxxxx" <midrange-l@xxxxxxxxxxxx>
Sent: Friday, June 22, 2012 2:07 PM
Subject: Calculating Cyclomatic Complexity of an RPG program
Does anyone know of a tool to calculate the Cyclomatic Complexity of an RPG program?
We have these and many other metrics built into our IDE within Visual Studio with the CodeRush addin, I'm wondering if there is something similar in RDP or via the green screen?
Thanks!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.