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

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.

Not that my company is in the car insurance business!  But there is a very
real example in our business which is very similar to this.

In the end we want to be able to write a business process and use it from
multiple places, as the back end on 5250 programs, from a web/JSP pages
front end, and exposing the business processes as Web Services over the
internet - Java has to be the sensible choice for this?

Thanks,

Nigel.



|---------+------------------------------>
|         |           "Joe Pluta"        |
|         |           <joepluta@plutabrot|
|         |           hers.com>          |
|         |           Sent by:           |
|         |           java400-l-bounces@m|
|         |           idrange.com        |
|         |                              |
|         |                              |
|         |           30/06/2004 02:10 PM|
|         |           Please respond to  |
|         |           Java Programming on|
|         |           and around the     |
|         |           iSeries / AS400    |
|         |                              |
|---------+------------------------------>
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                 |
  |       To:       "'Java Programming on and around the iSeries / AS400'" 
<java400-l@xxxxxxxxxxxx>              |
  |       cc:                                                                   
                                 |
  |       Subject:  RE: framework question                                      
                                 |
  
>--------------------------------------------------------------------------------------------------------------|




> From: NGay@xxxxxxxxxxxxx
>
> Aaron,
>
> Hence we are
> considering rewriting all the business logic into Java code where it
will
> be nicely organized, use proper data types, inheritance and so on.

Java is good for many, many things, but one thing it is NOT good for is
programming business logic.  Inheritance is perhaps the single most
overused (and misused) feature of any language ever designed, and it
almost NEVER applies in the business world.  Business application make
far better use of composition than inheritance in well over 90% of the
cases I've ever looked at.  Try to come up with 10 places where
inheritance (especially Java's single-parent inheritance model) makes
sense.

Java is horrid at executing conditional logic based on database flags,
and is also terrible at allowing quick changes to the logic for a
specific problem, both of which are required in real-world business
applications.

There is a reason why nobody has really made much headway in creating a
generic set of business objects: because such a goal is very hard to
achieve.


> Then we
> would replace the exisiting 'fat' 5250 screens which currently have
all
> the
> business logic mixed in by 'thin' 5250 screens which are nothing more
than
> a UI layer calling the Java business logic in the background to do all
the
> work.

Instead, I think the proper way to go about things is to create a
JSP/servlet front end to your existing applications, then begin
rewriting them into servers as need be.  Some programs may never need to
be rewritten: for example, do you REALLY need client/server access to
your chart of accounts master?  Probably not.

Anyway, my .02.

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.








********************************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.
********************************************************************************


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.