wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Help needed in design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Help needed in design" Watch "Help needed in design" New topic
Author

Help needed in design

Amol Fuke
Ranch Hand

Joined: Apr 08, 2005
Posts: 129
Hi All ,

We have one customFile folder in project folder where in we have two seperate folders , one for samsung and one for nokia and each one having seperate files needed for slightly different behaviour of application(for samsung and nokia).Most of the other code and functanality is same for both implementation.

When we want build for samsaung , we mention samsun_build.xml while invoking ant command.In the build.xml , we copy these files from custom folder to main code base.
Similarly when we invoke nokia_build.xml , in the ant file we copy nokia specific files from nokia folder to main code base.

Now we need to use more cleaner approch.I have thought of using factory pattern but it does not fit into it as we have around 10 files and they needed to be invoked in differnt places.

Can you please suggest any approch to solve this ?

Thanks,
Amol


"There are no mistakes, only lessons"
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1761
    
    7

There's no way to provide any sort of meaningful answer without knowing anything about the type hierarchy and collaboration between the classes involved.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Victor M. Pereira
Ranch Hand

Joined: Mar 02, 2012
Posts: 50
what do you mean with cleaner approach?

It seems a sort of maven class hierarchy for building? If that is what you want you can check Apache Ivy.


regards,
Victor M. Pereira
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help needed in design