1山东理工大学毕业设计(论文)个人代码管理器学院:理学院专业:0712100016学生姓名:谢秋斌指导教师:左进明、吴奕萍毕业设计(论文)时间:二О一一年月日~月日共周2摘要随着软件行业的不断发展,从事软件开发的人越来越多。每个程序员一般都有自己的代码库,用于存放自己曾写过的代码或从收集的代码,一般都是以文件、文件夹形式存放于硬盘。日积月累,代码库越来越大,文件夹也越来越多,代码的管理问题日益突出。目前,著名的源代码管理器有Subversion,CVS,VSS等。这些代码管理器主要用于对项目的管理,即只要开了服务器,团队中的成员能从服务器那边签出代码,并对它操作后提交。这些软件都很好地实现了项目的管理,方便了整个项目的整合。然而,真正适合个人用的代码管理器却不多。虽然目前已有一些用其它语言实现的代码管理器,但只是实现对文件的归类、显示代码及文件的一些基本信息,在代码编辑方面做得还不够好。本课题使用Java语言开发,采用MySQL作为数据库用于存放代码,通过Hibernate来实现数据的持久化。Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使程序更加面向对象。关键词个人代码管理器MySQLJavaHibernate3AbstractWiththecontinuousdevelopmentofthesoftwareindustry,moreandmorepeopleareengagedinsoftwaredevelopment.Everyprogrammerusuallyhasitsowncodebasewhichisusedtostorethecodehehadwrittendownorsearchedfromtheweb.Thecodeisusuallystoredintheharddiskwithafolder.Overtime,thecodebaseincreaseswithmoreandmorefolders,problemsofcodemanagementbecomeincreasinglyprominent.Atpresent,therearethewell-knownsourcecodemanagerssuchasSubversion,CVS,VSSandsoon.Thesecodemanagersaremainlyusedforthemanagementoftheproject,aslongastheserveropen,teammembersfromtheothersideofserverscancheckoutthecodewhichtheysubmitted.Projectimplementswiththesesoftwareworkverywell,thankstotheintegrationoftheentireproject.However,therealpersonalcodemanagerisfewAlthoughtherehavebeensomeotherlanguagewiththecodemanager,butonlytoachievetheclassificationofdocumentsandshowsomebasicinformationofcodeanddocuments.Codeeditingisnotworkwell.ThissoftwareisdevelopedwiththeJavalanguageanduseMySQLasadatabaseforstoringcodeandpersistencethedatumthroughHibernate.Keywords:Personalcodemanager;Java;MySQL;Hibernate4目录摘要..........................................................................................................................2Abstract(英文摘要).......................................................................................................31前言..........................................................................................................................61.1问题的提出..................................................................................................61.2研究目的及其意义......................................................................................61.3课题研究的主要内容..................................................................................71.4重点解决的问题..........................................................................................71.5预期结果......................................................................................................72相关技术介绍..........................................................................................................82.1Java语言简介.............................................................................................82.2MySQL简介...................................................................................................82.3Hibernate简介.............................................................................................92.4本系统选择的技术及其原因......................................................................93需求分析................................................................................................................103.1系统实现目标............................................................................................103.2系统应具备的功能....................................................................................103.3类别处理....................................................................................................103.3.1用例事件........................................................................................103.3.2用例规则........................................................................................103.4工程处理....................................................................................................113.4.1用例事件........................................................................................113.4.2用例规则........................................................................................113.5文件处理....................................................................................................113.5.1用例事件........................................................................................113.5.2用例规则........................................................................................124系统设计................................................................................................................134.1总体设计....................................................................................................134.1.1系统架构图....................................................................................134.1.2系统功能结构图............................................................................134.1.3类别处理........................................................................................134.1.4工程处理........................................................................................144.1.5文件处理........................................................................................144.1.6条件查询....................................