基于web的学生公寓管理系统的设计与实现毕业设计论文.docx

上传人:b****5 文档编号:29498299 上传时间:2023-07-24 格式:DOCX 页数:82 大小:1.98MB
下载 相关 举报
基于web的学生公寓管理系统的设计与实现毕业设计论文.docx_第1页
第1页 / 共82页
基于web的学生公寓管理系统的设计与实现毕业设计论文.docx_第2页
第2页 / 共82页
基于web的学生公寓管理系统的设计与实现毕业设计论文.docx_第3页
第3页 / 共82页
基于web的学生公寓管理系统的设计与实现毕业设计论文.docx_第4页
第4页 / 共82页
基于web的学生公寓管理系统的设计与实现毕业设计论文.docx_第5页
第5页 / 共82页
点击查看更多>>
下载资源
资源描述

基于web的学生公寓管理系统的设计与实现毕业设计论文.docx

《基于web的学生公寓管理系统的设计与实现毕业设计论文.docx》由会员分享,可在线阅读,更多相关《基于web的学生公寓管理系统的设计与实现毕业设计论文.docx(82页珍藏版)》请在冰豆网上搜索。

基于web的学生公寓管理系统的设计与实现毕业设计论文.docx

基于web的学生公寓管理系统的设计与实现毕业设计论文

 

大连交通大学信息工程学院

毕业设计(论文)任务书

题目基于web的学生公寓管理系统的设计与实现

                

任务及要求:

1.设计(研究)内容和要求

任务:

1、基于web的学生公寓管理系统,完成实习报告,字数不少于3000,第三周交给指导老师。

2、结合自己实习情况安排进度,填写进度计划表,第二周完成后交给指导老师签字,并严格执行。

3、按照软件工程思想,独立完成系统的设计和程序开发,完成代码估计2000行左右。

4、用Web技术实现web的学生公寓管理系统基本功能。

5、程序简洁,算法可行,运行情况良好。

要求:

1、每周和指导老师至少见面沟通一次,回报课题进展情况,接受老师询问。

2、接到任务书后,查阅与题目及专业相关的外文资料进行翻译,要求不少于10000个外文字符,译出汉字不得少于3000,于第四周交给指导老师审阅。

3、毕业设计第13周完成毕业论文的装订,并由指导老师评阅。

论文要求12000字以上,包括综述、系统总体设计、系统实现、性能分析、结论等。

4、教学第13周通过中软及教研室组织进行软件验收,验收时要提供软件使用说明书。

5、于第13周提出毕业答辩申请并签字。

6、第14周答辩,要求制作PPT

2.原始依据

通过大学几年的学习,已经学习了诸如软件工程、数据库原理及应用、数据结构、C++、VisualBasic、JAVA等多门程序设计语言和网络等基础知识和专业知识,学生有能力而且可以独立完成小中型项目的设计与开发。

学校现有设备和环境可以提供给学生实习和上机,而且具有专业老师可以指导学生。

 

3.参考文献

[1]耿祥义.张跃平.Java2实用教程(第三版)[M].北京:

清华大学出版社.2006.8

[2]黄晓东.java课程设计案例精编[M].中国水利水电出版社.2007

[3]崔晓静.严小舟.java语言程序设计[M].中国铁道出版社.2007.12

[4]王森.快易通Java程序设计[M].北京:

北京大学出版社.2000

[5]袁玉宇.软件测试与质量保证[M].北京:

邮电大学出版社.2008

[6]朱辉生.大型数据库系统概论[M].北京:

高等教育出版社.2006

[7]叶核亚.陈立著.Java2程序设计实用教程.北京电子工业出版社.2003.5

[8]周颢.网络编程语言JSP实例教程[M].电子工业出版社.2002.6

[9]MarkMatthews.JimCole.JosephD.Gradecki.MySQLandJavaDeveloper'sGuide[M].JohnWiley&SonsInc.2003

[10]史济民.软件工程―原理.方法与应用[M].高等教育出版社.2002

[11]CharlesBell.MatsKindahl.LarsThalmann.MySQLHighAvailability:

ToolsforRobustDataCenters.O'ReillyMedia.2010

指导教师签字:

教研室主任签字:

                        年月日

大连交通大学信息工程学院

毕业设计(论文)进度计划与考核表

学生姓名

方广志

专业班级

软件工程

08-3班

指导教师

阎树昕

王丽娟

本课题其他人员

题 目

基于web的学生公寓管理系统的设计与实现

日 期

计划完成内容

完成情况

指导老师检查签字

第1周

拟订《毕业论文进度计划与考核表》

第2周

完成实习或调研报告

第3周

提交外文文献翻译资料

第4周

系统概要设计阶段

第5周

系统详细设计阶段

第6周

系统编码实施、完成论文初稿

第7周

完成系统编码实施

第8周

系统编码调试、提交论文初稿

第9周

完成系统编码调试、完善毕业论文

第10周

完成撰写毕业设计论文编写及代码测试

第11周

完成论文终稿、准备毕业论文打印、装订

第12周

提交毕业论文终稿及代码

第13周

完成毕业论文

第14周

毕业论文答辩

指导教师签字:

             年  月  日

注:

“计划完成内容”由学生本人认真填写,其它由指导教师考核时填写。

 

大连交通大学信息工程学院

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

 

学生姓名方广志专业班级软件工程08-3班

指导教师阎树昕 王立娟职称高工 讲师

所在单位信息科学系软件工程教研室

教研室主任 刘瑞杰

 

完成日期2012年4月13日

HibernateInAction

Retrievingobjects

Retrievingpersistentobjectsfromthedatabaseisoneofthemostinteresting(andcomplex)partsofworkingwithHibernate.Hibernateprovidesthefollowingwaystogetobjectsoutofthedatabase:

■Navigatingtheobjectgraph,startingfromanalreadyloadedobject,byaccessingtheassociatedobjectsthroughpropertyaccessormethodssuchasaUser.getAddress().getCity().Hibernatewillautomaticallyload(orpreload)nodesofthegraphwhileyounavigatethegraphiftheSessionisopen.

■Retrievingbyidentifier,whichisthemostconvenientandperformantmethodwhentheuniqueidentifiervalueofanobjectisknown.

■UsingtheHibernateQueryLanguage(HQL),whichisafullobject-orientedquerylanguage.

■Usingthe,HibernateCriteriaAPI,whichprovidesatype-safeandobjectorientedwaytoperformquerieswithouttheneedforstringmanipulation.Thisfacilityincludesqueriesbasedonanexampleobject.

■UsingnativeSQLqueries,whereHibernatetakescareofmappingtheJDBCresultsetstographsofpersistentobjects.InyourHibernateapplications,you’lluseacombinationofthesetechniques.Eachretrievalmethodmayuseadifferentfetchingstrategy—thatis,astrategythatdefineswhatpartofthepersistentobjectgraphshouldberetrieved.ThegoalistofindthebestretrievalmethodandfetchingstrategyforeveryusecaseinyourapplicationwhileatthesametimeminimizingthenumberofSQLqueriesforbestperformance.

Wewon’tdiscusseachretrievalmethodinmuchdetailinthissection;insteadwe’llfocusonthebasic

fetchingstrategiesandhowtotuneHibernatemappingfilesforbestdefaultfetchingforallmethods.Beforewelookatthefetchingstrategies,we’llgiveanoverviewoftheretrievalmethods.(WementiontheHibernatecachingsystembutfullyexploreitinthenextchapter.)Let’sstartwiththesimplestcase,retrievalofanobjectbygivingitsidentifiervalue(navigatingtheobjectgraphshouldself-explanatory).Yousawasimpleretrievalbyidentifierearlierinthischapter,butthereismoretoknowaboutit.

Retrievingobjectsbyidentifier

ThefollowingHibernatecodesnippetretrievesaUserobjectfromthedatabase:

Useruser=(User)session.get(User.class,userID);Theget()methodisspecialbecausetheidentifieruniquelyidentifiesasingle;instanceofaclass.Henceit’scommonforapplicationstousetheidentifierasaconvenienthandletoapersistentobject.Retrievalbyidentifiercanusethecachewhenretrievinganobject,avoidingadatabasehitiftheobjectisalreadycached.

Hibernatealsoprovidesaload()method:

Useruser=(User)session.load(User.class,userID);

Theload()methodisolder;get()wasaddedtoHibernate’sAPIduetouserrequest.Thedifferenceistrivial:

■Ifload()can’tfindtheobjectinthecacheordatabase,anexceptionisthrown.Theload()methodneverreturnsnull.Theget()methodreturnsnulliftheobjectcan’tbefound.

■Theload()methodmayreturnaproxyinsteadofarealpersistentinstance.Aproxyisaplaceholderthattriggerstheloadingoftherealobjectwhenit’saccessedforthefirsttime;wediscussproxieslaterinthissection.Ontheotherhand,get()neverreturnsaproxy.Choosingbetweenget()andload()iseasy:

Ifyou’recertainthepersistentobjectexists,andnonexistencewouldbeconsideredexceptional,load()isagoodoption.Ifyouaren’tcertainthereisapersistentinstancewiththegivenidentifier,useget()andtestthereturnvaluetoseeifit’snull.Usingload()hasafurtherimplication:

Theapplicationmayretrieveavalidreference(aproxy)toapersistentinstancewithouthittingthedatabasetoretrieveitspersistentstate.Soload()mightnotthrowanexceptionwhenitdoesn’tfindthepersistentobjectinthecacheordatabase;theexceptionwouldbethrownlater,whentheproxyisaccessed.

Ofcourse,retrievinganobjectbyidentifierisn’tasflexibleasusingarbitraryqueries.

IntroducingHQL

TheHibernateQueryLanguageisanobject-orienteddialectofthefamiliarrelationalquerylanguageSQL.HQLbearscloseresemblancestoODMGOQLandEJB-QL;butunlikeOQL,it’sadaptedforusewithSQLdatabases,andit’smuchmorepowerfulandelegantthanEJB-QL(However,EJB-QL3.0willbeverysimilartoHQL.)HQLiseasytolearnwithbasicknowledgeofSQL.HQLisn’tadata-manipulationlanguagelikeSQL.It’susedonlyforobjectretrieval,notforupdating,inserting,ordeletingdata.Objectstatesynchronizationisthejobofthepersistencemanager,notthedeveloper.

Mostofthetime,you’llonlyneedtoretrieveobjectsofaparticularclassandrestrictbythepropertiesofthatclass.Forexample,thefollowingqueryretrievesauserbyfirstname:

Queryq=session.createQuery("fromUseruwhereu.firstname=:

fname");

q.setString("fname","Max");

Listresult=q.list();

Afterpreparingqueryq,webindtheidentifiervaluetoanamedparameter,fname.TheresultisreturnedasaListofUserobjects.

HQLispowerful,andeventhoughyoumaynotusetheadvancedfeaturesallthetime,you’llneedthemforsomedifficultproblems.Forexample,HQLsupportsthefollowing:

■Theabilitytoapplyrestrictionstopropertiesofassociatedobjectsrelatedbyreferenceorheldincollections(tonavigatetheobjectgraphusingquerylanguage).

■Theabilitytoretrieveonlypropertiesofanentityorentities,withouttheoverheadofloadingtheentityitselfinatransactionalscope.Thisissometimescalledareportquery;it’smorecorrectlycalledprojection.

■Theabilitytoordertheresultsofthequery.

■Theabilitytopaginatetheresults.

■Aggregationwithgroupby,having,andaggregatefunctionslikesum,min,

andmax.

■Outerjoinswhenretrievingmultipleobjectsperrow.

■Theabilitytocalluser-definedSQLfunctions.

■Subqueries(nestedqueries).

Wediscussallthesefeaturesinchapter7,togetherwiththeoptionalnativeSQLquerymechanism.

Querybycriteria

TheHibernatequerybycriteria(QBC)APIletsyoubuildaquerybymanipulatingcriteriaobjectsatruntime.Thisapproachletsyouspecifyconstraintsdynamicallywithoutdirectstringmanipulations,butitdoesn’tlosemuchoftheflexibilityorpowerofHQL.Ontheotherhand,queriesexpressedascriteriaareoftenlessreadablethanqueriesexpressedinHQL.

RetrievingauserbyfirstnameiseasyusingaCriteriaobject:

Criteriacriteria=session.createCriteria(User.class);

criteria.add(Expression.like("firstname","Max"));

Listresult=criteria.list();

ACriteriaisatreeofCriterioninstances.TheExpressionclassprovidesstaticfactorymethodsthatreturnCriterioninstances.Oncethedesiredcriteriatreeisbuilt,it’sexecutedagainstthedatabase.

ManydeveloperspreferQBC,consideringitamoreobject-orientedapproach.Theyalsolikethefactthatthequerysyntaxmaybeparsedandvalidatedatcompiletime,whereasHQLexpressionsaren’tparseduntilruntime.

ThenicethingabouttheHibernateCriteriaAPIistheCriterionframework.

Thisframeworkallowsextensionbytheuser,whichisdifficultinthecaseofaquery

languagelikeHQL.

Querybyexample

AspartoftheQBCfacility,Hibernatesupportsquerybyexample(QBE).TheideabehindQBEisthattheapplicationsuppliesaninstanceofthequeriedclasswithcertainpropertyvaluesset(tonondefaultvalues).Thequeryreturnsallpersistentinstanceswithmatchingpropertyvalues.QBEisn’taparticularlypowerful

approach,butitcanbeconvenientforsomeapplications.ThefollowingcodesnippetdemonstratesaHibernateQBE:

UserexampleUser=newUser();

exampleUser.setFirstname("Max");

Criteriacriteria=session.createCriteria(User.clas

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

当前位置:首页 > 求职职场 > 自我管理与提升

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

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