afterdead / db2php

Automatically exported from code.google.com/p/db2php
GNU General Public License v3.0
0 stars 0 forks source link

Create abstract base class for the entity classes #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by baskooij...@gmail.com on 18 Nov 2009 at 10:53

GoogleCodeExporter commented 8 years ago
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 :(

Original comment by rc.poi...@gmail.com on 21 Nov 2009 at 7:07

GoogleCodeExporter commented 8 years ago

Original comment by rc.poi...@gmail.com on 13 Jan 2012 at 8:29