Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx

上传人:b****1 文档编号:13174218 上传时间:2022-10-07 格式:DOCX 页数:54 大小:788.52KB
下载 相关 举报
Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx_第1页
第1页 / 共54页
Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx_第2页
第2页 / 共54页
Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx_第3页
第3页 / 共54页
Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx_第4页
第4页 / 共54页
Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx_第5页
第5页 / 共54页
点击查看更多>>
下载资源
资源描述

Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx

《Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx》由会员分享,可在线阅读,更多相关《Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx(54页珍藏版)》请在冰豆网上搜索。

Django框架介绍 中英文双语计算机专业毕业设计外文文献翻译成品(最新)Word文件下载.docx

一辈子也就一次的事!

外文标题:

IntroductiontotheDjangoFramework

外文作者:

DanielRubio

文献出处:

DanielRubio.IntroductiontotheDjangoFramework[M].BeginningDjango.2017:

1-29(如觉得年份太老,可改为近2年,毕竟很多毕业生都这样做)

英文8701单词,40127字符(字符就是印刷符),中文12987汉字。

TheDjangoframeworkstartedin2003,asaprojectdonebyAdrianHolovatyandSimonWillisonattheJournal-WorldnewspaperinLawrence,Kansas,intheUnitedStates.In2005,HolovatyandWillisonreleasedthefirstpublicversionoftheframework,namingitaftertheBelgian-FrenchguitaristDjangoReinhardt.

Fastforwardto2017–theDjangoframeworknowoperatesundertheguidanceoftheDjangoSoftwareFoundation(DSF),theframeworkcorehasover1000contributorswithmorethan15releaseversions,andthereareover3000packagesspecificallydesignedtoworkwiththeDjangoframework.1

TheDjangoframeworkhasremainedtruetoitsoriginsasaModel-View-Controller(MVC)server-sideframeworkdesignedtooperatewithrelationaldatabases.Nevertheless,Djangohasstayeduptodatewithmostwebdevelopmenttendencies–viathird-partypackages–tooperatealongsidetechnologieslikenon-relationaldatabases(NoSQL),real-timeInternetcommunication,andmodernJavaScriptpractices.Allthistothepoint,theDjangoframeworkisnowthewebdevelopmentframeworkofchoiceforawidearrayoforganizations,includingthephotosharingsitesInstagram2andPinterest3;

thePublicBroadcastingSystem(PBS)4;

intheUnitedStates,NationalGeographic5;

andwiththehelpofthisbook,yourorganization!

Inthischapteryou’lllearnabouttheDjangoframeworkdesignprinciples,whicharekeytounderstandingtheday-to-dayaspectsofworkingwiththeDjangoframework.Next,you’lllearnhowtoinstallDjangoinvariousways:

asatar.gzfile,withpip,usinggit,andwithvirtualenv.

OnceyouinstalltheDjangoframework,you’lllearnhowtostartaDjangoprojectandhowtosetitupwitharelationaldatabase.Next,you’lllearnaboutthecorebuildingblocksintheDjangoframework–urls,templates,andapps–andhowtheyworkwithoneanothertosetupcontent.Finally,you’lllearnhowtosetuptheDjangoadminsite,whichisaweb-basedinterfacedesignedtoaccesstherelationaldatabaseconnectedtoaDjangoproject.

DjangoFrameworkDesignPrinciples

Ifyouworklongenoughinwebdevelopment,you’lleventuallycometotheconclusionthatyoucanproducethesameresultswithjustaboutanywebframeworkandprogramminglanguage.Butwhileyoucan,infact,produceidenticalresults,whatwillvarydrasticallyisthetimeyouspendcreatingasolution:

thetimecreatingaprototype,thetimeaddingnewfeatures,thetimedoingtesting,thetimedoingdebugging,andthetimedeployingtoscale,amongotherthings.

Inthissense,theDjangoframeworkusesasetofdesignprinciplesthatproducesoneofthemostproductivewebdevelopmentprocessescomparedtomanyotherwebframeworks.Note,I’mnotsayingDjangoisasilverbullet(e.g.,thebestatprototyping,themostscalable);

I’msayingthatattheendoftheday,theDjangoframeworkincorporatesasetofdesignprinciplesandtrade-offsthatmakeitoneofthemostproductiveframeworksforbuildingthefeaturesneededbymostmediumtolargewebapplications.Now,whileyoumightthinkI’mbiased–afterallI’mwritinganentirebookaboutthetopic–I’lllayoutthesedesignprinciplesfirst,soyoucangainabetterunderstandingofwhatgivestheDjangoframeworkthisedge.

Don’tRepeatYourself(DRY)Principle

Repetitionmightbegoodtoemphasizeapoint,butwhenitcomestowebdevelopment,itjustleadstoadditionalandtime-consumingwork.Infact,theverynatureofwebdevelopment,whichoperatesacrossmultipletiersinteractingwithoneanother(e.g.,HTMLtemplates,businesslogicmethods,anddatabases),lendsitselftorepetition.

TheDjangoframeworkreallytriestoforceyounottorepeatyourself,solet’sseehowDjangoenforcesnotrepeatingyourselfandwhythisisagoodthing.Let’ssayyouwanttobuildacoffeehouseapplicationtopublishinformationaboutstoresandalsohaveacontactformforcustomers.Thefirstthingyou’llneedtodoisdeterminewhatkindofinformationisrequiredforstoresandthecontactform.Figure1-1illustratesamock-upoftwoDjangomodelsforeachoftheseentities.

Figure1-1.Djangomodelsforstoreandcontactentities

NoticehowtheDjangomodelsinFigure1-1eachhavedifferentfieldnamesandadatatypetorestrictvalues.Forexample,thestatementname=models.CharField(max_length=30)tellsDjangoastorenameshouldhaveamaximumof30characters,whilethestatementemail=models.EmailField()tellsDjangothecontactentityshouldcontainavalidemailvalue

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 高中教育

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1