Export to GitHub

db2php - issue #9

Create abstract base class for the entity classes


Posted on Nov 18, 2009 by Helpful Dog

Hi, don't know if you're still working on this project. I hope so, because this is already a great plug-in and it has huge potential. I couldn't see another way of contacting you, so I decided to post my suggestions here.

It would be nice if all the generated entity classes had a common abstract base class. Loads of the methods can be implemented in this base class, since they do not differ from class to class. Other methods could be declared abstract, since all the generated classes have this method, but they use a different implementation.

I think this would be a much cleaner implementation of the generated classes. It would have many benefits. If I decide to modify an existing method, I wouldn't have to modify every generated class (or the source code that generates these classes). Changes can be made in one place. Also, functions and methods can be reused for every generated class without resorting to ugly and unsafe casting methods.

Comment #1

Posted on Nov 21, 2009 by Grumpy Horse

HI ^^ Thank you for your comment :) Yes, I am still working on it, just haven't made a public release in a while :/ I considered the abstract class approach already, and it would save a lot of duplicate code. Originally I wanted to have no dependencies on the generated class at all, so I didn't do it, but since the DFC/DSC classes, there are anyway. Might take a little while till I make a release though :( Sorry, too busy lately :(

Comment #2

Posted on Jan 13, 2012 by Grumpy Horse

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium