mercredi 19 août 2020

web application development good and bad practices

I would like to make sure if I'm using good practices in my web development.

  1. I'm Always use one index.php file as an entry point, all my website pages (even admin page) , is requested from this page.

  2. When requesting the page, index.php using ajax(GET) to append the content in my "main-page" (div) I event append jquery methods to this .

  3. The request sent to php file that check user permissions for this page, if have permission , ajax will append the data in the main-page section , if not: ajax will append error in the main-page section, but not redirect to anywhere. (I cannot use header , because the page is only included in the main-secion page, so actually even if im trying to redirect , its not redirecting

  4. all the page appended in the main-section , is with php echo .

I wonder if there is any smarter way to do this 4 things I mentioned. I would like to know what is the advantages and disadvantages of this way of developing,

Thank you in advance.




Aucun commentaire:

Enregistrer un commentaire