Why use a framework with PHP?(为什么要使用 PHP 框架?)
问题描述
我很好奇,使用 PHP 框架有哪些优点(和缺点)?
I'm curious, what are the advantages (and disadvantages) on using a framework with PHP?
我从版本 3 开始就一直在使用 PHP.我从未使用过任何可用于 PHP 的框架,所以我错过了什么?
I've been using PHP on and off since version 3. I've never used any of the frameworks available for PHP, so what am I missing out on?
推荐答案
Framework 将您从低级细节中抽象出来,提高您的工作效率,并保护您免受低级错误(例如防止 SQL 注入攻击).
Framework abstracts you from low level details, makes you more productive, and protects you from low level error ( such as preventing SQL injection attacks).
一个好的 PHP 框架会迫使您分离关注点并实施经过验证的架构,最终改进您的设计,并使您的代码更易于阅读、维护和单元测试.
A good PHP framework forces you to separate your concern and implements the proven architecture, which in the end improves your design, and makes your code much easier to read and maintain and unit test.
这里有 一些 参考为什么你应该使用框架
Here are some references on why you should use framework
这篇关于为什么要使用 PHP 框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么要使用 PHP 框架?


- Laravel 仓库 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01