3 ms·
One downside I see to this: It's not possible to statically determine which resource will respond to which URL. I suppose that is also a benefit (maybe some re
by sthatipamala 10y ago
One downside I see to this: It's not possible to statically determine which resource will respond to which URL.
I suppose that is also a benefit (maybe some resource can divert to another resource under heavy load/when its DB is unavailable). But quite frequently I want to answer this question with just the source code.
- peclink 10y ago> But quite frequently I want to answer this question with just the source code. Exactly. And that is also a benefit if routes are fetched dynamically from database, e.g. for content application, so your database is really content repository without too many levels of abstraction. As for source code, it's kinda silly to split your app to fixed «controllers» and «models», you should split it functionally for simple reuse. Most modern PHP frameworks are so unflexible that way (laravel is just terrible IMO).