Design question about data conversion class.

B

Ben Jessel

I'm looking for a name for my class that reflects what it does. Its a
class with functions that converts data.

For example, my current class is called ArticleValueObjectCreator. It
has a method that converts resultsets to an article value object bean.

I now need to create a method which converts an article related
resultset to xml. In the future I may need one that converts a value
object "bean" to xml.

I'm thinking of refactoring the class now that I need to grow it.

What is the best way of acomplishing good design here?

Would renaming the class to something like ArticleDataCovertor, or
ArticleAdaptor tie in with good programming practice, or would it be
better to split these methods up into different classes ( thus making
each class dependent on a fine range particular technologies ) eg, one
which is xml and jdbc only, another that is xml only.

Are there any design patterns like this that emphasise clean
seperation between technologies. Or am I over-engineering?

Thanks

Ben
 
V

VisionSet

....
For example, my current class is called ArticleValueObjectCreator. It
has a method that converts resultsets to an article value object bean.

I now need to create a method which converts an article related
resultset to xml. In the future I may need one that converts a value
object "bean" to xml.

I'm thinking of refactoring the class now that I need to grow it.

What is the best way of acomplishing good design here? ....
Are there any design patterns like this that emphasise clean
seperation between technologies. Or am I over-engineering?

Have a look at this:


http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top