jQuery in Action, 3rd edition
The moose likes Web Services and the fly likes Good idea to reuse the object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Good idea to reuse the object?" Watch "Good idea to reuse the object?" New topic

Good idea to reuse the object?

susmitha singh

Joined: Feb 02, 2011
Posts: 1
Hi ,

I am new to Web service and trying to develop one service. I have a basic question like we have an Object Address and inside it we have 4 attribute out of it only 2 are useful
can I reuse Address object or should i create a new object that holds only the attribute that are needed for the service.


1. firstName
2. lastName
3. PhoneNumber
4. e-mail

We don't need phone number and e-mail so is it a good idea to use this same Address object or create a new one.


William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13002
I would certainly create a class to hold only the variables you need.

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Good idea to reuse the object?
It's not a secret anymore!