representational state transfer as far as i remember
juliaelman joined the channel
felix89 has quit
it's a way to design web services in which all operations against the service take the form of HTTP verbs (mostly GET and POST)
GET is never supposed to modify the state on the server; POST can modify the state
chrismed joined the channel
Dex26354 joined the channel
more fundamentally, it's a model for interaction that establishes a client and server; in between requests, the client and server are in a static state, but in between requests they're in transition
the model specifically forbids transitional states in between requests
mihasya has quit
luminous has left the channel
davisagli has quit
not sure if that helps...probably wildly inaccurate besides...
natea joined the channel
pzuraq joined the channel
shinobi_one has quit
davisagli joined the channel
margle has quit
Stierlitz has quit
Siecje
and why would you want it
EstebanVelour has quit
davisagli has quit
diphtherial
you'd want it because it significantly simplifies the interaction between entities in your model
for instance, if you know that only POST requests modify state on the server, you can cache GET responses and flush the cache when a POST makes the cache dirty
more fundamentally, you can use HTTP as a transport for any RESTful service, since HTTP supports the tenets of REST
(no assumption of persistent connections being the foremost one)
JB076 joined the channel
JB076 has quit
Siecje
but you can do that without REST?
redblacktree has quit
davisagli joined the channel
What is an example of *kwargs in a UrlConf to a view
what does it look like
diphtherial
Siecje: sure, you can do that without REST...REST is just a series of good practices to use when creating a web service, not an actual implementation
if you stick to REST, you'll avoid a lot of problems that you can end up with when designing your own protocols/services that employ your protocols
BiskitB0y has quit
zacharypch has quit
Siecje
diphtherial: thanks definetly one of those things that will hit me when I finally get it
diphtherial
:)
REST is unfortunately kind of a buzzword...suffice to say that if you write a service that uses HTTP as a transport protocol and obey the restrictions on GET and POST, then your service is likely RESTful
er...and to be totally rigid about that, technically HTTP is an application-level protocol, but here it's being used as a wrapper for web service calls, so it's a psuedo-transport protocol...
odinido joined the channel
dmclain joined the channel
i'm surprised nobody's assaulted me yet about my inaccurate terminology
vbabiy has quit
McMAGIC--Copy has quit
vbabiy joined the channel
jstump has quit
zacharypch joined the channel
FunkyBob
diphtherial: REST gots a bit further than that
(and tends to use more of the HTTP verbs, too)
McMAGIC--Copy joined the channel
lduros has quit
Siecje
what is an example of two things talking?
chrislkeller has quit
anthonydb joined the channel
Leeds joined the channel
hush joined the channel
diphtherial
Siecje: your browser is a good example; when you visit a webpage, your browser makes an HTTP GET request to the server, which then starts sending your browser the page data. when the page data is finished transferring, the server effectively terminates the connection, and your client is considered idle (and the client's state considered complete) until you perform some other action.
Dex26354 has quit
(in practice, almost all servers maintain a keepalive connection to improve latency, but this doesn't constitute a persistent connection like it would using some other protocol, like FTP)
FunkyBob
diphtherial: psst... "data" is a plural... that should be "when the data _are_ finished"
diphtherial
the idea is that outside of a request-response cycle, both sides of the exchange are considered "complete"
heh, right, thank you
when the datum is finished
BiskitB0y joined the channel
i wonder how to relieve myself of all of these gaping holes in my knowledge
i feel like i went too far too fast while learning, and thus have a very incomplete vision of a wide swath of topic
*topics
FunkyBob
have a driving thirst for knowlege and understanding
diphtherial
i'm good at breadth, not so much depth
i think i have that, or at least did before life bogged me down
geaden joined the channel
Back2Basics_ joined the channel
rideh_ joined the channel
chachan has quit
Siecje
but we use django to do all that?
FunkyBob
I think my next big learning drive will be denormalised views in PG
Siecje: Django generates content for HTTP requests
mattmcc
Mmm, materialized views. Tasty.
rideh has quit
mihow has quit
Siecje
What is an example of *kwargs in a UrlConf to a view what does it look like
rideh_ is now known as rideh
sserrano44 joined the channel
rideh_ joined the channel
mattmcc
Siecje: def myview(request, **kwargs) ?
bytephilia has quit
rideh has quit
rideh_ is now known as rideh
cellofellow joined the channel
KingdomSprite has quit
FunkyBob
Siecje: in the url pattern, it's either a named regex group, or a dict at the 3rd position in the pattern
(or both)
Siecje
and the dict is static?
will you ever have *args?
FunkyBob
sure.. if you have unnamed groups in your regex
Goopyo has quit
Siecje
why not put the dict in the 3rd position in the view?
mattmcc
The dict in the urlpattern populates view keyword arguments.
riley526 has quit
Zeioth has quit
FunkyBob
Siecje: the url pattern is there to decide (a) which view to call, and (b) what to pass it