要使用PHP框架? [英] To Use a PHP Framework or Not?

查看:308
本文介绍了要使用PHP框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始在PHP中编写几个应用程序,我越来越熟悉这种语言。有人告诉我关于CakePHP和CodeIgniter。我想更好地了解这些方法如何帮助我,以及是否值得花时间学习一个框架。

I've started writing a few applications in PHP, and I'm becoming more familiar with the language. Someone told me about CakePHP, and CodeIgniter. I wanted to get a better understanding of how these could help me, and whether it's worthwhile spending the time to learn a framework?

推荐答案

使用MVC PHP框架有什么好处?

What are the benefits of using MVC PHP frameworks ?

使用PHP框架有很多好处,让我们看看使用它们的一些主要好处。

Well there are many benefits of using PHP frameworks, let’s see some of the main benefits of using them.


  1. 这些PHP框架遵循一些设计模式,所以当你使用框架时,你必须遵循他们的编码惯例,这使得你的代码干净,

  2. 像CakePHP,CodeIgniter,Zend Framework,Symfony等流行的PHP框架遵循模型视图控制器(MVC)设计模式,将业务逻辑与用户界面分离,还使代码更加清晰和可扩展

  3. 每个人都可以猜到,这些框架包含了很多库,使您的工作更轻松。例如:为了验证一个表单,你不必像在正常编码情况下(不使用框架)那样编写那么多的代码,只需要几行代码调用库就足够了。 li>
  4. 在团队中处理大型项目时,MVC PHP框架将是一个很好的开发工具,您可以指定开发人员为开发人员开发模块的一部分,集成将是

  5. 这些MVC框架真的帮助你快速开发项目,如果你知道一个框架,那么你永远不会担心项目的截止日期。

  6. 大多数MVC框架使用清晰的网址方法,使您的网络项目的SEO友好。

  1. These PHP frameworks follow some design pattern, so when you use a framework you have to follow their coding convention, which makes your code clean and extensible for future purposes.
  2. The Popular PHP frameworks like CakePHP, CodeIgniter, Zend Framework, Symfony follow Model View Controller (MVC) design pattern which separates business logic from user interface, also making the code cleaner and extensible.
  3. As everybody can guess, these frameworks contain a lot of libraries to make your job easier. For example: to validate a form you don't have to write as much code as you have to do in normal coding scenario (without using a framework), just a few lines of code calling the library is usually enough for it.
  4. While working on a large project in a team, an MVC PHP framework will be a great tool for development as you can assign a developer to develop one part of a module for a developer and integration will be quite easy of these developed modules at final level.
  5. These MVC frameworks really help you to develop the project rapidly, if you know a framework well then you'll never worry about the project deadline.
  6. Most of these MVC frameworks use clear url approach making your web project SEO friendly.

请检查文章

这篇关于要使用PHP框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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