0
I am studying Object Orientation applied to PHP and I am getting lost in the basics; it does not enter my mind how to organize scripts and classes. I studied Java OO and I have no major problems, but I started my studies in PHP in procedural form and now I can’t understand how it works, for example, the class containing the 'main', in Java, responsible for making it work; how it happens in PHP.
I am creating a simple application of CRUD, containing:
- A welcome page;
- A Login page;
- And while logged in, you will have access to a registration page, and an update of records.
I have read several codes, articles and tutorials on OOP PHP, but my mind is blocked to understand this.
What would be the best PHP programming practices to create this application? A separate connection script or integrated into the pages? Use abstraction or not? (Users with access would have equal permissions to register and update entries). All files in the same folder, or all separate, even if it is a learning-only project?
I read a little about MVC, it’s useful to study in depth?
How would you do that?
Just a note, in Java you do not have such problems because it "already comes" with technologies for such, PHP is more free for you to create the "things" the way you prefer. I recommend you start using an existing framework for PHP, suggestions: Laravel, cakephp, codeigniter. I
– Guilherme Nascimento