开发者

Zend Framework EAV Implementation

开发者 https://www.devze.com 2023-02-02 17:33 出处:网络
I was wondering if there were an开发者_JAVA技巧y good pre-built ways to implement an EAV design pattern in Zend Framework?

I was wondering if there were an开发者_JAVA技巧y good pre-built ways to implement an EAV design pattern in Zend Framework?

I am trying to decide if I should create my own implementation or use one that has already been built.


Use Doctrine with MongoDB Document Mapper http://www.doctrine-project.org/

Zend Framework 2.0 has automated install for Doctrine with Composer, so it means Zend People also offer this as an Option apart from the built-in Zend_Db.

Using EAV on a document-oriented NoSQL database system like MongoDB or CouchDB is way much better than implementing a Hack over Traditional Relational Databases like MySql ( something that Magento did ). NoSQL Databases are better at implementing Sparse Matrix type Data.


Check out Zend Framework EAV on Google Code.


Digitalus CMS uses the EAV pattern, and is based on MySQL. It is true that Mongo or Couch might be more appropriate, but MySQL is often an easier choice because you don't have to install anything. I have tried using SimpleDB, but the local MySQL version is 4x faster. SQLite also works very well.

There are a lot of opponents to this approach, and their claims are largely founded. Any time I need to be able to query data I use a standard relational approach, but EAV shines when you are working with very loosely structured data like the content on a web page.

Digitalus uses an approach where there is the base CMS item model that handles all of the EAV logic. This model also handles a write-through cache so the system ultimately serves content as fast as a flat file system.

All the purists are probably technically correct, but fast and easy have a place in my toolbox.

0

精彩评论

暂无评论...
验证码 换一张
取 消