gpt4 book ai didi

PHP框架(蛋糕/聪明): How to use it and when?

转载 作者:可可西里 更新时间:2023-11-01 00:53:46 25 4
gpt4 key购买 nike

重复

What is a PHP Framework?and many more

到目前为止,我一直在使用 PHP 进行小的调整,主要是使用 WordPress。什么是 PHP 框架?为什么我需要它们?我什么时候需要它们?

任何见解都会有所帮助。谢谢。

最佳答案

框架是有组织的代码或库组,构建在一种语言之上

  • 使常见任务变得容易/简单
  • 创建一致的应用程序开发方式

一些框架非常严格(因为做事情并不容易,除非你以“框架”的方式来做),其他的则比较宽松。我发现 Zend 的框架很好地结合了两者,使单个组件易于使用(例如,您可以将“Feed”库放入现有应用程序中,而无需以 Zend 方式重写应用程序),或者您可以将 Zend MVC 和应用程序库用于整个应用程序。

我会远离“全有或全无”的框架。

来自 Zend 的框架(重述以上内容,也许更完整):

Zend Framework is an open source framework for developing web applications and services with PHP 5. Zend Framework is implemented using 100% object-oriented code. The component structure of Zend Framework is somewhat unique; each component is designed with few dependencies on other components. This loosely coupled architecture allows developers to use components individually. We often call this a "use-at-will" design.

While they can be used separately, Zend Framework components in the standard library form a powerful and extensible web application framework when combined. Zend Framework offers a robust, high performance MVC implementation, a database abstraction that is simple to use, and a forms component that implements HTML form rendering, validation, and filtering so that developers can consolidate all of these operations using one easy-to-use, object oriented interface. Other components, such as Zend_Auth and Zend_Acl, provide user authentication and authorization against all common credential stores. Still others implement client libraries to simply access to the most popular web services available. Whatever your application needs are, you're likely to find a Zend Framework component that can be used to dramatically reduce development time with a thoroughly tested foundation.

关于PHP框架(蛋糕/聪明): How to use it and when?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1411510/

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