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.
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.
As I mentioned it is existing project in Zend Framework.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community