Skip to main content
13 events
when toggle format what by license comment
Feb 13, 2016 at 8:07 comment added Pieter B @konishiki what I often see is that people try to have a 1 on 1 conversion from their SQL database design to their class design. And that's when you start digging trenches for yourself. They're ofcourse related, but you shouldn't try to mirror them.
Feb 12, 2016 at 19:30 vote accept konishiki
Feb 12, 2016 at 14:03 comment added konishiki @PieterB that model is so awesome. I mean, that is how it works in the real world, right? My design was really starting to head down a dark path...
Feb 12, 2016 at 12:42 comment added Pieter B There should be a publisher class from which you make different publisher objects. Don't use a datarow in a database as if it were an object with properties.
Feb 12, 2016 at 10:56 answer added COME FROM timeline score: 3
Feb 12, 2016 at 3:14 comment added konishiki @ErikEidt I am writing in Java. I've got a database of news articles from which I create objects with these attributes: (1) title, (2) story, (3) publish date, (4) publisher. To reduce errors, I want to be as restrictive as possible. But, I will add more publishers in the future so I need some flexibility.
Feb 12, 2016 at 1:57 comment added Erik Eidt We would need to know your choice of language and build construction for a complete answer. In some environments, recompiling your app is fine, in others, it is not good at all. Still, you should explain why you want to getPublisher() -- this seems like a code smell to me. What might you do with that information??
Feb 11, 2016 at 22:20 answer added arisalexis timeline score: 0
Feb 11, 2016 at 21:44 answer added user949300 timeline score: 1
Feb 11, 2016 at 21:28 answer added konishiki timeline score: 0
Feb 11, 2016 at 21:14 comment added Robert Harvey That shouldn't be an enum. Adding a publisher requires you to recompile the application.
Feb 11, 2016 at 21:09 review First posts
Feb 11, 2016 at 21:23
Feb 11, 2016 at 21:04 history asked konishiki CC BY-SA 3.0