One vs. multiple entry points in web apps
I'm working on a major refactoring of a web application.
It currently consists of some common scripts included from all pages (common, functions, header, footer...), plus entry points for all kinds of actions (login.php, viewthis.php, viewthat.php).
Now I'm thinking of introducing a front controller and using some kind of model architecture instead.
I'd like to know: What are the pros and cons of both architectures? Any special benefits? What should be used in ge开发者_开发技巧neral (if any)?
I'd recommend a controller. You'll gain in centralized validation of in-data, easier adaptation for mod_rewrite etc.
Can't see any real point of the other technique. It's just old.
regards,
/t
精彩评论