Picture M-V data flow. $tmp_imgpath=/srv/disk16/3266814/www/phporacle.eu5.net/zinc/img/img_big/mvc_M_V_data_flow.jpg
$tmp_imgurlrel=/zinc/img/img_big/mvc_M_V_data_flow.jpg
Edit post data in database table row 〉〉
Summary: WHY Nobody made good (not to simple) tutorial about PHP menu & CRUD code skeleton ? Especially for each module in own folder like Oracle forms .fmb-s there is (almost) nothing to find in learning sources.
see https://github.com/slavkoss/fwphp/blob/master/readme.md ([web server root dir. path]/readme.md, [web server root dir. path]=J:/awww/www).
Picture 01-1. Laravel CODE STRUCTURE (code flow ee signals flow) : 1, 2 and 3 are routing code snippets (odsječci) all 3 in same script, or separate scripts, or separate classes scripts.
In B12phpfw :
Picture 01-2. M-C-V data flow (Laravel) : M-C-V data flow is usual in PHP world, not in JS, Blazor, Oracle Forms .fmb-s...
Controller instantiates M and includes V (instantiates V if V is class) and pushes M data to V.
I do not see advantages compared to M-V data flow. Disadvantages are :
Picture 02-1. M-V data flow (original MVC idea) : V pulls data from M = cRud actions - only R using DAO classes : module's Tbl_crud.php and shared Db_allsites.
Model code is most complicated. C and V code can be standardized, M only partially : cc, rr, uu, dd methods for all tables but business logic in M code can not be standardized.
User's events are handled in Controller class. Code (signal) flow :
Picture 02-2. M-V data flow (original MVC idea)
Controller includes (instantiates) V which instantiates DAO class (in B12phpfw it is [web server root dir. path]/fwphp/glomodul\user/Tbl_crud.php - same named Tbl_crud.php is in all modules dirs) :
Data access object (DAO) pattern provides an abstract (public) interface (Config_allsites.php) to some DB or other persistence mechanism (implementation of DAO Db_allsites).
By mapping app calls in Tbl_crud.php to persistence layer Db_allsites, DAO is not exposing DB details, it is isolation which supports single responsibility principle.
Picture 03. M-V and M-C-V data flow compared - both are ok.
I prefer M-V which is also M-C data flow (if C manipulates persistence layer data eg in DB, web service, csv file... = CRUD actions - all four: C,R,U and D.
2019-11-03 14:54:36
##### eeeeee wwwwwwww 3 33333333333333 33333333 333########
2019-10-20 21:06:44
ssssssssssssssssssssssssssss ssssssssssssssss ssssssssssss
2019-01-12 19:45:19
great post
2019-01-12 10:19:59
جا سو Centaurus راجہ جی
2020-01-27 12:20:29
2019-10-18 15:10:29
2019-10-12 12:20:29
2019-03-16 12:20:29
2019-02-24 12:20:29
2018-05-29 08:20:29
2017-09-27 12:20:29
2017-09-13 12:20:29
2017-05-27 12:20:29
2016-10-26 12:20:29
_.-'''''-._ .' _ _ '. / (o) (o) \ | © | | Slavko Srakočić | \ '. Zagreb.' / '. ''---'' .' '-._____.-'/srv/disk16/3266814/www/phporacle.eu5.net/fwphp/glomodul/blog/home_side_area.php