Comments (2)
Ok. 2 things here:
-
You should indeed avoid using
DaoFactory
as much as possible. When a controller or a service depends on DaoFactory, it means it depends potentially on any table in the data model. If you only inject the required DAOs, you know (just by looking at the constructor's signature) what tables are used. So it's a good practice to depend on the minimum possible dependencies -
Regarding DAOFactory performance, it was indeed bad until TDBM 5.1 because the DaoFactory had to instantiate all the DAOs. In TDBM 5.1, the DAOs are instantiated on the fly from the container. It means that:
- you must inject the container in the DaoFactory.
- you no longer have performance problems.
So starting with TDBM 5.1, you can use the DaoFactory without any performance impact... but I would still consider it a bad practice :)
from tdbm.
Got it ! Thanks :D !
from tdbm.
Related Issues (20)
- Index not pass when making a query to database HOT 1
- Add a default guard on data too long for column sql error
- Multiple column FKs HOT 2
- Make sure TDBM uses tdbm.lock at runtime to access the schema
- Working with generated columns HOT 1
- Reminder: Switch back to ^1.0.5 of brain-diminished/schema-version-control when it is tagged
- TDMService event listening system
- Bug when generating Dao from a database with uppercase table names HOT 1
- Not install width PHP 8
- UniqueEntity Annotation
- Lines duplicated when ordering on a n-n join table using find() method in the DAO HOT 2
- Update deprecated use of ZendFramework
- 5.2: `ResultIterator::getIterator()` `@method` declaration is wrong
- Enhancement: Merge multiple ResultIterator objects into one
- ManyToManyRelationshipPathDescriptor::getPivotFrom method doesn't escape the name of the "FROM" table
- Integration with Slim framework HOT 1
- Self referencing ManyToMany issue
- Fatal error while generating entities on php 8.1 HOT 1
- PHP's interface typing changes
- Your requirements could not be resolved to an installable set of packages. (5.3.12) HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tdbm.