为什么要使用 PHP 框架? [英] Why use a framework with PHP?

查看:22
本文介绍了为什么要使用 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 框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆