gpt4 book ai didi

php - 哪些 PHP 框架不使用前端 Controller ?

转载 作者:可可西里 更新时间:2023-10-31 22:52:13 25 4
gpt4 key购买 nike

<分区>

似乎更流行的框架使用前端 Controller 。我了解前端 Controller 的好处(减少冗余并简化可扩展性),但是

我想知道哪些 PHP 框架不使用前端 Controller 。此外,我对那些使用页面 Controller 并建议为 url 使用真实文件目录结构而不是重写几乎每个 url 或使用困惑的查询字符串的框架感兴趣。此外,我有兴趣了解哪些框架不使用前端 Controller 来实现 MVC。最后,您可以提供的关于非前端 Controller 框架的任何其他详细信息都会很有用,尤其是它使用或需要的 PHP 版本。 (我知道我以后可以从其他网站获得这些信息,所以它不那么重要。)

考虑 the words of Rasmus Lerdorf (PHP 的原创者):

"As for MVC, if you use it carefully, it can be useful in a web application. Just make sure you avoid the temptation of creating a single monolithic controller. A web application by its very nature is a series of small discrete requests. If you send all of your requests through a single controller on a single machine you have just defeated this very important architecture. Discreteness gives you scalability and modularity. You can break large problems up into a series of very small and modular solutions and you can deploy these across as many servers as you like. You need to tie them together to some extent most likely through some backend datastore, but keep them as separate as possible. This means you want your views and controllers very close to each other and you want to keep your controllers as small as possible." - Rasmus Lerdorf

更新:非常感谢用户Alex希望获得更多答案中的第一个。他的回答是QCubed..

"remember that front controller (index.php) and MVC are separate patterns. That is, you can have an MVC framework that does NOT implement or require the front controller. My framework of choice, QCubed, happens to be like that." - Alex

现在,如果我们可以重新打开这个问题,那么我们就可以继续我们开始的工作,并将不使用前端 Controller 的框架列表放在一起。请投票重新开放。谢谢。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com