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



> From: David Morris
> 
> My point was that Java is very flexible and that flexibility is more
> than most programmers will ever need and was just trying to address
your
> comment that "The ability to change the way a Java application works
> based on database flags is quite limited."

But that comment still stands.  Take a VERY simple situation: I need to
calculate price based on a flag in the database.  This flag can exist at
one of three points in the hierarchy: customer/item, customer, or item.
The flag tell to either use the standard price in the item master or to
check a special price file.

In RPG, it's simple (and in fact it's even easier with left-handed
indicators, but let's leave those out for now):

  // Get price flag.  Check first is cust/item cross reference.
  // Otherwise, use customer flag if specified or use item flag.
  chain cusitm custitem;
  if %found(custitem);
     priceflag = CIPRCFLG;
  else;
    if CPRICE > *blank;
      priceflag = CUPRCFLG;
    else;
      priceflag = ITPRCFLG;    
    endif;
  endif;

  // If flag = 'I' use item standard price, else chain to 
  // alternate price file
  if priceflag = 'I';
    price = ITSTDPRC;
  else;
    chain ITITEM SPCPRC;
    price = SPPRICE;
  endif;

This is one of the more simple techniques.  If you don't code this logic
in RPG, if you instead code it in Java using JDBC or RLA, you will at
the very least have the overhead of a lot of EBCDIC/ASCII conversion.
My prediction would be that this would typically run at least twice as
slow as any native approach, and I'm being kind.

And please, don't even try EJB in here.  I'm not sure what you would
create as your entities, but in any cases, the overhead for the bean
creation would be enormous.

Java is the wrong tool for this job.

Joe


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.