viur-framework/viur-core

Consistent json/xml/msgpack rendering protocol

Opened this issue · 0 comments

This issue is a follow-up on #1070.

We should provide a consistent result for all functions.

Yes. A well defined, generic and sophisticated protocol should be created to fulfill any needs on a modern REST-like system.

In the current protocol, only the upper 7 states are designed well. The rest is stupid junk which needs to be redefined and refactored.

This issue should define a new, standardized concept. It should relate closely together with the Action-Skel paradigm.

Current protocol (JSON)

  • Well defined
    • view
    • preview
    • list
    • add
    • addSuccess
    • edit
    • editSuccess
  • Bad defined
    • deleteSuccess => "OKAY"
      • delete ... okay this is not defined, lol (would be with Action Skels)
    • listRootNodes => ??? sense??? Yes, it is used and has a sense, but why?
    • login => renders edit-skel??
    • loginChoices => list of methods
    • loginSucceeded => "OKAY"
    • logoutSuccess => "OKAY"
    • verifySuccess => "OKAY"
    • verifyFailed => "FAILED"
    • passwdRecoverInfo => Returns either an edit-skel or a msg?
    • passwdRecover => returns edit
    • second_factor_add => Returns {otp_uri: "xyz"}
    • second_factor_add_success => "OKAY"
    • second_factor_choice => list of second factors?

#772 (MsgPack renderer) relates to this issue.