哪个ORM for codeigniter? [英] Which ORM for codeigniter?

查看:130
本文介绍了哪个ORM for codeigniter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的报价说服了最终去ORM。在过去,我不喜欢ORM,并把它写成一个愚蠢的做sql的方式。处理sql中的分层数据是我不想处理的痛苦。

The quote below has convinced to finally go ORM. In the past I havn't really liked ORM and wrote it off as a stupid way of doing sql. Dealing with hierarchical data in sql is a pain I don't want to deal with.


有一个原因,我们有这些对象关系Mapper的东西,这是因为一个称为对象关系阻抗失配的问题。基本上,用于确保数据库保持完整的数据库的正式数学模型遵循具有行和列以及对其他表的引用的表的系统,而我们今天使用的大多数编程语言中的数据结构在嵌套的树状结构中操作数据。它更像是电子表格和XML文档之间,或者分类帐和家谱树图之间的区别。 - http://zork.net/motd/nick/django /your-favorite-orm-sucks.html

我想要的东西只需很少的设置。我的项目大部分是小的,所以我不想花很多时间定义模型,当我只使用它们为少数查询。

I want something with minimal effort to setup. Most of my project are small so I don't want to spend much time defining models when I only use them for few queries.

我使用codeigniter作为php框架和MySQL作为数据库。

I'm using codeigniter as the php framework and MySQL as the database.

推荐答案

教义是辉煌的,非常容易设置和使用CI。有三种方式集成它1)在CI wiki中描述的方式2)作为插件3)使用钩子。我不喜欢选项1,因为它涉及到CI系统文件。选项2很容易,我目前使用。设置在www.phpandstuff.com。我从来没有尝试过选项3,但听起来很有趣 - http:/ /blog.medryx.org/2008/10/04/codeigniter-and-doctrine/

Doctrine is brilliant and very easy to setup and use with CI. There are three ways of integrating it 1) the way described in the CI wiki 2) as a plugin 3) using hooks. I don't like option 1 as it involves messing with CI system files. Option 2 is very easy and what i currently use. Setup is described at www.phpandstuff.com. I've never tried option 3 but it sounds interesting - http://blog.medryx.org/2008/10/04/codeigniter-and-doctrine/

这篇关于哪个ORM for codeigniter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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