基于全球卫星定位系统GPS的软件开发.docx

上传人:b****6 文档编号:8864396 上传时间:2023-02-02 格式:DOCX 页数:16 大小:91.72KB
下载 相关 举报
基于全球卫星定位系统GPS的软件开发.docx_第1页
第1页 / 共16页
基于全球卫星定位系统GPS的软件开发.docx_第2页
第2页 / 共16页
基于全球卫星定位系统GPS的软件开发.docx_第3页
第3页 / 共16页
基于全球卫星定位系统GPS的软件开发.docx_第4页
第4页 / 共16页
基于全球卫星定位系统GPS的软件开发.docx_第5页
第5页 / 共16页
点击查看更多>>
下载资源
资源描述

基于全球卫星定位系统GPS的软件开发.docx

《基于全球卫星定位系统GPS的软件开发.docx》由会员分享,可在线阅读,更多相关《基于全球卫星定位系统GPS的软件开发.docx(16页珍藏版)》请在冰豆网上搜索。

基于全球卫星定位系统GPS的软件开发.docx

基于全球卫星定位系统GPS的软件开发

 

本科生毕业设计(论文)英文翻译

 

毕业设计题目:

基于全球卫星定位系统GPS的软件开发

 

学院:

专业班级:

学生姓名:

指导教师:

2008年4月7日

DeployingWirelessJavaApplications

byQusayH.Mahmoud

October2002

Developersusuallybuild,test,andevaluateanapplicationonaplatformsimilartotheoneonwhichitwillbedeployedandrun.DevelopmentofwirelessJavaapplicationsismorechallengingbecausetheytypicallyaredevelopedononeplatform(suchasSolarisorMSWindows)butdeployedonatotallydifferentone(suchasacellphoneorPDA).Oneconsequenceisthat,whileemulatorsenabledeveloperstodosomeoftheirtestingonthedevelopmentplatform,ultimatelytheymusttestandevaluatetheapplicationintheverydifferentenvironmentofalivewirelessnetwork.

TheaimofthisarticleistoshowyouthedifferentwaysyoucandownloadlocalandnetworkapplicationstoJ2ME-enableddevices,forbothtestingandfinaldeployment.AfterabriefreviewofwirelessJavaapplicationsandtheirdevelopmentlife-cycle,thearticleshowsyouhowto:

Deploywirelessapplicationsremotely

Downloadlocalandremotelydeployedapplications

Downloadapplicationsovertheair

WirelessJavaApplications

WirelessJavaapplicationsfallintotwobroadcategories:

Localapplications(alsocalledstand-aloneapplications)performalltheiroperationsonahandheldwirelessdeviceandneednoaccesstoexternaldatasourcesthroughawirelessnetwork.Examplesincludecalculatorsandsingle-playergames.

Networkapplicationsconsistofsomecomponentsrunningonawirelessdeviceandothersrunningonanetwork,andthusdependonaccesstoexternalresources.Anexamplewouldbeanemailapplication,withaclientresidingonawirelessphonethatinteractswithaSimpleMailTransferProtocol(SMTP)servertosendmessages.

Althoughthesetwotypesofapplicationsaredifferent,theyaredeployedinthesameway.Thebigdifferenceshowsuplater:

Localapplicationsareeasiertotestthannetworkapplications.Forexample,acalculatorapplicationcanrunonawirelessphoneevenwhenitisnotconnectedtoanynetwork,butanemailclientwon'tworkwithoutaconnectiontotheSMTPserverthatactuallytransmitsthemessages.

WirelessJavaApplicationsDevelopmentLifecycle

Thedevelopmentlife-cycleofMIDletsandotherwirelessJavaapplicationscomprisesthreesteps:

Writetheapplication.Useyourfavoritewirelessapplicationdevelopmentenvironmentandtoolstodeveloptheapplication.MyfavoriteistheJ2MEWirelessToolkit.Ithasasimpleandintuitiveuserinterfacethatmakesiteasytostartdevelopingwirelessapplications.Moreimportantly,itincludesseveralemulatorsfortestingyourapplications.(Someofwhatfollowswillassumeyouusethistoolkittoo.Ifyouuseanotherdevelopmentenvironment,you'llhavetoadaptwhatyoureadheretothatenvironment.) 

Testtheapplicationinanemulationenvironment.Oncetheapplicationcompilesnicely,thebestplacetobegintestingitisanemulator.TheJ2MEWirelessToolkitcomeswithseveral,includingMotorolai85s,PalmOSdevice,andRIMBlackberry.Itisimportanttonote,however,thattheseemulatorsdonotsimulateperfectlyallofthefeaturesofthecorrespondingdevices.Theyaremerelyskinswiththeappropriatedimensions,sothefollowingstepiscrucial.

Downloadtheapplicationtoaphysicaldeviceandtestit.Onceyouarehappywiththeapplication'sperformanceononeormoreemulators,downloadittoarealdeviceandtestitthere.Ifit'sanetworkapplication,testitonalivewirelessnetworktoensurethatitsperformanceisacceptable.

Thisarticle'sfocusisonthatlaststep:

deployingandtestingtheapplicationonaphysicaldevice.

DeployingandRunningRemoteApplications

TheJ2MEWirelessToolkitenablesyoutorunyourlocalwirelessapplicationfromwithinthedevelopmentenvironment;theJADandJARfilesareavailableonyourownsystem(ifyou'reusingtheJ2MEWirelessToolkit,in/apps/YourProject/bin).Ifyouwishtomarketyourwirelessapplications,however,youneedtodeploythemwhereusersfromallovertheworldcanaccessthem.

RemoteDeployment

Todeployyourwirelessapplicationsremotely:

Uploadyourapplicationfiles(JADandJAR)toaremotewebserver.Ifyourprojectisnamedgames,forinstance,uploadthefiles:

games.jadandgames.jarfromthebindirectoryofyourprojecthome(forexample,/apps/games/bin).Notethatthetwofilesmustendupinthesamedirectoryontheserver.

ReconfigurethewebserversothatitrecognizesJADandJARfiles:

FortheJADfiletype,setthefileextensionto.jadandtheMIMEtypetotext/vnd.sun.j2me.app-descriptor.

FortheJARfiletype,setthefileextensionto.jarandtheMIMEtypetoapplication/java-archive.

Howyouconfigurethewebserverdependsonwhichoneyou'reusing.Forexample,ifyou'reusingTomcat,makesureyourweb.xmlfileincludesthefollowinglines:

jad

text/vnd.sun.j2me.app-descriptor

jar

application/java-archive

ChangeyourJADfile'sMIDlet-Jar-URLpropertytospecifytheURLofyourJARfile.Forexample,inthecopyofgames.jadyouuploadedtotheserver,change...

MIDlet-Jar-URL:

games.jar

...to...

MIDlet-Jar-URL:

http:

//YourWebServerAddress:

port/pathTo/games.jar

RunningRemotelyDeployedApplications

Toseewhetheryourapplicationdeployedcorrectly,openanordinarywebbrowserandentertheJADfile'sURL.TheJ2MEWirelessToolkit'sdefaultemulatorshouldappearandtheremotelydeployedapplicationshouldruninit.

J2ME-enableddevices(theMotorola/Nexteli85s,forexample)includeaJavaApplicationManager(JAM)responsiblefordownloading,installing,andconfiguringapplications.TheJ2MEWirelessToolkitincludesasampleJAMyoucanruninthedefaultemulator.Toseehowtheuserwilldownloadandmanageyourapplication,openacommandprompt,changethecurrentdirectoryto/bin,andenterthecommand:

  emulator-Xjam

TheemulatorappearsandyouseetheJAM'smainscreen.Inversion1.0.4ofthetoolkit,themainscreenlookslikethis:

Figure1:

TheJ2MEWirelessToolkitJavaApplicationManager'sMainScreen

SelecttheInstallsoftbuttonandyouwillbepromptedfortheapplication'sURL,asshowninFigure2.EntertheURLofawebpagethatcontainsahyperlinktotheapplication'sJADfile.

Figure2:

EnteringtheURLfortheApplication'sJADFile

EnteringalongURLintoawirelessphoneisinconvenient.Afasterandeasierwaytogetstartedistouseacommandinthisform:

  emulator-Xjam:

install=http:

//yourWebServerAddress:

port/yourApp.jad

Withoutfurtherentry,theJAMdownloadstheJARfilespecifiedintheJADfileandinstallstheapplication.Thenexttimeyoustarttheemulator,simplyselecttheJAM'sMenubutton,thenusethemenutoruntheapplication,removeit,orperformtheotherfunctionsshowninFigure3:

Figure3:

TheJAM'sMainMenu

ItisimportanttonotethatthissyntaxallowsyoutoinstallonlyoneMIDletatatime.EnteringaURLallowsyoutoviewawebpagethatmaycontainseveralMIDletsyoucanchoosefrom.Asanexample,considerthefollowingHTMLfile(midlets.html)thatcontainslinkstothreeJADfiles:

Midlets

Downloadmidlets:

//127.0.0.1:

8080/games.jad">Games.jad

Calc.jad

Browser.jad

Thankyou.

tisimportanttonotethatthehyperlinkspointtotheapplication'sJADfile.Now,entertheURLintotheinstallwindowasshowninFigure4.(TheIPaddress127.0.0.1isequivalenttolocalhost.)

Figure4:

EnteringaURLintheInstallWindow

TheJAMreadstheHTMLdoccument(midlets.html),parsesthehyperlinks,anddisplaysalistofMIDletsyoucandownload:

Figure5:

LinkstoDownloadableMIDlets

NowyoucanselectaMIDlettodownload.TheJAMreadstheJADfiletodiscoverwhetherthedeviceiscapableofhandlingtheapplication.Ifso,itdownloadsandinstallstheJARfilespecifiedintheJADfile.OncethegamesMIDletisdownloadedandinstalled,youwillseeadisplaysimilartoFigure6.Notethatgames.jadistheMIDletsuitethatcomeswiththeJ2MEWirelessToolkit

Figure6:

TheMIDletSuiteofGamesDownloadedandInstalled

TheJAMissmartenoughtonotifyyouifyoutrytoinstallaMIDletthat'salreadyonyourdevice,asinFIgure7.Itwill,however,allowyoutodownloadanupdatedversionoftheMIDlet.

Figure7:

WarningThatMIDletIsAlreadyInstalled

DeployingandRunningApplicationsonPhysicalDevices

Deployingandrunningapplicationsinanemulationenvironmentisaverygoodwaytotestthelogicandflowofyourapplicationgenerally,butyouwon'tbecertainitwillsatisfyusersuntilyoutestitonarealphysicaldeviceconnectedtoawirelessnetwork.Yourapplication'sperformancemaybestunningintheemulator,whichhasalltheprocessingpowerandmemoryofyourdesktopmachineatitscommand,butwillitperformwellonthehandhelddevice,withitslimitedmemoryandprocessingpower,lowbandwidth,andotherconstraints?

ToperformrealistictestsyouneedaJ2ME-enabledphysicaldevice,andadatacabletoconnectittoyourdesktop.Forthisarticle.

IusedaMotorola/Nexteli85scellphone,availablefromNextel,whichoffersseveralmodelsandrateplans.

DeployingLocalApplications

IfyouhaveaMotorolaJ2ME-enabledphone,youcandownloadstand-aloneapplicationsusingtheMotorolaJavaApplicationLoa

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

当前位置:首页 > 高等教育 > 农学

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

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