Reputation: 3095
I personally like to break long methods into smaller steps, for example:
Load()
{
LoadStep1()
LoadStep2()
LoadStep3()
LoadStep4()
...
}
is this overkill? Someone else complained that there is too much jumping around to find the actual logic. I personally like it because I can see the intention of the programmer much easier.
What is the right balance, and how many levels of nested methods is recommended before it defeats the object of clarity?
Upvotes: 0
Views: 55
Reputation: 1635
As no one else has left a more substantial answer I'll just refer to my comment on your question and provide this link (which is a decent read) http://weblogs.asp.net/arturtrosin/archive/2009/01/26/separation-of-concern-vs-single-responsibility-principle-soc-vs-srp.aspx
Upvotes: 1