Modern workflow / project architecture with PHP
Posted
by
Sprottenwels
on Programmers
See other posts from Programmers
or by Sprottenwels
Published on 2013-10-20T20:08:08Z
Indexed on
2013/10/20
22:10 UTC
Read the original article
Hit count: 210
php
I wonder how one professional developer would design the backend-part of his application.
I try to use PHP as seldom as possible and only for data serving/saving purposes.
To do so, i would create a module/class for every greater part of my application, then write some single script files which are called by javascript.
E.g:
- User clicks a "retrieve data" button
- javascript will call retrieveData.php
- retrieveData.php will create an instance of the needed class, then executes myInstance->retrieve()
- the data is returned to my JS by retrieveData.php
However, i see some disadvantages in this practice:
- I will need a single scipt file for every action, (e.g retrieveData.php, saveData.php etc)
- I need a man-in-the-middle step: from JS to my single script, to my classes
How are modern applications designed to accomplish what i need to do?
© Programmers or respective owner