问题描述
自从我开始使用.NET,我刚刚创建助手类或部分类,以保持位于并包含在自己的小容器等。
Ever since I started using .NET, I've just been creating Helper classes or Partial classes to keep code located and contained in their own little containers, etc.
我正在寻找了解是使那些代码作为清洁和抛光,因为它可能是可能是最佳做法。
What I'm looking to know is the best practices for making ones code as clean and polished as it possibly could be.
显然,干净的代码是主观的,但我米聊什么时候要用的东西(而不是如何使用它们),如多态,继承,接口,类以及如何更恰当地设计班(使他们更加有用,而不是仅仅说'DatabaseHelper',因为一些人认为这是不好的做法在的设计:
A real eye-opener to me was Refactoring: Improving the Design of Existing Code:
通过适当的训练熟练的系统
设计者可以采取一个坏设计和
返工成精心设计,稳健的
码。在这本书中,马丁·福勒
展示了在那里的
重构的机会通常可以发现,
和如何去返工坏
设计成一个很好的一个。
它帮助我高效和系统重构代码。此外,它帮助了我很多与其他开发商,讨论时,他们的圣代码
要改变...
It helped me to efficiently and systematically refactor code. Also it helped me a lot in discussions with other developers, when their holy code
has to be changed ...
这篇关于重构代码:当该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!