From: Meino Christian Cramer Date: 2004-06-30T23:15:26+09:00 Subject: SOT (slightly offtopic): General OOP question Hi, I have a general question about OOP. There is no problem for me to decide how arrange and design classes _inside_ of a program but I get a "problem" regulary, when trying to decide what to do with "things between" the program and the outside world. For example: A Ruby script should read a file and do something with its contents. What does the "clean white rule of OOP" say: The "physics of the file" (open(),read(),close() and the according error handling) become a class returning an object "containing" the Filehandle? Or the contents of that file? Other example: I want to write a script which correspond with the user with the classic UNIX-like opetions. Shall i make a class for handling the options alone and returning an object containing...what? The accordingly set configuration variables? The options alone, so that the other classes can take the informations they want? Or is it more "OOP-like" when this class will handle "more"... Or in other words: When it comes to data, which travel between the inside world and the outside world of a script I am not sure to decide how much of work the accompanied Class will do with them. Is there any "official" rule of OOP, which I can guide me for better deciding in such thing ? Thank you very much in advance for any help ! :O) Kind rgards, Meino