Okay, soanytime I liketheSmith, Butit I'm sending a postrequesttocreate a todioAnytime I wanttoeditsomething, I'm sending a poorrequeststoeupdatetodiodelete, delete.
Andthenwhen I wanttoreadittodo, I'm gonnauseit.
Getrequest.
So I thinkoneofthehardestpartaboutlearninghowfalselikeapplicationworkisreallyunderstandingrestwapieyes.
So I'm gonnareallyoversimplifythedefinitions.
Butthisisreallyallyouneedtoknow.
Arrestable e p.
I usestransferprotocolinordertoruncreditoperations.
Sowhat I meanbythatisthatourtransferprotocolisgoingtobehtprequests.
Sowehaveaccessthepost, putlead, getin a lotmore, buttheseairtheformeonce.
Sothefirstthing I didwascreated a simpleperntoDiofolder, andyoucannamethiswhateveryouwant, butreally, thebigideaisthatit's goingtoholdourclientandserverfolder.
We'regoingtobuildand I'm goingtowreckconsists a lot.
Okay, so I'llseeinthenextsection, andwe'regonnacreate a databaseand a tablefor a postcries.
Allright, solet's getstartedbuildingourdatabaseintable, so I'm gonnafirstshowyouguysthisdiagramtogiveyouguys a bigoverviewofthecommandswe'regonnabeusing.
SoyoucouldseethisorpostCrestinsidethere.
There's gonnabe a lotofotherdatabasesliketododatabasesorhoteldatabase.
Now, insidethesedatabasis, we'regoingtohave a table.
Sointhiscase, I'm goingtocreate a tableor I'm gonnacreate a databasecalltodoDavies.
Wecalledthisthingandfinally, I'm justgoingtohavedescriptioninsidehere, and I'm goingtosay, uh, give a farcharof 2 55 whichmeans I'm setting a Maxcharacterof 255.
Sointhiscase, wehave a simpledescription, andthenwehavetospecifythevaluesofthat, andthisisgoingtolook a littlebitweirdatfirst, butwe'regonnahavesomethingcalleddollarsignone.
Sowhatisthis?
Thisisgoingtobe a placeholderoressentiallygoingtobe a variablethat's goingtospecifythisdescription.
Becauseifyouwanttodelete, updateorget a specifictoDio, wewillhavetoreferencesomethingthatdistinguishestherestoftheothertwoDUIs, which, inthiscase, todo I D.
Andthenyousee a primarykeyindicatesthatthistodo I D iswhatmakesitunique.
Andthenafterthat, I'm gonnaadd a deflects, becausethisthinggoes 100%.
I wantthemtobetogether.
Howyoucanseenowit's goingtobeputtogether.
Awesome.
Andit's still a littlebittight, so I guess I'm gonnahave a margintopfivethereaswell.
I'm justreallyabusingthismargin.
Topfive.
Yeah, itlooks a lotbetter.
Okay, sonowit's timeforustoreact.
If I thesame.
Youwanttostartcontainingourstatewithinthis.
So I amgoingtobeeasyreact, CoxSomebodyusenewstateandit's righthere.
I'm gonnaputonthetop, So I'm gonnastayconstant, and I'm goingtosay, Let's see, let's calldescriptionandthenwe'regonnasaysetdescriptionand I'm gonnasetittoyourstateandat a depotvalueoffemptystring.