0字左右外文翻译.docx

上传人:b****1 文档编号:1719377 上传时间:2022-10-23 格式:DOCX 页数:16 大小:31.06KB
下载 相关 举报
0字左右外文翻译.docx_第1页
第1页 / 共16页
0字左右外文翻译.docx_第2页
第2页 / 共16页
0字左右外文翻译.docx_第3页
第3页 / 共16页
0字左右外文翻译.docx_第4页
第4页 / 共16页
0字左右外文翻译.docx_第5页
第5页 / 共16页
点击查看更多>>
下载资源
资源描述

0字左右外文翻译.docx

《0字左右外文翻译.docx》由会员分享,可在线阅读,更多相关《0字左右外文翻译.docx(16页珍藏版)》请在冰豆网上搜索。

0字左右外文翻译.docx

0字左右外文翻译

xxxx大学xxx学院

毕业设计(论文)外文文献翻译

 

系部

xxxx

专业

xxxx

学生姓名

xxxx

学号

xxxx

指导教师

xxxx

职称

xxxx

 

2013年3月

IntroducingtheSpringFramework

TheSpringFramework:

apopularopensourceapplicationframeworkthataddressesmanyoftheissuesoutlinedinthisbook.ThischapterwillintroducethebasicideasofSpringanddis-cussthecentral“beanfactory”lightweightInversion-of-Control(IoC)containerindetail.

Springmakesitparticularlyeasytoimplementlightweight,yetextensible,J2EEarchi-tectures.Itprovidesanout-of-the-boximplementationofthefundamentalarchitecturalbuildingblockswerecommend.Springprovidesaconsistentwayofstructuringyourapplications,andprovidesnumerousmiddletierfeaturesthatcanmakeJ2EEdevelopmentsignificantlyeasierandmoreflexiblethanintraditionalapproaches.

ThebasicmotivationsforSpringare:

Toaddressareasnotwellservedbyotherframeworks.TherearenumerousgoodsolutionstospecificareasofJ2EEinfrastructure:

webframeworks,persistencesolutions,remotingtools,andsoon.However,integratingthesetoolsintoacomprehensivearchitecturecaninvolvesignificanteffort,andcanbecomeaburden.Springaimstoprovideanend-to-endsolution,integratingspe-cializedframeworksintoacoherentoverallinfrastructure.Springalsoaddressessomeareasthatotherframeworksdon’t.Forexample,fewframeworksaddressgenerictransactionmanagement,dataaccessobjectimplementation,andgluingallthosethingstogetherintoanapplication,whilestillallowingforbest-of-breedchoiceineacharea.HencewetermSpringanapplicationframework,ratherthanawebframework,IoCorAOPframework,orevenmiddletierframework.

Toallowforeasyadoption.Aframeworkshouldbecleanlylayered,allowingtheuseofindi-vidualfeatureswithoutimposingawholeworldviewontheapplication.ManySpringfeatures,suchastheJDBCabstractionlayerorHibernateintegration,canbeusedinalibrarystyleoraspartoftheSpringend-to-endsolution.

Todelivereaseofuse.Aswe’venoted,J2EEoutoftheboxisrelativelyhardtousetosolvemanycommonproblems.Agoodinfrastructureframeworkshouldmakesimpletaskssimpletoachieve,withoutforcingtradeoffsforfuturecomplexrequirements(likedistributedtransactions)ontheapplicationdeveloper.ItshouldallowdeveloperstoleverageJ2EEservicessuchasJTAwhereappropriate,buttoavoiddependenceonthemincaseswhentheyareunnecessarilycomplex.

Tomakeiteasiertoapplybestpractices.Springaimstoreducethecostofadheringtobestpracticessuchasprogrammingtointerfaces,ratherthanclasses,almosttozero.However,itleavesthechoiceofarchitecturalstyletothedeveloper.

Non-invasiveness.Applicationobjectsshouldhaveminimaldependenceontheframework.IfleveragingaspecificSpringfeature,anobjectshoulddependonlyonthatparticularfeature,whetherbyimplementingacallbackinterfaceorusingtheframeworkasaclasslibrary.IoCandAOParethekeyenablingtechnologiesforavoidingframeworkdependence.

Consistentconfiguration.Agoodinfrastructureframeworkshouldkeepapplicationconfigurationflexibleandconsistent,avoidingtheneedforcustomsingletonsandfactories.Asinglestyleshouldbeapplicabletoallconfigurationneeds,fromthemiddletiertowebcontrollers.

Easeoftesting.Testingeitherwholeapplicationsorindividualapplicationclassesinunittestsshouldbeaseasyaspossible.Replacingresourcesorapplicationobjectswithmockobjectsshouldbestraightforward.

Toallowforextensibility.BecauseSpringisitselfbasedoninterfaces,ratherthanclasses,itiseasytoextendorcustomizeit.ManySpringcomponentsusestrategyinterfaces,allowingeasycustomization.

ALayeredApplicationFramework

Chapter6introducedtheSpringFrameworkasalightweightcontainer,competingwithIoCcontainerssuchasPicoContainer.WhiletheSpringlightweightcontainerforJavaBeansisacoreconcept,thisisjustthefoundationforasolutionforallmiddlewarelayers.

BasicBuildingBlocks

pringisafull-featuredapplicationframeworkthatcanbeleveragedatmanylevels.Itconsistsofmulti-plesub-frameworksthatarefairlyindependentbutstillintegratecloselyintoaone-stopshop,ifdesired.Thekeyareasare:

Beanfactory.TheSpringlightweightIoCcontainer,capableofconfiguringandwiringupJava-BeansandmostplainJavaobjects,removingtheneedforcustomsingletonsandadhocconfigura-tion.Variousout-of-the-boximplementationsincludeanXML-basedbeanfactory.ThelightweightIoCcontaineranditsDependencyInjectioncapabilitieswillbethemainfocusofthischapter.

Applicationcontext.ASpringapplicationcontextextendsthebeanfactoryconceptbyaddingsupportformessagesourcesandresourceloading,andprovidinghooksintoexistingenv

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

当前位置:首页 > 自然科学 > 生物学

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

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