eldavojohn writes "I began coding for a project that had simple requirements for my employer--web services and a test application for them. But requirements crept (as they always do) and strange requests keep coming up. Initially I had decided to use the Spring Framework with Hibernate. And I re-used a lot of libraries that made things simple and quick for me. Strange requests are starting to roll in that involve capabilities beyond those of the frameworks. Now, I used to be told that good programmers write code and great programmers reuse code. It's starting to look like I would have saved myself a whole lot of time if I had written the database transaction using JDBC instead of Hibernate. Because now that I'm married to this object model framework some of this stuff doesn't look doable. So what is better for the large part of software projects out there? Reuse code or code from scratch? What elements or identifications of a problem dictate one option over the other?"
This discussion was created for logged-in users only, but now has been archived.
No new comments can be posted.
You should have used iBatis instead of Hibernate, though I understand why you chose Hibernate or any other ORM framework. It was a poor design decision if you knew the program would be extended at some point. If you didn't know, you need to tell your project manager ASAP of the risks to the timeline associated with these new requirements. You might be surprised how quickly they disappear.
Bottom-line is first and foremost the code(read: design) should be easy to modify.
A better option: (Score:2)
You should have used iBatis instead of Hibernate, though I understand why you chose Hibernate or any other ORM framework. It was a poor design decision if you knew the program would be extended at some point. If you didn't know, you need to tell your project manager ASAP of the risks to the timeline associated with these new requirements. You might be surprised how quickly they disappear.
Bottom-line is first and foremost the code(read: design) should be easy to modify.