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



<Joe>
I wouldn't write it this way.  I would write a generalized table-driven
quoting engine and drive the differences between cars and motorbikes from
the database, not from some hardcoded inheritance rule.  Because what
happens when I now have two classes of motorbikes, but one no longer uses
the same rules as the car?  In my design, I simply change the database
records, whereas in yours you are going to have to rewrite your class
hierarchy.
</Joe>

I can see your point here definitely.  So what would be your most important
reason for going to RPG for business logic vs. Java?  Is it the native file
access (which is obviously better in RPG)?  Could you do all your Java
Physical File access with EJB's which from what I have recently heard
provides fairly seamless integration into your iSeries files.  I don't know
that much about EJB's and I know you are not a big fan of that framework,
but what are you thoughts on that?

I am presented with this exact issue: Where does your Java stop and your RPG
start, and vice versa.  To date our shop hasn't made big leaps into Java
(regardless of where it should be used) because we haven't had the knowledge
base to support it. 

Thanks for your responses,
Aaron Bartell

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Joe Pluta
Sent: Wednesday, June 30, 2004 12:18 PM
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: framework question

> From: NGay@xxxxxxxxxxxxx
> 
> Joe,
> 
> Ok say you were writing an application for automobile insurance.  Say
you
> have some general rules about how to generate a quote (by reading
database
> tables no doubt) but cars + motorbikes each have a handful of complex 
> rules that apply only to them...
> 
> Then you'd create an Automobile object, inherit Car and Motorbike
objects
> from them.  Define Automobile.quote () and override this in Car.quote
()
> and Motorbike.quote () which would probably call super.quote () and 
> add/subtract as necessary depeding on the additional rules for those
types
> of vehicles.

I wouldn't write it this way.  I would write a generalized table-driven
quoting engine and drive the differences between cars and motorbikes from
the database, not from some hardcoded inheritance rule.  Because what
happens when I now have two classes of motorbikes, but one no longer uses
the same rules as the car?  In my design, I simply change the database
records, whereas in yours you are going to have to rewrite your class
hierarchy.

No, business rules and OO do not mix.  OO is best used to define processes
that are rarely if ever subject to change (communications protocols, HTML
formatting, that sort of thing).  Procedural languages are by far better for
writing business logic that can change from day to day based on external
circumstances.

Joe

--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/java400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.