× 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.



Mike,

Here a just some observations:
1. The most important piece for an RPG coder in MVC is the Model. This is your "business application logic" where you're processing transactions. These transactions should simply be callable programs or procedures that pass data in a formally described interface (Parameter lists, parameter file, data queue, etc). No embedded screen logic... All feedback should be defined in the interface, for error results (and handling).

2. View and Controller applications on the iSeries will likely be combined for green-screen interfaces. These are the pieces that are hard for traditional coders to wrap their brains around. IMO, it's difficult to physically seperate the view and controller pieces in RPG, though that probably just a question of semantics. I suppose one could consider the view to simply be a DSPF, and these views can be interchangable, allowing for things like 80 column vs 132 column, national language versions of your screens, and so forth. In this case, the controller is the RPG program that drives the screen (view), which then invokes your business logic (model), which supplies feedback (error messages), that get displayed to the user.......

3. Be very consious of style and coding standards. These standards may not be complete when you begin, but as you develop more applications, your standards will fill out. Try to name your procedures and varibles so that they are self-documenting. Design your interfaces to promote consistency, so that other developers can quickly understand how to use your interfaces. I recommend the book "Code Complete" (2nd. edition) published by Microsoft Press. This is NOT a book about Microsoft, but a very useful book about the act of designing and writing good software.

hth,
Eric

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Mike
Sent: Sunday, September 23, 2007 12:21 PM
To: RPG programming on the AS400 / iSeries
Subject: MVC in RPG?


I will be completely rewriting a couple applications soon. From what I
gather so far, we are scratching the whole existing system (written around
the time I was a baby) and starting with a new DB and new code. I think now
is the time to "do it right," if there is such a thing. Are people doing any
sort of MVC style programs? If so what are you doing? Is it more flexible
than the "normal" method. What have you done in new applications that made
the whole process quicker and more flexible (besides, you know, an actual
project plan)?


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.