PHP框架(蛋糕/ smarty):如何使用它和什么时候? [英] PHP framework (cake/smarty): How to use it and when?

查看:148
本文介绍了PHP框架(蛋糕/ smarty):如何使用它和什么时候?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重复




什么是PHP框架?
更多


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



任何洞察力都会有所帮助。感谢。

解决方案

框架是由一组语言组成的有组织的代码或库,
$ b


  • 使常见任务轻松/简单

  • 创建一致的方式开发应用程序



    • 一些框架是非常限制性的(因为它是不容易做的事情,除非你做他们'框架'的方式),其他人更宽松。我发现Zend的框架是一个很好的组合,使易于使用的单个组件(例如,你可以将'Feed'库放入你现有的应用程序,而不需要重写应用程序的Zend方式),或者你可以使用Zend MVC和应用程序库为整个应用程序。



      我会远离框架是全有或全无。



      从Zend框架(重写上面,可能更完全):



      Zend Framework一个用PHP 5开发Web应用程序和服务的开源框架。Zend Framework是使用100%面向对象的代码实现的。 Zend Framework的组件结构有点独特;每个组件设计为对其他组件的依赖性很小。这种松耦合架构允许开发人员单独使用组件。我们经常称之为随意使用设计。



      虽然它们可以单独使用,但是当组合时,标准库中的Zend Framework组件形成一个强大且可扩展的Web应用程序框架。 Zend Framework提供了一个强大的高性能MVC实现,易于使用的数据库抽象,以及一个实现HTML表单渲染,验证和过滤的表单组件,以便开发人员可以使用一个易于使用的,面向对象接口。其他组件(例如Zend_Auth和Zend_Acl)为所有公用凭证存储提供用户身份验证和授权。还有一些实现客户端库以简单地访问可用的最流行的Web服务。无论您的应用程序需要什么,您可能会找到一个Zend Framework组件,可以用于通过经过全面测试的基础大大减少开发时间。



      Duplicate of

      What is a PHP Framework? and many more

      So far, I've been using PHP for small tweaks, mostly with WordPress. What are PHP frameworks? Why do I need them? WHEN do I need them?

      Any insight will be helpful. Thanks.

      解决方案

      Frameworks are organized groups of code or libraries, built on top of a language to either

      • Make Common Tasks Easy/Simple
      • Create a Consistent Way to Develop Applications

      Some frameworks are very restrictive (as in it's not easy to do things, unless you do them the 'framework' way), others are looser. I've found Zend's Framework to be a good mix of both, making easy to use single components (for example, you can drop the 'Feed' library into your existing application without needing to rewrite the application the Zend way), or you can use the Zend MVC and Application libraries to for an entire application.

      I'd stay away from frameworks that are 'all or nothing'.

      From Zend's Framework (restating the above, perhaps more completely):

      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框架(蛋糕/ smarty):如何使用它和什么时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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