MV Whatever Hypertext as the engine of Application State - sgml/signature GitHub Wiki

HATEOAS

               +-------------------------------+
               |  Initial GET request to API   |
               |  e.g. GET https://api.example |
               +-------------------------------+
                            |
                            v
             +----------------------------------+
             | Response contains _links object  |
             | e.g.                             |
             | "_links": {                      |
             |   "self": { "href": "/resource" }|
             |   "next": { "href": "/page/2" }  |
             |   "related": { "href": "/other" }|
             | }                                |
             +----------------------------------+
                            |
      +---------------------+----------------------+
      |                     |                      |
      v                     v                      v
GET /resource        GET /page/2            GET /other

      |                     |                      |
      v                     v                      v
More _links         More _links            More _links or content
to follow           to follow              to follow

MVC

MVVM

Constructors vs Getters and Setters

Why should I create a method just to hold a one line function? (+Constructor)

How painful is it going to be to refactor two, three, four, five or more getters/setters vs one constructor?(+Constructor)

How hard is it going to be to document two, three, four, five or more getters/setters vs one constructor?(+Constructor)

Is there going to be a default value which will be documented? (+Constructor)

Do I like documentation and expect people to read? (+Constructor)

Will the initial value be undefined?(+Setter)

Is there a set of equivalent forms (shorthand, international, nicknames) which will all be acceptable as syntatically correct for required arguments? (+Setter)

Is there a set of optional arguments with default values? (+Setter)

Is there a common need to stringify and parse the initial value? (+Setter)

Do I dislike documentation and expect people to experiment? (+Setter)