A
A
Anton Khmyrov2016-02-12 13:25:59
PHP
Anton Khmyrov, 2016-02-12 13:25:59

What needs to be improved/learned?

The prehistory is this - I got tired of Java (I have been working on it for three years), I decided to try my hand at web development (PHP). I asked a company with vacancies for juniors in this area for a test task, communication with this company did not work out, so I ask experts for feedback on the code.
The task (in my retelling because I'm not sure that I have the right to post the original): to implement a tree consisting of sections and elements using PHP and jQuery.
Link to the GitHub
project I did not use PHP frameworks in principle, because I think that you first need to figure out the basics yourself.
I understand that there is no layout.
Implemented according to the MVC scheme and added CNC (I took most of the routing ready).
I would like to know what are the mistakes and what should be learned

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Arutyunov, 2016-02-12
@vivcogit

For some reason, models are stored in your controllers. That is, there is no clear separation between the model / controller - problems will arise during testing.
Have you read phptherightway.com ?
Also, as a rule, only the entry point is left in the public domain - index.php, the rest of the application code is placed one level higher. For example, in the app folder. So the structure is something like this:

app/
-controllers/
-models/
-...
public_html/
-index.php
-images/
-css
-js/
-...

nbproject in .gitignore should be thrown. And in general, the settings of any IDE should be kept locally so as not to litter in the git.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question