Design question

olsonpm

Well-known member
Joined
Aug 24, 2010
Messages
46
Programming Experience
Beginner
So the web application I'm working with is basically just displaying status/statistical information from a database. I was given the task of cleaning it up since the code was beyond messy. One thing I did to clean it up was to get rid of all the ad hoc table index calls to access data - I did this by creating 'business objects' with no logic in them - simply getters and setters. It was great for my situation because I could use a separate database access layer to fill in the business objects, which the application logic displayed. The problem is that I did this without knowing what any sort of standard is on solving this sort of problem. Hence, my question: what design might be considered best practice in displaying 'read only' information from a database? If you could also let me know what the down-sides of my solution are, that would be very helpful.

additional info: I don't like the data binding API, since I can't figure out a way to create clean code around it. I've read that objects which just hold data are considered bad design, but for the sake of having a clean way to display information, I don't need anything more. I've also read that getters and setters are bad design, but I couldn't find any reason to contradict my specific case for it.

thanks much,
Phil
 
Last edited:
Top Bottom