rest - What is RESTful application? -


there has been lot of hype on rest last few years, , i've tried embrace principle , understand it's benefits. things rest still elude me, though. i'll try concise , point:

  • can web application considered restful? benefits of this? can understand (to point) advantages of restful service, used many clients, gained using rest principles when developing application interface consumed html/js frontend?
  • rest mandates use of verbs map crud operations , server responds representations in turn put client in new state. imply actions on resource must done through modification/creation/deletion of , possibly many other related resources? "atomicity" of such operations (i.e. transactions)?
  • rest compliant service supposed self-descriptive (through hateoas principle), lack of metadata makes impossible client e.g. create resource without knowing fields (and types) mandatory. information must still provided out-of-band. there i'm missing here?

i come more questions, enough if clarify these points me.

some notes questions:

1) if web application single page application simplest way communicate server if rest service.

for traditional web application think better "controllers" communicate service layer using dependency injection.

3) yes, of course client needs know format of data receiving. afaik, rest not give constrain how metadata has defined or transmitted.

the hateoas principle refers more discovering of related resources given one. there exists different conventions express relations, see example: http://stateless.co/hal_specification.html

2) every rest action must atomic. if need kind of long operation, usual create resource describes operation. state of operation retrieved resource, , whatever want operation (i.e. cancel it) interacting resource. see example of here.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -