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

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

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

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

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

此文档是毕业设计外文翻译成品(含英文原文+中文翻译),无需调整复杂的格式!

下载之后直接可用,方便快捷!

本文价格不贵,也就几十块钱!

一辈子也就一次的事!

外文标题:

IntroductiontotheDjangoFramework

外文作者:

DanielRubio

文献出处:

DanielRubio.IntroductiontotheDjangoFramework[M].BeginningDjango.2017:

1-29

英文8701单词,40127字符,中文12987汉字。

IntroductiontotheDjangoFramework

DanielRubio

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-1illustratesa

mock-upoftwoDjangomodelsforeachoftheseentities.

Figure1-1.Djangomodelsforstoreandcontactentities

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

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

当前位置:首页 > 初中教育 > 理化生

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

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