i want to write a middle sized web-application in php with mysql and jquery.
Does it make sense to generate only one “startup” page and load every content site dynamic with a jquery post ?
And does it make sense to make a folder structure like
images
index.php
func.js
content
/ news
/ add.php
/ delete.php
/ index.php
/ func.js
where the root index.php describe the full website layout and in the root func.js is the “what to load on landing and witch button goes to witch function” content and in the content/news/ folder there are many files for every action one file with a specific func.js file with actions for the news site ( in this demo ).
Or is it better to make only one file with a get like : news.php?action=show
Or would you preferr that the news/add page includes the full webpage? not only the content to load from the main – layout ?
greetings
Yes it make sense but and the folder structure is not so bad 🙂
check here http://en.wikipedia.org/wiki/Single-page_application
You should use a css layout that allows you to include pieces/modules of html, smaller the pieces are faster the app is 🙂
If you make some googling you can also find out js frameworks for modular structures and one page apps like Backbone.js for example: http://backbonejs.org/