Support the ongoing development of Laravel.io →
posted 10 years ago
Architecture
Last updated 2 years ago.
0

100 tables planned from the beginning is a lot. If you have designed your schema correctly then I assure you using a repository and eloquent models separated will help greatly. Using interfaces is optional but recommended. If you had 100 giant models your codebase will be a nightmare. 300 smaller clearer files, while at first seeming like a lot, will be much easier to read and use because each class will be clearer.

Eloquent vs Query builder is an interesting one. I have a project at work using eloquent, repository pattern with interfaces and a project at home using query builder with the data mapper pattern, repositories and interfaces and I personally find the datamapper pattern plays much nicer with repositories. However if rolling your own datamapper pattern, while great, it comes with its own set of headaches that you will need to overcome.

I haven't personally used Doctrine (an ORM that implements the Datamapper pattern) but I've looked into it and it seems great. If your starting a project of this size I highly suggest looking into Doctrine before making your final decision.

Goodluck.

Last updated 2 years ago.
0

damienadermann said:

100 tables planned from the beginning is a lot. If you have designed your schema correctly then I assure you using a repository and eloquent models separated will help greatly. Using interfaces is optional but recommended. If you had 100 giant models your codebase will be a nightmare. 300 smaller clearer files, while at first seeming like a lot, will be much easier to read and use because each class will be clearer.

Eloquent vs Query builder is an interesting one. I have a project at work using eloquent, repository pattern with interfaces and a project at home using query builder with the data mapper pattern, repositories and interfaces and I personally find the datamapper pattern plays much nicer with repositories. However if rolling your own datamapper pattern, while great, it comes with its own set of headaches that you will need to overcome.

I haven't personally used Doctrine (an ORM that implements the Datamapper pattern) but I've looked into it and it seems great. If your starting a project of this size I highly suggest looking into Doctrine before making your final decision.

Goodluck.

Do you mind sharing your data mapper implementation? I've been thinking about doing something similar but I haven't quite settled on the implementation details.

Last updated 2 years ago.
0

As I mentioned it is existing project in Zend Framework.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mahenn mahenn Joined 5 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.