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



Thank you to all replies....I think Scott's article will get me going...

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Monday, January 05, 2009 4:32 PM
To: RPG programming on the IBM i / System i
Subject: Re: MVC Subfile Example

Hi Stephen,

I doubt that combining the view and controller would be a problem -- at
least it hasn't been for me. But, if you want to keep them separate,
it's just a matter of having the controller call the Model to load the
records for the subfile into an array, then having the controller call
the view and pass that array so they can be loaded into the subfile.

The April 2008 issue of System iNEWS magazine included a sample
green-screen app (by yours truly) that used a subfile, but was written
in an MVC manner. (You need a System iNEWS ProVIP subscription to read
it online)
http://systeminetwork.com/article/rpg-and-web-technologies-get-there

The code download for that article shoudl include the entire program so
you can see all of the details.

There were three other articles in that issue, written by other authors,

that re-used the Model of my green-screen to make web apps in various
other languages (Java, PHP and CGIDEV2)

Good luck

Coyle, Stephen F. wrote:
Happy new year everyone,

Can anyone point me in the direction of an example subfile
program that uses an MVC pattern? Or should the view and controller be
combined?

I've tried an MVC pattern on a single page display file but am
now thinking of trying it on a subfile. Any suggestions or past
experiences would be very helpful.

Thanks all...
- Steve


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.