开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜