资源描述:
《Migrating a native Erlang interface to RESTful Mochiweb.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、21stCenturyCodeWorks:MigratinganativeErlanginterfacetoR...http://21ccw.blogspot.com/2008/06/migrating-native-erlang-inte...分享檢舉濫用情形下一個網誌»建立網誌登入21stCenturyCodeWorksTuesday,17June2008AboutmeandmyprojectsMigratinganativeErlanginterfacetoRESTfulMochiweb(withabitofTDD)BENJAM
2、INNORTIERLONDON,UNITEDKINGDOMThetitleisabitofamouthful,butitdoescontaininessencewhatIwillwww.1011ltd.com@bjnortiershowyou:Viewmycompleteprofile1.IwillconvertanexistingnativeerlangCRUDinterface(asimpleclient-server)touseaHTTPlayer.ZuhlkeLondonBlogs2.TheHTTPcallswillbeRES
3、Tful.3.IwillbeusingMochiweb.HiringinLondon:Leadand4.IwillshowyouhowtodoabitofTest-Driven-Development(TDD)forthisPrincipleConsultants...-西元exerciseusingEUnit.2011年10月04日-keithbAsanintroduction,IsuggestyoureadSteveVinoski's"RESTfulServiceswithAgile20x20-西元2011年09月Erlangan
4、dYaws",and"ARESTfulwebservicedemoinyaws"byNick29日-Gerakines.Theyarebothexcellentposts,andNick'sposthasalotofinterestingdetails,includingsomeOTPgoodness.AlsocheckoutDaryn'sFunwithRobots,ArduinoandpostsforaRailstwistonthistopic.Android-西元2011年09月25日-ImmoHünekeIwillNOTbesh
5、owingmucherrorhandling,simplyreturninga501responseTheBufferingLawobservediniftheRESTUrlhassomemistakeinit.SoftwareEngineering-西元2011年08月19日-Thisistheplan:GeneratetestdataforJava1.WewillstartwithaworkingsetoftestsforanativeCRUDinterface.Iwilldevelopmenteasily-西元notshowyo
6、utheactualimplementation,butitissimpleenoughtodoyourselfusingaprocessdictionary.2011年08月11日-Immo2.IwillshowaverysimpleRESTinterfacewithMochiweb,thatjustreturnsHüneketherequestmethodtypeasaplaintextstring.ThiswillbetestedusingInets,thenativeErlangOTPinternetmodule.3.Wewi
7、llwriteatranslatorstoandfromplaintextandnativeerlangtermsBooksworthReading(again,unittested).4.WewillcombinealltheseintotheRESTinterface,testedusingInetsagain.Right,hereistheunittestsfortheCRUDinterface:crud_test_()->{setup,fun()->start()end,fun(_)->stop()end,fun(_)->[?
8、_assert(ok==create(#person{id=1})),?_assert(already_exists==create(#person{id=1})),1/7西元2011年10月26日10:0021stCe