How to refactor method which performs multiple steps (dependent on each other)?

Posted by dotnetdev on Stack Overflow See other posts from Stack Overflow or by dotnetdev
Published on 2010-03-29T16:55:12Z Indexed on 2010/03/29 17:03 UTC
Read the original article Hit count: 104

What is the best way to refactor a method which has many steps in it? For example, a method which setups some objects, creates several objects (Eg a database table), and so on - basically, one method which does a set of related steps.

Would this be best suited to the command design pattern?

Thanks

© Stack Overflow or respective owner

Related posts about design-patterns

Related posts about refactoring