java - Void, value, or other? -
I'm working on spaghetti monster (unfortunately not of the variety of flights), and I have a question about fair Is design
I am in the process of taking a huge static java method which gives an object and divides it into reusable (and readable) components. Right now, the method reads an XML document, and then adds summary and detailed information from the document to "data module", and the data module then comes back in method.
GetSummaryData and getDetailedData method in breaking my code, I saw that I did the following:
dataModule = getSummaryData (xmlDocument); SetDetailedData (xmlDocument, Data Module);
(Add context, add detailed data to the data module within the method)
The main fact of this is that the detailed data is based on summary of business logic It is necessary that the data is properly parsed, and the fact is that many of the applications involved in changing the front end of the application to change the structure of the data module.
Is this approach better than anyone:
data module = received data (xmldocument); DataModule = setDetailedData (xmlDocument, Data Module);
(pass to context, attach detailed data to data, modules within data, return data module)
I have a lot to do without revealing "teh secretaries" Can not share more code, but is there a strong reason to go with an attitude over the other? Or, am I just catching, in which I am putting shadow of lipstick on my pig, here?
Thanks,
IVR Avenger
I get your second point of view , Where you confuse the same object more - because this calling function indicates that a different object can be returned. If you are amending the object, then your first solution seems to me right.
Comments
Post a Comment