From: Jay Date: 2010-07-10T02:15:04+09:00 Subject: Re: from functions to classes, where should I start? Hi JaordZZ, I began software development using OOP can't recall any books to recommend. I would encourage you to think critically about when to use OOP, rather than doing it simply because of Agile dogma. When reviewing my code, I've often found that I tend to use classes for everything -- just out of habit (and due to a heavy Java background). When coding, I now try to ask myself, "Does this code represent something that benefits from OOP, or should it exist as a function(or Module or static method)?". Here are some of the most common reasons to consider OOP: 1) Making state information handy to the functions that need it. If you find yourself passing the same data in as parameters to related functions, then consider wrapping the data and functions up into a class. 2) Organizing large amounts of code OOP allows you to present public interfaces that simplify the usage of code. This is very helpful for large projects, but not usually necessary for smaller scripts and projects. 3) Use of inheritance or polymorphism If you want to benefit from subclassing objects. And some common reasons to consider your current approach: 1) You are already using it and it works (or does it?) 2) There is a small performance penalty with each object that is instantiated I know this is very oversimplified, but my lunch break is ending soon. ;-) Hope that helps a little.