Doctrine vs. TableGateways

Home Forums Learn ZF2 Doctrine vs. TableGateways

This topic contains 1 reply, has 2 voices, and was last updated by  Slavey Karadzhov 4 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #556

    Hey guys,
    I will start a medium size project using ZF2 and I am in doubt on using Doctrine 2 or TableGateways.

    I really worried about Doctrine performance as I watched a video some days ago as a guy talk about some performance problems using it with ZF.

    Considering the medium size project, what rules would you apply in order to identify the faster option between Doctrine and TableGateways?

    Thank you


    Slavey Karadzhov

    Hi Welington,
    What I usually do is try to check the following before deciding what to do:

    • Will there be complicated joins between tables?
    • Is the data for one entity spread across different tables?
    • Are there more than 30 entities expected?
    • Do I have places where more than 30 entries have to be shown in a single page?
    • Is the data in the tables changing very often and cannot be cached?

    If most of the answers are “yes” then I will go for TableGateways. But it quite often depends on the purpose of the web application. So it will be interesting if other ZF2 developers share also their thoughts on this.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.