我们如何调用我们使用php的方式? [关闭]

I have maybe a strange question but I just need to know,

When using PHP there are a lot of ways to build a application or website. My question how do we call this build models?

I list some ways I know and maybe someone knows how they are called:

  • An index with a application view. Every action is posted to a PHP file like delete action goes to delete.php and a insert action is posted to insert.php and so on. When finished we use the header('location: index.php'); to return to our view.
  • An index.php with above a long list of if/else or switch statements looking for an action to be called. If action get called like index.php?action=delete the action gets performed and than we create the view. If there is no action call we just make the view.
  • A index file with only basic html it calls the view with ajax from an other php file like action.php?action=start. Every interaction goes trough action.php using ajax to load the result into the index html page.
  • The url gets rewrite by .httacces like website.com/delete/ -> website.com/index.php?action=delete And then everything goes trough index.php. When a action like delete gets called a file that preforms the action gets included like if($_REQUEST['action'] == 'delete'){ include(delete.php); } and at least a view is created.

How are these methods called? Is there a documentation for this?

I am conducting a research to all different ways of working with PHP. Of course I try to lay out a list of advantages and disadvantages and witch way is best or good to use. I know one way of working is called Model view Control in short MVC. But how are the other methods called and where can I find some information about these methods. Especially methods only used for PHP programming because the MVC model is used in a lot of languages.

Martin Fowler calls the first design a "page controller" and your #2 + #4 would then respectively be called "front controller".

It can be hard to draw a clear line between when it's one or the other design as they tend to overlap quite a bit (Your ajax example is a good example - You sort of have two front controllers in there).