vaadin / vaadin-connect

A Vaadin Labs experiment with a secure stateless communication framework
https://vaadin.com/labs/vaadin-connect
Apache License 2.0
18 stars 5 forks source link

I want to mark service methods as mutating or non-mutating the data #399

Open vlukashov opened 5 years ago

vlukashov commented 5 years ago

REST allows to indicate the intention of API methods by using HTTP verbs: non-mutating the data (GET), mutating the data (POST), etc

Vaadin Connect does not allow such indicators at all. It would be awesome to have something like that so that I could communicate my intentions more clearly.

Legioth commented 5 years ago

It would be awesome to have something like that so that I could communicate my intentions more clearly.

Who would be the recipient of those communicated intentions? Is there any similar communication of intentions for similar methods that just don't happen to send a network request?

I think this confuses "REST as a contract" with "REST as a format for exchanging data".

vlukashov commented 5 years ago

Who would be the recipient of those communicated intentions?

Another developer looking the API methods. Either in the source code or in the API browser.

Is there any similar communication of intentions for similar methods that just don't happen to send a network request?

Hard to say. But when Connect is compared to plain REST what's relevant is whether or not you can do with Connect what you can do with REST.