Ticket #1489 enhancement closed fixed

Opened 7 years ago

Last modified 5 years ago

Shuldn't an interface go with the protocol ?

Reported by: pupeno Owned by:
Priority: low Milestone:
Component: core Keywords: documentation
Cc: pupeno Branch:
Author: Launchpad Bug:

Description


Attachments

twistedquotes.diff Download (2.4 KB) - added by exarkun 5 years ago.
move IQuoter to a more sensible place

Change History

1

Changed 7 years ago by pupeno

On "Designing Twisted            
Applications" (http://twistedmatrix.com/projects/core/documentation/howto/design.html)            
for me, it would seem more natural to put the interface, IQuoter,  next to the          
protocol and factory implementation, QOTD(Protocol) and QOTDFactory(Factory),      
instead of the concrete implementation of a Quoter, StaticQuoter and 
FortuneQuoter. 
That is because there will be one protocol implementation, which is a reusable 
library while there would be many implementations of programs using that 
library and all of them would need to implement IQuoter. 
Thanks.

2

Changed 5 years ago by exarkun

  • owner set to z3p
  • component set to conch

Yes, that seems sensible.

3

Changed 5 years ago by exarkun

  • owner changed from z3p to exarkun
  • component changed from conch to core

Changed 5 years ago by exarkun

move IQuoter to a more sensible place

4

Changed 5 years ago by exarkun

  • keywords documentation, review added; documentation removed
  • owner exarkun deleted

I moved the interface and made a few other very small fixes to things nearby. TwistedQuotes needs some serious attention and more work than I'm going to give it now, though.

5

Changed 5 years ago by radix

  • owner set to exarkun
  • keywords documentation added; documentation, review removed

Looks good. I even ran the code to test it.

+1

6

Changed 5 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [24129]) Apply twistedquotes.diff, improving the organization of code in the quote example

Author: exarkun Reviewer: radix Fixes: #1489

Move the IQuoter interface to be close to the factory which uses it, instead of being close to the one implementation of it. This more closely resembles the organization of a real program, where the user of an interface does not know or care where the implementation comes from, only that it behaves correctly, and where there may be several implementations of the interface in different places.

7

Changed 2 years ago by <automation>

  • owner exarkun deleted
Note: See TracTickets for help on using tickets.