How do i get out of the habit of procedural programming and into object oriented programming?

前端 未结 20 906
你的背包
你的背包 2020-12-23 12:13

I\'m hoping to get some tips to kinda help me break out of what i consider after all these years a bad habit of procedural programming. Every time i attempt to do a project

20条回答
  •  我在风中等你
    2020-12-23 13:04

    Simply practice. If you've read everything about OOP and you know something about OOP and you know the OOP principals implemented in your language PHP... then just practice, practice and practice some more.

    Now, don't go viewing OOP as the hammer and everything else as the nail, but do try to incorporate at least one class in a project. Then see if you can reuse it in another project etc..

提交回复
热议问题