下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
外文文献翻译SpringFramework Springisanopensourceframework,andSpringwaslaunchedin2003asalightweightJavadevelopmentframeworkcreatedbyRodJohnson.Inanutshell,Springisahierarchical,JavaSE/EEfull-stack(one-stop)lightweightopensourceframework.ThepowerfulJavaBeansbasedconfigurationmanagementusingtheInversionofControl(IoC)principlemakesapplicationcomponentsfasterandeasier. 1.facilitatedecouplingandsimplifydevelopment ThroughtheIoCcontainerprovidedbySpring,wecancontroldependenciesbetweenobjectsbySpring,avoidingexcessiveprogramcouplingcausedbyhardcoding.WithSpring,usersdonothavetowritecodeforthebottomtierrequirementsofsingleinstanceschemaclasses,properties,fileparsing,andsoon,andcanfocusmoreontoptierapplications. 2.AOPprogrammingsupport ThroughtheSpringfunctionalityprovidedbyAOP,itiseasytoimplementfaceorientedprogramming,andmanyfeaturesthatarenoteasilyimplementedwithtraditionalOOPcanbeeasilyhandledbyAOP. 3.declarativetransactionsupport InSpring,wecanextricateourselvesfromtediousandtedioustransactionmanagementcodeandflexiblymanagethetransactionthroughdeclarativemanner,soastoimprovetheefficiencyandqualityofdevelopment. 4.convenienceprogramtesting Almostalltestworkcanbedoneinanoncontainerdependentprogrammingmanner,andinSpring,testingisnolongerexpensive,butsomethingtodo.Forexample,SpringsupportsJunit4andcaneasilytestSpringprogramsbyannotations. 5.convenientintegrationofvariousexcellentframework Springdoesnotexcludeallkindsofexcellentopensourceframework,onthecontrary,SpringcanreducethedifficultyoftheuseofSpringframework,providesaframeworkforavarietyofexcellent(suchasStruts,Hibernate,Hessian,Quartz)directlysupportthe. 6.reducethedifficultyofusingJavaEEAPI SpringprovidesathinlayerofencapsulationformanydifficultJava,EE,API(suchasJDBC,JavaMail,remotecalls,etc.),andtheuseoftheseJavaEEAPIisgreatlyreducedthroughthesimplepackageofSpring. 7.Javasourcecodeisaclassicexampleoflearning Springsourcecode,clearstructure,exquisitedesignoriginality,embodiesthemasteroftheJavadesignpatternandtheflexibleuseofJavatechnologyaccomplishment.SpringframeworksourcecodeisundoubtedlythebestpracticeexampleofJavatechnology.IfyouwanttoquicklyimproveyourJavaskillsandapplicationdevelopmentlevelinashorttime,learningan. TheroleofMVC-Springisintegration,butnotjustintegration,andtheSpringframeworkcanbeseenasaframeworkforenterprisesolutionlevels.Theclientsendsarequest,theservercontroller(implementedbyDispatcherServlet)tocompletetherequestforwarding,callacontrollerformappingclassHandlerMapping,theclassisusedtomaprequeststothecorrespondingprocessortoprocesstherequest.HandlerMappingwillrequestismappedtothecorrespondingprocessorController(equivalenttoAction)inSpringifyouwritesomeprocessorcomponents,thegeneralimplementationoftheControllerinterfaceinController,youcancallServiceorDAOtooperatedatafromtheDAOModelAndViewusedtostoretheretrieveddata,somedatacanalsobestoredinresponsetotheview.Ifyouwanttoreturntheresulttotheuser,italsoprovidesaviewofViewResolvercomponentinSpringframework,thecomponentlabeledControllerreturnsaccordingto,findthecorrespondingview,theresponseresponsebacktotheuser. Eachmodule(orcomponent)thatmakesuptheSpringframeworkcanexistalone,orcanbeimplementedinconjunctionwithoneormoreothermodules.Eachmodulehasthefollowingfunctions:1,thecorecontainer:thecorecontainerprovidesthebasicfunctionalityoftheSpringframework(Spring,Core).ThemaincomponentofthecorecontainerisBeanFactory,whichisimplementedinfactorymode.BeanFactoryusesthecontrolinversion(IOC)patterntoseparateapplicationconfigurationanddependencyspecificationsfromtheactualapplicationcode.Spring框架 Spring是一个开源框架,Spring是于2003年兴起的一个轻量级的Java开发框架,由RodJohnson创建。简单来说,Spring是一个分层的JavaSE/EEfull-stack(一站式)轻量级开源框架。强大的基于JavaBeans的采用控制反转(InversionofControl,IoC)原则的配置管理,使得应用程序的组件更加快捷简易。 1.方便解耦,简化开发 通过Spring提供的IoC容器,我们可以将对象之间的依赖关系交由Spring进行控制,避免硬编码所造成的过度程序耦合。有了Spring,用户不必再为单实例模式类、属性文件解析等这些很底层的需求编写代码,可以更专注于上层的应用。 2.AOP编程的支持 通过Spring提供的AOP功能,方便进行面向切面的编程,许多不容易用传统OOP实现的功能可以通过AOP轻松应付。 3.声明式事务的支持 在Spring中,我们可以从单调烦闷的事务管理代码中解脱出来,通过声明式方式灵活地进行事务的管理,提高开发效率和质量。 4.方便程序的测试 可以用非容器依赖的编程方式进行几乎所有的测试工作,在Spring里,测试不再是昂贵的操作,而是随手可做的事情。例如:Spring对Junit4支持,可以通过注解方便的测试Spring程序。 5.方便集成各种优秀框架 Spring不排斥各种优秀的开源框架,相反,Spring可以降低各种框架的使用难度,Spring提供了对各种优秀框架(如Struts,Hibernate、Hessian、Quartz)等的直接支持。 6.降低JavaEEAPI的使用难度 Spring对很多难用的JavaEEAPI(如JDBC,JavaMail,远程调用等)提供了一个薄薄的封装层,通过Spring的简易封装,这些JavaEEAPI的使用难度大为降低。 7.Java源码是经典学习范例 Spring的源码设计精妙、结构清晰、匠心独运,处处体现着大师对Java设计模式灵活运用以及对Java技术的高深造诣。Spring框架源码无疑是Java技术的最佳实践范例。如果想在短时间内迅速提高自己的Java技术水平和应用开发水平,学习和研究Spring源码将会使你收到意想不到的效果。MVC——Spring的作用是整合,但不仅仅限于整合,Spring框架可以被看做是一个企业解决方案级别的框架。客户端发送请求,服务器控制器(由DispatcherServlet实现的)完成请求的转发,控制器调用一个用于映射的类HandlerMapping,该类用于将请求映射到对应的处理器来处理请求。HandlerMapping将请求映射到对应的处理器Controller(相当于Action)在Spring当中如果写一些处理器组件,一般实现Controller接口,在Controller中就可以调用一些Service或DAO来进行数据操作ModelAndView用于存放从DAO中取出的数据,还可以存放响应视图
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 条码数据采集终端规范(征求意见稿)-编制说明
- 2024版《5年高考3年模拟》语文分层讲练05-专题五 古代诗歌阅读
- 《为了忘却的记念》课件+2024-2025学年统编版高中语文选择性必修中册
- 2孩的离婚协议书范本
- 2个娃儿的离婚协议书范文范本
- 《计算机网络安全防护技术(第二版)》 课件 第2章-任务2.4 安全区域间通过NAT访问
- 溶液配制基础
- 餐饮行业就业指导
- 综艺节目制作技巧
- 河南青桐鸣2025届高三十月大联考(高三)语文含答案
- Unit3Viewingworkshop同步教学设计【新教材】北师大版(2019)必修第一册
- 酒精乙醇安全技术说明书MSDS
- 骑手工作手册(共13页)
- 医药大数据中心项目建议书范文
- 最新SketchUp教案
- 我国心脑血管疾病的现状:每年有300万人因心脑
- 目视化标准管理手册1
- 脊柱损伤固定搬运术ppt课件
- 安防监控工程竣工验收报告模板
- 室内装饰装修材料木家具中有害物质限量GB18584-2001
- 中医养生馆策划书
评论
0/150
提交评论