How difficult is it to move from procedural to OOP? I've always coded in proc, and never even touched OOP. Are there any preparation steps I should take? Any pitfalls to look out for?
aint my sig design skills sick?
|
PHP
Moving from procedural to OOP? |
(Jul 5, 2018 12:57 AM).eXe Wrote: How difficult is it to move from procedural to OOP? I've always coded in proc, and never even touched OOP. Are there any preparation steps I should take? Any pitfalls to look out for? There must be tons of tutorials and books out there since PHP became OO. e.g. https :// code.tutsplus.com/ tutorials/object-oriented-php-for-beginners--net-12762 (Jul 6, 2018 07:02 AM)d4rkc4st Wrote: There must be tons of tutorials and books out there since PHP became OO. e.g. https :// code.tutsplus.com/ tutorials/object-oriented-php-for-beginners--net-12762 Using PHP in an OOP setting isn't what I asked, it was the best way to move from only using procedural to OOP.
aint my sig design skills sick?
(Jul 6, 2018 07:11 AM).eXe Wrote: Using PHP in an OOP setting isn't what I asked, it was the best way to move from only using procedural to OOP. Just make sole purposes functions for everything and then call it a class, pretty much what OOP is lol.
Jul 9, 2018 02:03 AM
(This post was last modified: Jul 9, 2018 02:06 AM by Link2.)
Hi,
i wrote a little example for you: gist.github.com/mariusgerum/a32e803e1022956759c4764dad74dec9 (sorry i can't post real links yet, so just copy&paste it into your browser). As you can see the logic resides in one single place where you actually need it instead of spreading that shit all over your entire codebase.
🡑🡑🡑
|
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| [PHP] by OneandonlySunny™Apr 22, 2020 10:54 PM | 9 | 205 |
Apr 22, 2020 10:54 PM Last Post: OneandonlySunny™ |
| [PHP] by bull daemonDec 10, 2018 04:23 AM | 4 | 186 |
Dec 10, 2018 04:23 AM Last Post: northerncrisp |
| [PHP] by DarkWapOneJan 21, 2018 11:48 AM | 2 | 144 |
Jan 21, 2018 11:48 AM Last Post: RumbleFrog |