I am working on a rather large PHP project written in procedural style (it was written before PHP 5), and I cannot help but feel that some of the things I do are a bit of a “hack”. “Modifying elsewhere can easily break the application. All the design patterns and best practices that I have seen seem to apply only to OOP. I could start writing some of my code using the PHP 5 OOP features, but I'm not sure all other developers are quite familiar with OOP.
Is only the procedure for procedural programming seeming “hacky” to people more familiar with OOP? Are there best practice books that discuss ways to save large procedural applications and reduce the likelihood of new errors?
I know that I could apply OOP principles / patterns in a procedural form, but if I was going to do this, I could just use the PHP OOP functions. Maybe I'm just not well versed in the procedural paradigm?
, PHP, "" - , , . , , , , BAAAAAAD, , . , .
, . , .
- , , , . "", . , .
OOish. , , . $. set_title ($ page, $title) $page- > set_title ($ title), . , , .
- . , , , . , , . , . , - - .
, . PHP3, . $HTTP_GET_VARS, . , , inderdependent code, .
PS: : - . ( , ). . .
Source: https://habr.com/ru/post/1754146/More articles:Spring resource in WEB-INF - javaHow to sync two NSManagedObjectContext - multithreadingSend to Safari and search using the configured search provider on iPhone? - safariHow to access a file in WEB-INF from a Java web application - web-infsuper minimalist plug-in for MS Project: where to start? - c ++Является ли привязка ItemsControl к ObservableCollection более эффективной, чем List ? - c#jQuery forms plugin noConflict problem - jqueryConverting some assembly to VB.NET - does the SHR operator work differently? - assemblyВернуться на предыдущую страницу после входа в систему - redirectEntity Framework - Model Generation Error: '' ', the hexadecimal value 0x1F, is an invalid character - .netAll Articles