Aryeh Gregor schreef:
On Fri, Aug 22, 2008 at 4:40 AM, Roan Kattouw roan.kattouw@home.nl wrote:
Using the API internally is useful in some cases, yes. If you're gonna run a complex query the API happens to support, you're usually better off using the API, to prevent code duplication.
So why does the API have any logic to do anything except translate the HTTP query into backend functions and display the results? If you have a lot of internal logic anywhere, that other callers would like to use, I suspect that would be best moved into the actual classes somehow. It's the same as with the human UI: you shouldn't (ideally) be mixing business logic with logic for a specific output type.
That's probably laziness caused by the fact that the API implementation predates the code that uses FauxRequest.
Roan Kattouw (Catrope)