IMHOs on the API

Martin Povolny mpovolny at redhat.com
Wed Jan 16 14:09:13 UTC 2013


While I am at the writing mood today I would like to say a couple of
things to the API. All these are IMHOs so let's pretend there's a IMHO
in front of each point.

i) the API implementation should start with what the consumer needs or
wants

1) the client would want to start with launching things (deployment)
2) next the client would want to check if the thing he wanted to run
actually runs
3) next the client may want something else like list all the stuff he
has

ii) the API needs a client to check it's actually good

I already wrote in a different thread that freezing the API before
verifying that it's actually usable by having at least one client is not
a good idea. In our project probably the first client is the CLI.

iii) the API structure need not copy the internal structure of the
project (being it the models or the controllers)

Actually the API should hide the implementation details as much as
possible and it should be structured in a way that is logical from the
consumer point of view.

iv) from the above it's obvious that having the API in the same
controllers that serve the WUI might not always be the best way to do
not only in terms of spaghetti popularity.

These are just IMHOs, but thanks for reading up to this point!

-- 
Martin Povolny <mpovolny at redhat.com>
tel. +420777714458


More information about the aeolus-devel mailing list