毕业论文外文翻译-Spring 框架简介.docx

上传人:b****1 文档编号:184896 上传时间:2022-10-05 格式:DOCX 页数:25 大小:32.65KB
下载 相关 举报
毕业论文外文翻译-Spring 框架简介.docx_第1页
第1页 / 共25页
毕业论文外文翻译-Spring 框架简介.docx_第2页
第2页 / 共25页
毕业论文外文翻译-Spring 框架简介.docx_第3页
第3页 / 共25页
毕业论文外文翻译-Spring 框架简介.docx_第4页
第4页 / 共25页
毕业论文外文翻译-Spring 框架简介.docx_第5页
第5页 / 共25页
点击查看更多>>
下载资源
资源描述

毕业论文外文翻译-Spring 框架简介.docx

《毕业论文外文翻译-Spring 框架简介.docx》由会员分享,可在线阅读,更多相关《毕业论文外文翻译-Spring 框架简介.docx(25页珍藏版)》请在冰豆网上搜索。

毕业论文外文翻译-Spring 框架简介.docx

IntroducingtheSpringFramework

TheSpringFramework:

apopularopensourceapplicationframeworkthataddressesmanyoftheissuesoutlinedinthisbook.ThischapterwillintroducethebasicideasofSpringanddis-cussthecentral"beanfactory"lightweightInversion-of-Control(loC)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,loCorAOPframework,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.loCandAOParethekeyenablingtechnologiesforavoidingframeworkdependence.

Consistentconfiguration.Agoodinfrastructureframeworkshouldkeepapplicationconfigurationflexibleandconsistent,avoidingtheneedforcustomsingletonsandfactories.Asinglestyleshouldbeapplicabletoallconfigurationneeds,fromthemiddletiertowebcontrollers.

Easeoftesting.Testingeitherwholeapplicationsorindividualapplicationclassesinunittestsshouldbeaseasyaspossible.Replacingresourcesorapplicationobjectswithmockobjectsshouldbestraightforward.

Toallowforextensibility.BecauseSpringisitselfbasedoninterfaces,ratherthanclasses,itiseasytoextendorcustomizeit.

ManySpringcomponentsusestrategyinterfaces,allowingeasycustomization.

ALayeredApplicationFramework

Chapter6introducedtheSpringFrameworkasalightweightcontainer,competingwithloCcontainerssuchasPicoContainer.WhiletheSpringlightweightcontainerforJavaBeansisacoreconcept,thisisjustthefoundationforasolutionforallmiddlewarelayers.

BasicBuildingBlocks

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

Beanfactory.TheSpringlightweightloCcontainer,capableofconfiguringandwiringupJava-BeansandmostplainJavaobjects,removingtheneedforcustomsingletonsandadhocconfigura-1ion.Variousout-of—the—boximplementationsincludeanXML-basedbeanfactory.ThelightweightloCcontaineranditsDependencyInjectioncapabilitieswillbethemainfocusofthischapter.

Applicationcontext.ASpringapplicationcontextextendsthebeanfactoryconceptbyaddingsupportformessagesourcesandresourceloading,andprovidinghooksintoexistingenviron-ments.Variousout-of-the~boximplementationsincludestandaloneapplicationcontextsandanXML-basedwebapplicationcontext.

AO

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

当前位置:首页 > 求职职场 > 面试

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

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