The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

API Advice

Adam's Avatar

Adam

15 May, 2012 12:20 PM

Hi there,

I basically wanted to some advice on an application I'm building. Basically I'm trying to structure my application as an API, the API will be used internally and by any other external applications.

An example call:

/users/get_user_by_id/1

The output of these requests will be JSON encoded. This is fine for external applications, but for internal use is there any point in JSON encoding the output? instead of simply returning the result. I'm trying to think of the performance impact this may have for internal calls. Or would it make sense to use JSON both internally and externally?

If it only makes sense to encode external API calls how would I differentiate between internal / external calls.

Any advice would be appreciated.

Many thanks,
Adam

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac