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



Think of passing the Address object a context on which to write the
address. The context object would have methods that accept address
lines. The Address object would know how to write lines to an interface
implemented by the context object. So the method might be
Address.writeOn(DisplayInterface context).

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of James Perkins
Sent: Tuesday, February 03, 2009 6:48 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: Java Accessors Are They Evil?

First off I would thank you all for taking the time to read the article.

It looks like I've got some re-training to do in my mind. I think I
understand the concept that is happening now, but I need to figure out
how this all works in an application.

I have an application that get's customer data from a database and then
writes it to an XML file so I can process it with the GoogleMaps API.

I am currently building a list of customers and passing it the class
that creates the XML. This class uses a method getShipToAddress() which
returns an Address, but the Address class has getters for address lines,
city, state, etc. So I'm trying to figure out how you show that.

I guess, which I know is talked about a bit in the article, I don't
understand how you can use an object for a UI without at least read-only
accessors.

I guess it's back to the drawing board.

James R. Perkins
--
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:
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.