I am a total beginner in PHP and writes simple web apps in procedural approach to apply what I’ve learned so far. I place all the functions in a single php file, no classes just plain functions. DB connection settings are also in a single file. There’s also no front controllers and routers. I am coding in a traditional way.
Now, I want to know your opinion about my approach. Does this apply in real world web development? If I am going to learn new techniques to improve my PHP knowledge, what are they? Thank you so much! Your suggestions will be really appreciated.
it really depends on the complexity of your application(s). if its something simple that you make and then it’s done, and you move on to the next project, it’s probably a fine approach. if it’s something that isn’t so simple, or has the possibility of growing in scope, or it’s something you continually go back to modify, it is probably not a good approach.
in the second case, you will want to look into oop and agile design principles.