search
HomeBackend DevelopmentPHP Tutorial qeephp跟CI的优缺点

qeephp和CI的优缺点
用qeephp做了几个项目了,突然想学一个新的框架,感觉ci还不错,不知道它们之间的优缺点,希望大家畅所欲言,有好的框架给推荐个也行。
------解决方案--------------------
CI比较简单,上手快,中文文档齐全,以下为CI的主要优点:

CodeIgniter 是什么?
CodeIgniter 是一个应用程序框架
CodeIgniter 是一个为用 PHP 编写网络应用程序的人员提供的工具包。它的目标是实现让你比从零开始编写代码更快速地开发项目,为此,CI 提供了一套丰富的类库来满足通常的任务需求,并且提供了一个简单的接口和逻辑结构来调用这些库。CodeIgniter 可以将需要完成的任务代码量最小化,这样你就可以把更多的精力放到项目的开发上了。

CodeIgniter 是免费的
CodeIgniter 是经过 Apache/BSD-style 开源许可授权的,只要你愿意就可以使用它。阅读 许可协议 可获得更多的信息。

CodeIgniter 在 PHP 4 上运行
CodeIgniter 的编写完全兼容 PHP 4。尽管 PHP 5 在面向对象处理方面更具优势,我们本该利用此优势来简化我们(在 PHP4 下的)实现创造性解决方案的(例如:多继承)工作,但是我们建立此框架时,PHP 5 并未被广泛使用,这意味着(如果用 PHP 5来写)我们将要放弃大部分的潜在用户。主流操作系统供应商比如 REDHAT 非常缓慢得转向对 PHP5 的支持,并且短期内他们不大可能会全面支持 PHP5。所以,我们认为用 PHP 5 来写 CodeIgniter 不合 PHP 社区的最大利益。

注解: CodeIgniter 能够在PHP5环境下运行。只是它没有使用PHP5独有的高级特征。

CodeIgniter 是轻量级的
真正的轻量级。我们的核心系统只需要一些非常小的库,这与那些需要更多资源的框架完全相反。额外的库文件只在请求的时候加载,依需求而定,所以核心系统是非常快而且轻的。

CodeIgniter 是快速的
速度非常快。你要找到一个比 CodeIgniter 表现更优的框架应该很难吧。

CodeIgniter 使用 M-V-C 模型
CodeIgniter 使用了模型(Model)- 视图(View)- 控制器(Controllers)的方法,这样可以更好地使表现层和逻辑层分离。这对项目的模板设计者来说是非常有用的,它最小化了模板中的程序代码量。我们在 MVC 各自的页面中对此做了更多的介绍。

CodeIgniter 生成干净的 URL
CodeIgniter 生成的 URL 非常干净而且是对搜索引擎友好化的。不同于标准的“字符串查询”方法,CodeIgniter使用了 segment-based 这样的方法:

example.com/news/article/345
 
注意:index.php 文件是被默认包含在 URL 中的,但是可以通过更改 .htaccess 文件来改变这个设置。

CodeIgniter 功能强大
CodeIgniter 拥有全范围的类库,可以完成大多数通常需要的网络开发任务,包括: 读取数据库、发送电子邮件、数据确认、保存 session 、对图片的操作,以及支持 XML-RPC 数据传输等。

CodeIgniter 是可扩展的
这个系统可以非常简单的通过插件和 helper 类库来进行扩展,或者也可以通过扩展类、系统钩子来实现。

CodeIgniter 不需要模板引擎
虽然 CodeIgniter 确实 自带了一个可选的模板解析器程序,但不要求你必须使用模板。模板引擎完全与本地化PHP代码的性能需求不符,使用模板引擎我们要学习其语法,这最低限度只比学PHP基础要容易一点点。考虑以下PHP代码:





  • =$name?>






再来对比模板引擎所使用的伪代码:



    {foreach from=$addressbook item="name"}

  • {$name}


  • {/foreach}



的确,例中模板引擎的代码比较清晰,但这带来一个性能问题,因为伪代码要先被转换成PHP才能运行。我们的目标是性能最大化, 所以我们选择不使用专用的模板引擎。

CodeIgniter 已彻底文档化
程序员都喜欢写代码讨厌写文档。当然我们也一样,但是既然文档和代码本身一样重要,我们就要完成它了。况且我们代码资源极其干净而且方便注释。

CodeIgniter 拥有一个友好的用户社区
你可以在我们的 社区论坛 中看到一个成长中的积极活跃的用户社区。


------解决方案--------------------
QeePHP里数据模型比较死板,为了oo而oo,而不是为了数据库查询优化。
比如每次它都会查询表结构.....

及其不喜欢
------解决方案--------------------
ci兼容php4 , 中文文档比较全。 在model层设计 比cakephp差点
------解决方案--------------------
因为它要有数据库是映射,所以必须要有表结构!然后生成模型对象!

这和cakephp是一样的!


但ci和 zendframe都不做这个,特别是zendframe!

它认为,数据库模型不一定要做表映射!

相反,数据库模型应基于业务逻辑!(这个更快)

与此相关的还有表单验证有,有的放在模型类中,有的放在控制器方法中!

比如: zend的就在控制器方法!(这也是因为,有的验证可能和数据库不相关,或者关联到多个表)


------解决方案--------------------
ci 上手快 功能全 但是不适合大型网站 
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Continued Use of PHP: Reasons for Its EnduranceThe Continued Use of PHP: Reasons for Its EnduranceApr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python: Exploring Their Similarities and DifferencesPHP and Python: Exploring Their Similarities and DifferencesApr 19, 2025 am 12:21 AM

PHP and Python are both high-level programming languages ​​that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools