[Twisted-Python] How to split a huge 'service' class.
newptcai at gmail.com
Wed Mar 25 21:51:15 EDT 2009
I am writing a network application based on twisted and following the
"finger service" tutorial in twisted document.
I wrote multiple protocols classes and a single service class.
This allows client to choose the most suitable protocol to access services.
My problem is : the service class now become really huge, about 3000
thousands line of code.
Then I moved these code that really do the job in service class to several
classes, and the service would call these methods of these classes to finish
calls from protocol classes.
But still, this would cause another problem : now the service classes seems
to be useless. It contains lots small methods that almost do nothing. That
has a bad smell for me.
So, if you are in my situation, what will you do？
look to the things around you,the immediate world around you, if you are
alive,it will mean something to you ——Paul Strand
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python