Re: Re[2]: email notification and abstract methods

Kimbro Staken <[email protected]> Sat, 15 Nov 2003 10:01:01 -0700
Newsgroups gmane.comp.web.syncato.general
Message-ID <[email protected]>
I'll have to disagree with this one. This doesn't buy you anything,  
it's just extra code. I assume you're thinking about the future when  
there might be another database type added. I'm not too concerned about  
that, agile methods are preferable. If the need comes up a re-factoring  
can be made at that time.

On Nov 15, 2003, at 9:12 AM, nemilya wrote:

>>> But abstract function are not marked out in code of this class.
>>> I think it would be clearer for understunding, if add to
>>> BaseDatabase.py:
>
> KS> OK, I added these.
>
> Thanks, but I think that exists else more better variant :)
> This variant - definition interface (just abstract class), f.e.
> 'IDatabase'. In reality Weblog class works with interface (from
> logical point of view).
>
> And the 'BaseDatabase' class will inheritance from it:
>
> class BaseDatabase(IDatabase):
> ...
>
> # IDatabase.py
> class IDatabase:
>
>     def addRecord(self, record):
>         pass
>
>     def deleteRecord(self, recordID):
>         pass
>
>     def getNextID(self):
>         pass
>
>     def getPathData(self, xpath):
>         pass
>
>     def getPathDataForRecord(self, recordID, xpath):
>         pass
>
>     def getRecord(self, recordID):
>         pass
>
>     def getRecordDocument(self, recordID, txn=None):
>         pass
>
>     def shutdown(self):
>         pass
>
>     def updateRecord(self, recordID, record):
>         pass
>
>
>
>
> -------------------------------------------------------
> This SF. Net email is sponsored by: GoToMyPC
> GoToMyPC is the fast, easy and secure way to access your computer from
> any Web browser or wireless device. Click here to Try it Free!
> https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/ 
> g22lp.tmpl
> _______________________________________________
> Syncato-general mailing list
> Syncato-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/syncato-general
>
>
Kimbro Staken
Software, Consulting and Writing http://www.xmldatabases.org/
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl