0字左右外文翻译.docx
- 文档编号:11812533
- 上传时间:2023-04-02
- 格式:DOCX
- 页数:16
- 大小:32.08KB
0字左右外文翻译.docx
《0字左右外文翻译.docx》由会员分享,可在线阅读,更多相关《0字左右外文翻译.docx(16页珍藏版)》请在冰豆网上搜索。
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,andprovidinghooksintoexistingenviron-ments.Variousout-of-the-boximplementationsincludestandaloneapplicationcontextsandanXML-basedwebapplicationcontext.
AOPframework.TheSpringAOPframeworkprovidesAOPsupportformethodinterceptiononanyclassmanagedbyaSpringlightweightcontainer.Itsupportseasyproxyingofbeansinabeanfactory,seamlesslyweavingininterceptorsandotheradviceatruntime.Chapter8dis-cussestheSpringAOPframeworkindetail.ThemainuseoftheSpringAOPframeworkistoprovidedeclarativeenterpriseservicesforPOJOs.
Auto-proxying.SpringprovidesahigherlevelofabstractionovertheAOPframeworkandlow-levelservices,whichofferssimilarease-of-useto.NETwithinaJ2EEcontext.Inparticular,theprovisionofdeclarativeenterpriseservicescanbedrivenbysource-levelmetadata.
Transactionmanagement.Springprovidesagenerictransactionmanagementinfrastructure,withpluggabletransactionstrategies(suchasJTAandJDBC)andvariousmeansfordemarcat-ingtransactionsinapplications.Chapter9discussesitsrationaleandthepowerandflexibilitythatitoffers.
DAOabstraction.Springdefinesasetofgenericdataaccessexceptionsthatcanbeusedforcre-atinggenericDAOinterfacesthatthrowmeaningfulexceptionsindependentoftheunderlyingpersistencemechanism.Chapter10illustratestheSpringsupportforDAOsinmoredetail,examiningJDBC,JDO,andHibernateasimplementationstrategies.
JDBCsupport.SpringofferstwolevelsofJDBCabstractionthatsignificantlyeasetheeffortofwritingJDBC-basedDAOs:
theorg.springframework.jdbc.corepackage(atemplate/
callbackapproach)andtheorg.springframework.jdbc.objectpackage(modelingRDBMSoperationsasreusableobjects).UsingtheSpringJDBCpackagescandelivermuchgreaterpro-ductivityandeliminatethepotentialforcommonerrorssuchasleakedconnections,comparedwithdirectuseofJDBC.TheSpringJDBCabstractionintegrateswiththetransactionandDAOabstractions.
IntegrationwithO/Rmappingtools.SpringprovidessupportclassesforO/RMappingtoolslikeHibernate,JDO,andiBATISDatabaseLayertosimplifyresourcesetup,acquisition,andrelease,andtointegratewiththeoveralltransactionandDAOabstractions.TheseintegrationpackagesallowapplicationstodispensewithcustomThreadLocalsessionsandnativetransac-tionhandling,regardlessoftheunderlyingO/Rmappingapproachtheyworkwith.
WebMVCframework.SpringprovidesacleanimplementationofwebMVC,consistentwiththeJavaBeanconfigurationapproach.TheSpringwebframeworkenableswebcontrollerstobeconfiguredwithinanIoCcontainer,eliminatingtheneedtowriteanycustomcodetoaccessbusinesslayerservices.ItprovidesagenericDispatcherServletandout-of-the-boxcontrollerclassesforcommandandformhandling.Request-to-controllermapping,viewresolution,localeresolutionandotherimportantservicesareallpluggable,makingtheframeworkhighlyextensi-ble.ThewebframeworkisdesignedtoworknotonlywithJSP,butwithanyviewtechnology,suchasVelocity—withouttheneedforadditionalbridges.Chapter13discusseswebtierdesignandtheSpringwebMVCframeworkindetail.
Remotingsupport.Springprovidesathinabstractionlayerforaccessingremoteserviceswithouthard-codedlookups,andforexposingSpring-managedapplicationbeansasremoteservices.Out-of-the-boxsupportisincludedforRMI,Caucho’sHessianandBurlapwebserviceprotocols,andWSDLWebServicesviaJAX-RPC.Chapter11discusseslightweightremoting.
WhileSpringaddressesareasasdiverseastransactionmanagementandwebMVC,itusesaconsistentapproacheverywhere.Onceyouhavelearnedthebasicconfigurationstyle,youwillbeabletoapplyitinmanyareas.Resources,middletierobjects,andwebcomponentsareallsetupusingthesamebeanconfigurationmechanism.Youcancombineyourentireconfigurationinonesinglebeandefinitionfileorsplititbyapplicationmodulesorlayers;thechoiceisuptoyouastheapplicationdeveloper.Thereisnoneedfordiverseconfigurationfilesinavarietyofformats,spreadoutacrosstheapplication.
SpringonJ2EE
AlthoughmanypartsofSpringcanbeusedinanykindofJavaenvironment,itisprimarilyaJ2EEapplicationframework.Forexample,thereareconvenienceclassesforlinkingJNDIresourcesintoabeanfactory,suchasJDBCDataSourcesandEJBs,andintegrationwithJTAfordistributedtransactionmanagement.Inmostcases,applicationobjectsdonotneedtoworkwithJ2EEAPIsdirectly,improvingreusabilityandmeaningthatthereisnoneedtowriteverbose,hard-to-test,JNDIlookups.
ThusSpringallowsapplicationcodetoseamlesslyintegrateintoaJ2EEenvironmentwithoutbeingunnecessarilytiedtoit.YoucanbuilduponJ2EEserviceswhereitmakessenseforyourapplication,andchooselighter-weightsolutionsifthere
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 字左右 外文 翻译