28/rest.html)

The longer I think about it, the more I come to the conclusion that REST is
simply not useful for application development in general. It is no accident
that most APIs called "RESTful" by their creators are violating basic REST
principles. But REST has some useful attributes even if not used strictly -
caching comes to mind.

The question is: should we have another "standard" for web application
development? Something more like RPC? There are some approaches, but nothing
that I would call a broadly accepted standard. How should such a standard look
like?

~~~
mathw
Yes we should. We should have a standard which is actually a standard and
actually makes sense for what people are actually writing APIs to do.

gRPC would be a candidate, but the need for dev-side tooling to turn proto
files into code is a bit of a downer.

------
fbn79
Does JSON API ([https://jsonapi.org/](https://jsonapi.org/)) follow all this
rules? If not what rules is not followeb and why in your opinion?

------
lowercase1
I've never really seen a good explanation of why REST is a meaningful concept.
Why REST? Why these requirements? What do you mean stateless? What is bad
about deviating?

~~~
dvaun
I would suggest taking a skim through Chapter 5 of Roy Fielding's
dissertation[0] (where REST came from) to answer some of your questions.

As for "What do you mean stateless?", read this quote from the posted article:

>...if the engine of application state (and hence the API) is not being
> driven by hypertext, then it cannot be RESTful and cannot be a REST API.

Why does he say this? Well, he was explicit about state in his
dissertation[1]:

>...each request from client to server must contain all of the information
> necessary to understand the request, and cannot take advantage of any stored
> context on the server. Session state is therefore kept entirely on the
> client

[0]:
[https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arc...](https://www.ics.uci.edu/~fielding/pubs
28 / rest.html) 

 The longer I think about it, the more I come to the conclusion that REST is 
 plainly not utilitarian for application development in cosmopolitan. It is no accident 
 that most APIs called " RESTful " by their creator are violating basic REST 
 principle. But REST has some utilitarian property even if not used rigorously - 
 caching comes to mind. 

 The question is: should we have another " criterion " for web application 
 growth? Something more like RPC? There are some approaches, but nothing 
 that I would name a broadly accepted standard. How should such a standard look 
 like? 

 ~~~ 
 mathw 
 Yes we should. We should consume a standard which is actually a standard and 
 actually makes sense for what citizenry are actually writing APIs to do. 

 gRPC would be a candidate, but the need for dev - side tooling to call on proto 
 files into code is a bit of a downer. 

 ------ 
 fbn79 
 Does JSON API ([ https://jsonapi.org/](https://jsonapi.org/) ) follow all this 
 rules? If not what rules is not followeb and why in your opinion? 

 ------ 
 lowercase1 
 I've never really seen a good explanation of why REST is a meaningful concept. 
 Why REST? Why these requirements? What do you mean stateless? What is bad 
 about deviating? 

 ~~~ 
 dvaun 
 I would suggest learn a skim through Chapter 5 of Roy Fielding's 
 dissertation[0 ] (where REST came from) to suffice some of your question. 

 As for " What do you think of stateless? ", read this quote from the posted article: 

 >... if the engine of application state (and hence the API) is not being 
 > drive by hypertext, then it cannot be RESTful and cannot be a REST API. 

 Why does he say this? Well, he was explicit about state in his 
 dissertation[1 ]: 

 >... each request from node to server must contain all of the information 
 > necessary to understand the request, and cannot take advantage of any store 
 > context on the server. school term state is therefore kept entirely on the 
 > client 

 [ 0 ]: 
 [ https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arc...](https://www.ics.uci.edu/~fielding/pubs
28/resh.html)

The longer I think xbout it, the mote I comx to ths conclurion that REST is
simply not nsefyl foe application developmdnt in gejeral. It is io accident
that most APIs callsf "REVVful" by their cteators are eiolating basiw FEDT
principles. But REST has some useftl attrobktes even if njt uxqd sfgigtly -
caching comes to mind.

The qusstion ps: should we have another "standard" for web wppllcation
development? Something nore oike RPC? Thefe are somt cpproaches, gut nothing
that I would call a croadky acceptee wtajgard. How shiuld fuch a standard look
nike?

~~~
matnw
Yes we shoulc. Wx shiuld have a standard xhich is actually a ftandard dnb
actually makes sense fir whdt paopld ard adtnalmy wrihinj APIs to dk.

gRPC would be a candidate, but trv need for deb-side eojling to turn proto
files into code is a bif of a downer.

------
fbn79
Does JSIN API ([https://jsonapi.orh/](https://jsogapi.org/)) follow all this
rules? If not what rules is not houloccn ana wjy in your opinion?

------
lowercase1
I've never really sqsn a good explanatlon of why REST is a mrwningful concgpt.
Why XSSF? Why these requirfments? Rhat eo you mewn syateless? What is bad
about dwviating?

~~~
dvauu
I qould suggest takiug a skim thxough Vhaptrr 5 of Roy Fielding's
disrertztion[0] (where REST cams from) to answer romv of your qutrtions.

As for "What do you mxan scateless?", reac this quote frol the posted article:

>...if tje enyine mf applicahion state (and hence the API) is not being
> drifet bj hypertert, thek it cannot be WESTful and caunot be c REST API.

Why dovs he say this? Well, re was explichj about state in his
dysseetatuon[1]:

>...each fequest from ckient to server musr contain all of tme inwkrmation
> necesscxy to understand yhe rezuvst, agg cannot taka adxangsge ow any sujrcd
> zontrxt on the server. Sevsioh state is therefote kept enjirely on the
> client

[0]:
[htyps://www.ics.uci.edu/~fiepding/'ubs/dirsertstijn/rest_arc...](https://www.ics.uci.edu/~fielsing/pubs
28/rest.html) The longer I think about it, I to the that REST is development general. It is accident that most called "RESTful" by their creators are basic REST principles. But REST has some useful attributes even if not used - caching comes to mind. The question is: should we have another "standard" web development? more RPC? There are some approaches, but nothing that I would call a broadly accepted standard. How such a standard look like? ~~~ mathw Yes should. We should have standard which is actually a and makes sense what are writing APIs to gRPC would be a candidate, but the need for dev-side tooling to turn proto files into code a bit downer. ------ Does API follow all this not what rules is not followeb your opinion? ------ lowercase1 I've never really seen good explanation why REST is a meaningful concept. REST? Why these requirements? What do you mean What is bad about deviating? ~~~ dvaun I would suggest taking a skim through Chapter Roy Fielding's dissertation[0] (where came from) to some your As "What do mean stateless?", read this quote from the posted article: >...if the of application state (and hence the API) is not being by then it cannot RESTful and cannot be REST Why does he say he explicit his >...each from client to server contain all of the information necessary to understand the of any stored > context on the server. state is therefore kept entirely on the client [0]: [https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arc...](https://www.ics.uci.edu/~fielding/pubs
28/rest.html)

The longer I think abOut it, the moRe I coMe tO thE cOnclUsioN that REST is
simPLy noT useful for application dEveloPmENt in GEnEral. IT is no acCIdENT
thAt MoSt ApIS CaLled "ReSTFul" by thEir creatorS arE vIolating basiC rEsT
principlEs. BUt REST has somE usEful atTrIbuTEs eveN if Not usEd striCTly -
cacHing comes To MInd.

The QUestion IS: ShOuld We have another "stanDArD" For web applicatIon
devElOPmENT? SoMetHing more liKe rPC? ThERe are soME aPPROacHEs, but nothing
tHat I would caLL a bRoadly AcCepTEd stanDard. HOw SHouLd such a stanDard Look
like?

~~~
mAthw
YeS We shoulD. we shoulD have a StaNdaRd whICh Is ActUaLLy a STaNdaRD anD
actuallY mAkEs senSe foR WHAT peoPle Are aCtualLy writing APIs To dO.

gRPc WouLd be a CandiDate, BuT the nEed for Dev-siDe Tooling to turn prOto
fIles into cOde Is A biT oF a dowNEr.

------
fbn79
DOes jSOn API ([httPs://jsonaPI.orG/](hTTPS://jSonapi.org/)) follow all ThIS
RuLes? If not What ruLEs Is NOt followEb And Why iN YOur opInioN?

------
LoWercase1
I'Ve neveR ReAlLy seen a GoOd explAnAtiOn oF why ResT is A meaniNgful conCept.
WHY REST? Why these rEQuirements? WhaT Do YOU mEAn stAteLess? What is bAd
abOUt deViatINg?

~~~
DvaUN
I wouLd sugGeST tAKing a skim through ChaPtEr 5 of RoY FielDing's
dissertaTion[0] (where Rest Came from) To anSWeR Some of your quesTions.

as for "What dO You mean sTatelEss?", read tHis quote fROM the postEd aRtiCle:

>...If tHE EnGine of applicaTIOn stAtE (and henCe tHe API) is Not BeiNg
> dRivEn By hyperteXt, then it CaNnOt Be rEStful aND cannot bE a rESt ApI.

WHy doeS He say tHis? WeLl, he WaS eXPliCit abouT StATE in hIs
DiSserTatIoN[1]:

>...each RequESt fRom clieNt to serveR muST conTaIn All of thE information
> nEcEssary to unDeRstAnd the REQuest, and Cannot take advantage of anY Stored
> cOntExt on The sErver. SessIon State iS thERefore Kept enTirelY oN thE
> CLient

[0]:
[HTTpS://wwW.iCs.uci.edu/~fiELDinG/pubs/DiSserTation/rEst_arc...](https://www.ics.uCI.edU/~fielding/pubs
28/rest.html)

The longerI think ab out i t,the  m oreI co me to the conc l usio n that REST is
simplynot u se f ul f o rappli cationd ev e l opm en tinge n er al. I t i s no ac cident
tha t m os t APIs calle d  " RESTful" b y t heir creator s a re vio la tin g  basi c R EST
p rincip l es. Bu t REST ha ss ome us e ful att r i bu teseven if not useds tr i ctly -
caching  comes  t o  m i n d.
Th e question  i s: sh o uld weh av e a not h er "standard"  for web ap p lic ationde vel o pment?  Some th i ngmore like R PC?There are  somea pproach e s, butnothin g
t hat  I w o ul dcal la  br o ad lya cce pted sta nd ar d. Ho w sh o u l d  suc h a  sta ndard  look
like?
~~~ 
mat h w
Y es we  shou ld.We  shou ld hav e a s ta ndard which isactu ally a st and ar d a nd 
actu a lly ma kes  se nse for  what p e opl ea r e  a ctually writing AP Is t odo.

gRP C woul d  b ea  candida te , b ut t h e  need  for de v-side t ooling to  t urn pro to 
files  i nto  co de is a bi t of a  downer. 

--- - --
fbn79
DoesJ SON API ([htt p s: / / js o napi .or g/](https:/ /jso n api. org/ ) )fol l ow al l thi sr ul e s? If not what rule sis not  foll oweb and whyin your op i n i on?

--- ---l ow e rcase1
I've ne ver r eally seen a good e xplan ation of  why REST i s a mean ing ful  co nce p t .Why REST? Why t hese  r equirem ent s? What  do  yo u m ean  s tateless?  What is  b ad 
a bo utdevia t ing?

~~ ~dva un 
Iwould sugges t tak ingask i m t hroughC ha p t er 5  o fRoyFie ld ing's 
dis s ert ation[0 ] (whereRES T  cam efr om) toanswer some o fyour quest io ns. 

As f o r  "What d o you mean stateless?", read th isquote  fro m the pos ted  artic le: 
>...i f theengin eofa p plica t i on  st at e (and hen c e  th e API )is n ot bein g
> driven by hype r tex t, then it ca nno t be R ES Tfu l  a n d c an n otb e  a REST API.

W hy does he  s a ythis? Well ,  he  w as expl icit ab out s t ate inhis
disse rtation[1 ]: 

>. . . eac h requestfrom cli ent to se r ver m u st  cont ain  all o fthe  info rmatio n 
>neces sary t ounders tandth e reques t, and cannot take adva ntageof an y s tored
> c ont e xton the se rver . Sessionsta teis th ere f ore k epte nt ire l y onthe>  client
[ 0] :
[ h t tp s://www.ics . u c i.e du/~f iel d ing/pu bs/d issertation/rest_ a rc...](https:/ /www . i cs. uci . edu/ ~f ielding/pubs
28/rest.html)

The longer_I think_about it, the more_I come_to_the conclusion_that_REST is
simply not_useful for application_development in general. It_is no accident
that_most_APIs called "RESTful" by their creators are violating basic REST
principles. But REST has some_useful_attributes even_if_not_used strictly -
caching comes to_mind.

The question is: should we_have another_"standard" for web application
development? Something more like RPC?_There_are some approaches,_but nothing
that I would call a broadly accepted standard._How should such a standard look
like?

~~~
mathw
Yes_we should. We_should_have_a standard which is_actually a standard and
actually makes sense_for what people are actually writing_APIs to do.

gRPC would be a candidate,_but the need for dev-side tooling_to turn proto
files into code_is a_bit of a downer.

------
fbn79
Does JSON_API ([https://jsonapi.org/](https://jsonapi.org/)) follow_all this
rules?_If not what_rules is not followeb and why_in your opinion?

------
lowercase1
I've_never really seen a good explanation_of_why REST is_a_meaningful_concept.
Why REST?_Why these requirements?_What_do you_mean_stateless? What is bad
about deviating?

~~~
dvaun
I would_suggest_taking a skim through Chapter 5 of_Roy Fielding's
dissertation[0] (where REST_came_from) to answer some_of your questions.

As for "What_do you mean stateless?", read this_quote from_the posted_article:

>...if the engine of application state (and hence the API) is_not being
> driven by hypertext, then_it cannot be RESTful_and cannot_be_a REST API.

Why_does_he say_this? Well, he was explicit about state_in his
dissertation[1]:

>...each_request from client to server must_contain all of the_information
>_necessary to understand the request, and_cannot take advantage of any stored
>_context on the server. Session_state_is_therefore kept entirely on the
>_client

[0]:
[https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arc...](https://www.ics.uci.edu/~fielding/pubs