D
D
Danny132020-05-12 18:48:54
PHP
Danny13, 2020-05-12 18:48:54

Better/optimal way to separate php file logic without frameworks?

I have an interactive site in php.
The structure is built in it like this:
----js folder with js files
|___custom.js
|___materialize.js
etc.
----css folder with css/scss files
|___custom.css
|___custom.scss
|___materiaize.css
etc.

user-login.php - login front-end
here admin.php - main panel front-end

here m_createTask.php - modal dialog for task creation
m_deleteTask.php - modal dialog for task deletion here
m_createWorker.php - here is a modal dialog for creating a worker
m_deleteWorker.php - here is a modal dialog for deleting a worker

sc_user-login.php - here is the login logic
sc_createTask.php - here is the logic for creating tasks
sc_deleteTask.php - here is the logic for deleting tasks
sc_createWorker.php - here is the logic for creating a worker
sc_deleteWorker.php - here is the logic for deleting a worker

These are 3 questions:
1. Does this division affect performance? Or should all php logic be in one file?
2. Does it make sense to separate modal dialogs into separate files, or is it better to write them all directly in admin.php?
3. Is there any optimal solution for separating logic/modal windows without frameworks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Ivanov, 2020-05-12
@Danny13

1. Does not affect, and it is not necessary to shove it into one file. The main thing is to monitor the quality of the code
2. Use ajax, it will greatly simplify your life, you won’t need to worry about it
3. paragraph 2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question