Should single purpose utility app use a class

Posted by jmoreno on Programmers See other posts from Programmers or by jmoreno
Published on 2013-11-01T05:34:30Z Indexed on 2013/11/01 10:21 UTC
Read the original article Hit count: 153

Filed under:
|

When writing a small utility app, that does just one thing, should that one thing be encapsulated in a seperate class, or just let it be part of whatever class/module is used to start the application? I.e. Main would consist of 2 or three lines calling the constructor and then the DoIt methods, nothing else. Or should Main be the DoIt method, with whatever functions it needs added to the main class?

Asking because I want to get some alternative perspective, but couldn't find a similar question. If my google-fu is bad and there's a dup, please close.

© Programmers or respective owner

Related posts about design

Related posts about object-oriented