You’d be wise to invest some time learning the basics of object orientated programming (OOP). Here are some tips to get started and how to make use of it.
Object-oriented programming is intended to promote greater flexibility and maintainability in programming… By virtue of its strong emphasis on modularity, object oriented code is intended to be simpler to develop and easier to understand later on…
Object-oriented programming may be seen as the design of software using a collection of cooperating objects, as opposed to a traditional view in which a program may be seen as a collection of functions…
The rough explanation
You down with OPP (Yeah you know me) 3X Who's down with OPP (Every last homie) You down with OPP (Yeah you know me) 3X Who's down with OPP (All the homies)
Yea? If you recognize this pattern you should continue with the resources listed here. You identify your code, split it into several functions that call each other. You group common tasks into objects (classes) with methods (functions).