سؤال

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 general (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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top