×
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.
So you're saying that you wouldn't use any framework for anything because it doesn't make your life easier to write a "hello world" (trivial) application? Really? I don't think frameworks were invented to make trivial programming easier. Besides, based on your example, it appears that you are using some sort of framework to do the magic for you as well. Spring is quite heavily used. I wouldn't expect that from an absurd tool. There has to be some up side. I am not a Java programmer myself, but I do know that MVC frameworks tend to make your life easier when you want to build anything more than a static web site. The more complex the application, the more things that the framework has to be able to do. Usually that means a larger API.
I've seen enough monolithic RPG applications that include thousands of source files to know that monolithic projects without some sort of code sharing are not fun to maintain. The alternative is sharing code, and that requires a load of regression testing to make sure you didn't break something when you fix something else. All those tests are for regression testing. So would you rather search every source for that pricing algorithm, and hope you got them all, or run an automated test to make sure your change didn't have unintentional consequences? It's a tradeoff. I know plenty of programmers who would rather work in the monolithic world. They tend to be afraid to change anything significant if they don't absolutely have to because it would involve too much testing (because they have to change more than twenty or thirty programs). They would rather leave the bug, and address it a different way. There are many creative ways to address a bug right? Fix the data ahead of time so the bug isn't activated. Fix the data after the fact so that it looks right going into the next process. Fix the bug in a limited number of places because it doesn't show up anywhere else (right now). You only have that last option in the monolithic environment. Don't all these gyrations seem a bit absurd to you as well?
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----midrange-l-bounces@xxxxxxxxxxxx wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: Nathan Andelin
Sent by: midrange-l-bounces@xxxxxxxxxxxx
Date: 06/25/2012 11:56AM
Subject: Re: Calculating Cyclomatic Complexity of an RPG program
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 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.