Re: XStream versus XMLEncoder



On 5 Dec, 20:00, Lew <l...@xxxxxxxxxxxxx> wrote:
This seems to me to be a basic POJO vs JavaBeans pattern discussion.
Both have their place.

In the ground of being behind Mark's advice is the notion that the class you
wrote will be used.

Many of the gripes or suggestions for change with Java have to do with
consumers of classes feeling like they don't have to worry about no steenkeen
checked exceptions, or setters, or whatever. From the point of view of the
*designers* of those classes is the concern that some client will, in fact,
ignore that checked exception or call that setter. The designer may wish to
close that loophole so that consumers of the class need not concern themselves
with it, nor risk the consequences.

Exactly.

Thus, declare a checked exception;
consumer classes at least will not be surprised by them.

Sounds like I need to do this.

Make the class
members immutable; the client can ignore many threading issues and has no risk
of constructed values suddenly, mysteriously changing to code for.

Sounds like I can't do that coz XMLEncoder will not let me.


Client programmers may grumble that they know perfectly well how to construct
an object completely before use, but just let their colleague forget to and
they will curse the API writer's name for letting such a thing happen and how
hard it is to debug and why, oh, why didn't they have the sense to make that
member final?

--
Lew

.



Relevant Pages

  • Re: Searching hints for a web-app
    ... self-written program) turn on the consumers. ... it reflects the state of the consumer by using different icons (bulb on, ... The client is connected through CORBA with the server. ... I could easely integrate a web server into the controller or run ...
    (alt.html)
  • Re: WSE interoperability with non .NET clients. Need help
    ... > security) that may be consumed by NON .NET clients. ... > possibility that some of the client consumers will be using VB 6, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Searching hints for a web-app
    ... In my home, I have a computer sitting in the basement controlling all kinds of consumers in our house. ... For that scenario I have also written a neat client application that shows on different tabs the top view for each floor - on those vies you can see all the different consumers as icons. ... Clicking on them turns the consumer on/off - it reflects the state of the consumer by using different icons (bulb on, ... I could easely integrate a web server into the controller or run Apache on the same machine. ...
    (alt.html)
  • Re: Credit Card Hearings in Congress
    ... Business entails risk, ... world, but unfortunately for consumers, it seems as if the credit card ... equally by both consumers and the credit card industry, ...
    (misc.consumers)