I have been using PHP/Zend for quite a while and now I need to start using AJAX to improve our overall user experience. I am currently working on being able to display a modal window (a box) in the middle of a page where I will display some dynamic information to the user (this "info" is actually a number of small pages displayed in the box, sometimes a form, warnings, messages, advertizing...). I am trying to scope the biggest number of browsers/versions and possibles.
开发者_开发知识库Would you guys agree that first I should have all the info (pages) I need to display divided in different actions/controllers and only them use AJAX to pull this info in a modal box so that I could scope this situation? I mean so that users without fancy browser could still navigate?
I am pretty sure that's something everybody faces on a daily basis. How do you guys deal with this?
In my opinion, if you have to just print different content, you can use one controller ("box") and one action (said "view"). Besides, I would like to have a little database of those content and so you can use the same controller/action and give different content just changing a parameter. In this way, as you want, you can serve them in a lot of different way (for example for the "fancy" browser). I hope this could help.
精彩评论