V
V
Vadim Stepanenko2018-02-23 23:10:17
PHP
Vadim Stepanenko, 2018-02-23 23:10:17

Why use routes, controllers and views?

Why use routes, controllers and views?
Is it possible to just throw the index.php, user.php, news.php files into the root and simply access this or that page with links?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2018-02-24
@VladimirAndreev

Here you have a few routes, hundreds of so three.
And you have to add something to everything. And if you have views - you edit 1 file. And if not - 300.

X
xmoonlight, 2018-02-24
@xmoonlight

You can not use any names / concepts, but make sure that one piece of code is unique and does not repeat in the project.
This does not mean that your design approach will be any worse than the MVC model. This means that it will be just different.
%25D0%2592%25D0%25B5%25D0%25B1-%25D1%258

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question