× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Matt,

My intent was not to emulate the Spring framework, but to illustrate the absurdity of it; something like 25 source files required to implement a trivial application. Compare that to 1 RPG source member and 2 HTML templates; all quite trivial. In the beginning I wondered why the Spring developers were implementing unit tests for every user-written Java component, and embedding them in the project? After a while, it made sense.

Spring process flows include significant mapping between the database, database access objects (DAO), business objects, and view objects (JSP's). Spring handles a lot of that behind the scenes based on configuration code. It would be much harder to debug Spring's "Inversion Of Control" framework code after the fact. So unit tests are applied up front.

That kind of unit testing would be superfluous in RPG because of its streamlined database interfaces. If data needs to be shared between RPG modules, I typically use shared data structures. Forget data mapping and the unit testing associated with it.

The type of components one sees in Spring and the data mapping between them is unnecessary. They make an application overly complex. They require significant additional code, testing, and run-time overhead. They are a waste of time and space.

I'm speaking from an RPG perspective, of course. The components, code, configuration, and testing are necessary if you are coming at it from a Spring perspective. It get's even more complex when you bring something like Hybernate into the mix.


The Spring tutorial didn't go into authentication/authorization or interfacing with other database platforms, so why would I?

What do you mean by "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."?

-Nathan.




----- Original Message -----
From: Matt Olson <Matt.Olson@xxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Cc:
Sent: Sunday, June 24, 2012 8:47 PM
Subject: RE: Calculating Cyclomatic Complexity of an RPG program

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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.