File modules/cms/action/README.md

Last commit: Wed Nov 18 00:18:10 2020 +0100	Jan Dankert	Refactoring Part 2: Removing all unnecessary methods in the action base classes.
1 # And... Action! 2 3 These action classes are the 'presenter' part in the [model-view-presenter](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter). 4 5 6 Their mission is to 7 - validate input data 8 - calling the model 9 - providing all data for the UI. 10 11 ### View and Post 12 13 Every HTTP-Request contains 3 parameters: 14 - `action`: The action pointing to an model object 15 - `method`: The method 16 - `id` : The id of the model object. This is optional in some cases 17 18 ### View and Post 19 20 The parameter `method` and the HTTP method are deciding, which method is called. 21 22 Example: 23 `GET /?action=example&method=foo` will call _ExampleFooAction::view()_. 24 `POST /?action=example&method=foo` will call _ExampleFooAction::post()_. 25 26 ### Contracts: 27 - **no database requests are done here!** Database requests are only done by the model classes.
Download modules/cms/action/README.md
History Wed, 18 Nov 2020 00:18:10 +0100 Jan Dankert Refactoring Part 2: Removing all unnecessary methods in the action base classes. Sun, 27 Sep 2020 01:04:56 +0200 Jan Dankert Enhanced documentation Mon, 24 Feb 2020 18:36:11 +0100 Jan Dankert Documentation added.