mozumder / HTML6

An HTML6 proposal for single-page apps without Javascript.
85 stars 7 forks source link

How to define API responses? #2

Open mozumder opened 9 years ago

mozumder commented 9 years ago

Should we have them as part of the model:

 <MODEL class="rsp" type="response">

or define them separately:

 <RESPONSE class="rep">

Basically should they be persistent model objects or transient information?

AndySky21 commented 9 years ago

The model layer is not necessary to define data as name/value couples, it's usually done on the data source, be it JSON or DB. I guess the model itself, as not containing any data, is meant to manage input information (on a type basis) and to elaborate it, so it should be <model type="response"> IMO.