Hi!

Just as a followup to my email from last night: I think it makes sense to nevertheless define interfaces for MsgData etc. because they also can serve as documentation and help thinking about how you structure your code.

So my usual process is:

- Write an example doctest and refactor/change it until it makes sense
- From the result I might have identified some components. I write interfaces for them which I use in the doctest - I start implementing these interfaces while running the test regularly to see where work is needed - I revisit my code and add additional tests where I might have missed edge cases etc. (this actually still needs to be done for the components we have right now, esp. the error conditions which are hopefully all defined).

And even if I don't plan to exchange my component I add interfaces as IMHO this makes the intention clearer and adds some contract on how to
use the component.

I also sometimes factor components out in utilities or adapters if the class grows to big and a tightly scoped functionality can be better tested in a separate component.

-- Christian




--
Christian Scholz                         video blog: http://comlounge.tv
COM.lounge                                   blog: http://mrtopf.de/blog
Luetticher Strasse 10                                    Skype: HerrTopf
52064 Aachen                              Homepage: http://comlounge.net
Tel: +49 241 400 730 0                           E-Mail [EMAIL PROTECTED]
Fax: +49 241 979 00 850                               IRC: MrTopf, Tao_T

neue Show: TOPFtäglich (http://mrtopf.de/blog/category/topf-taglich/)

_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/pyogp

Reply via email to