CENG490

STARSOFT RequirementAnalysis Report

By;

FatihYILDIRIM ÖzerGÜMÜ ÖzgeYAMASAN MehmetALBAYRAK ÖmerESER

1. Introduction...... 3 1.1. Scope ...... 3 1.2. GoalsAndObjectives ...... 3 2. The Process...... 4 2.1. TeamOrganization ...... 4 2.2. ProcessModel...... 4 2.3. Schedule ...... 5 2.3.1. GanttChart...... 6 3. Literature Survey...... 7 3.1. ResearchAbout...... 7 3.1.1. Briefhistory ...... 8 3.1.2. WhytouseAjax?...... 8 3.1.3. WhatisAjax,indepth?...... 8 3.1.4. Howdoesitwork? ...... 9 3.1.5. AjaxandDHTML ...... 10 3.1.6. TheXMLHttpRequestclass ...... 10 3.1.7. Buildingarequest,stepbystep...... 11 3.1.8. Examples...... 12 3.1.9. HowtobuildanAjaxwebsite? ...... 15 3.1.10. TheAjaxToolkitFramework...... 15 3.1.11. Drawbacks...... 15 3.1.12. Specifications ...... 16 3.2. MarketingResearch...... 16 3.2.1. VisualC++Analysis...... 16 3.2.2. EclipseIDEAnalysis ...... 19 3.2.3. WEBOSAppsBuilderAnalysis ...... 21 3.2.4. GoogleWebToolkitAnalysis...... 23 3.2.5. TheCommonFeatures ...... 24 3.3. MeetingWithCevatener ...... 25 3.4. MeetingWithEmrahener ...... 26 4. Technical Analysis ...... 26 4.1. FunctionalRequirements ...... 26 4.1.1. EditorModule ...... 26 4.1.2. Project ...... 27 4.1.3. Debugger...... 28 4.1.4. Database...... 28 4.2. NonFunctionalRequirements...... 28 4.2.1. Usability...... 28 4.2.2. Security ...... 29 4.2.3. Reliability...... 29 4.2.4. Serviceability...... 29 4.3. Requirements ...... 29 5. System Modeling...... 30 5.1. DFDLEVEL0...... 30 5.2. DFDLEVEL1...... 31 5.3. UseCaseDiagram...... 32 6. References...... 33

2 1. Introduction 1.1. Scope

Ajaxismainlyawebdevelopmenttechniqueforcreatinginteractivewebapplications. ThecomponentsthatmadeupAjaxwerebeingusedevenbeforethenamingtookplace.Due totheconveniencethatAjaxbringstodevelopersithasgainedpopularityquitequickly.In thisprojectwewilldesignandimplementaGraphicalDevelopmentEnvironmentfor webpageswithAjaxwhichhelpsthedevelopersfurtherbyputtingmanyoptionsandfeatures together. Thesoftwareistoincludeaneditortowriteandedittheneccesarycodes.Thetext highlightingmethodwillbeusedtoincreasereadability.Predefinedscriptsandactionswillbe available.Featuressuchasadding,locating,editing,removingscriptsandactionswillbeput touse.Withoutusinganyothersoftware,debuggingthecodewhennecessarywillalsobeat hand.Theuserwillbeabletoseetheeffectofthechangesmadeandrunthecode.The advancedgraphicalinterfaceistobeimplementedasawayofeasingtheprocessesofthe user.Hence,theuserofthesoftwareistobesatisfiedwitheveryneedhe/shehasthroughone completepackage.

1.2. GoalsAndObjectives

Duringtheanalysisofthesoftwarewehavefocusedonthefollowinggoalsand objectives.Thesewillbeexaminedagainasnonfunctionalrequirementsinthefollowing sectionsofthereportastheyalsoconstituteanimportantpartoftherequirementsofour project. Easy to Understand :Thesoftwarepackageisboundtoincludemanyhelpoptionsand documentarytohelptheuserunderstandhowtousethesoftwaremoreefficientlywithless effort. Easy to Use :Oneofthemostimportantreasonsforadevelopertousesuchasoftwareis tomakehislifeeasierwiththefeaturespresentedthroughthesoftwarewhicharenot

3 availableinaregulareditor.Consequently,agreatdealofeffortistobemadetomakethe softwaresatisfactorytotheseneeds:TextHighlighting,predefinedscripts,etc... Performance :Sincesuchsoftwareshouldsatisfycomplexdevelopingaswellassimple ones,theperformanceissueisratheranimportantone.Theaimedcustomerdatabaseisalso makingtheperformancegoalsmoreimportantsinceitisclearlymoreobviousandcriticalto someonewhoisadeveloperthanaregularsoftwareuser. Update Readiness :Thetechnologythatthesoftwarewilldependonintermsofscripts, actions,debuggingandsoon,makestheupdateissueanimportantone.Oneofthemaingoals oftheprojectistomakesurenottooverlookthisconceptaswithtimeandwiththehigh speedoftheintroductionofnewfeaturesitshouldbeeasytoaddnewmodules,removeold oneswhichwillnotbenecessaryanymore.

2. TheProcess

2.1. TeamOrganization

Our team is formed by five people. Therefore, we choose a group leader in order to coordinateandinteractbetweengroupmembers.However,topicsarediscussedbyallgroup membersanddecisionsaretakenbyallgroupmembersandallofthemapproveit. Also, all group members will work on every phase of project and will make both documentationandcoding. Ourteammakesameetingeveryweekandalsoeverydayweareconnectingeachother ontheinternetandhaveaconversationaboutourlasttopic.Besides,allourdocumentationis collectedatourmailgroupandalsowecanuseitinordertocommunicate.

2.2. ProcessModel

Wewillnotuseaspecificprocessmodel.Ourprocessmodelischangedaccordingtoour projectphase.Untilprototypeofourproject,weuselinearmodel.Firstly,wedecidetoour

4 requirements. Then we make design of our project. We make prototype our project which shows function of our project. Besides, we will use evolutionary model in the implementationpartofourproject.Thismodelhelpsustoshowourmistakesandproblems withourprogram.

2.3. Schedule

WehavetofinishourprojectatthebeginningofJune2007.Atthefirstpartofourproject wehavetomakeaprototypeoftheprojectuntiltheJanuary23 rd andweshowitatthisday. Inordertobemorespecificandexactaboutourschedule we have worked on a Gantt Chart.

5 2.3.1. Gantt Chart

6

3. LiteratureSurvey

3.1. ResearchAboutAjax

Ajax(AsynchronousJavascriptAndXml),asnotedfromthebeginningandwillbe clearlyexplainedinthebelowpart,isawebdevelopmentenvironmentforclientside dynamicwebpages.Ajaxisactuallyasetoftoolsthatwerepreviouslyexisted.Forfurther informationaboutAjax,let’sfirstdefinesometopics,andthenaccordingtothesetopics,give somedetail. 3.1.1.Briefhistory 3.1.2.WhytouseAjax? 3.1.3.WhatisAjax,indepth? 3.1.4.Howdoesitwork? 3.1.5.AjaxandDHTML 3.1.6.TheXMLHttpRequestclass 3.1.7.Buildingarequest,stepbystep 3.1.7.1.Createaninstance 3.1.7.2.Wait 3.1.7.3.Sendtherequest 3.1.8.Examples 3.1.8.1.Getatext 3.1.8.2.Getfromxml 3.1.8.3.Writetobody 3.1.8.4.Postatext 3.1.9.HowtobuildanAjaxwebsite? 3.1.10.TheAjaxToolkitFramework 3.1.11.Drawbacks 3.1.12.Specifications

7

3.1.1. Briefhistory Ajaxisonlyanamegiventoasetoftoolsthatpreviouslyexisted.Themainpartis XMLHttpRequest,aclassusableinJavaScriptthatwasimplementedintoInternetExplorer sincethe4.0version.ThesameconceptwasnamedXMLHTTPsometimes,beforetheAjax namebecomescommonlyused.TheuseofXMLHttpRequestin2005byGoogle,inGmail andGoogleMapshascontributedtothesuccessofthisformat.ButthisisthenameAjax itselfthatmadethetechnologysopopular.

3.1.2. WhytouseAjax? MainpurposeofusingAjaxistobuildafast,dynamicwebsite,butalsotosaveresources. Forimprovingsharingofresources,itisbettertousethepowerofalltheclientcomputers ratherthanjustauniqueserverandnetwork.Ajaxallowsperformingprocessingonclient computer(inJavaScript)withdatatakenfromtheserver.Theprocessingofwebpage formerlywasonlyserverside,usingwebservicesorPhpscripts,beforethewholepagewas sentwithinthenetwork.HoweverAjaxcanselectivelymodifyapartofapagedisplayedby thebrowser,andupdateitwithouttheneedtoreloadthewholedocumentwithallimages, menus,etc.Forexample,fieldsofforms,choicesofuser,maybeprocessedandtheresult displayedimmediatelyintothesamepage.

3.1.3. WhatisAjax,indepth? Ajaxisasetoftechnologies,supportedbyawebbrowser,includingtheseelements: • HtmlandCSSforpresenting. • JavaScript(ECMAScript)forlocalprocessing,andDOM(DocumentObject Model)toaccessdatainsidethepageortoaccesselementsofXmlfilereadonthe server(withthegetElementByTagNamemethode.g.) • TheXMLHttpRequestclassreadorsendsdataontheserverasynchronously. Andtherearesomemoreusedoptionally: • TheDomParserclassmaybeused

8 • PHPoranotherscriptinglanguagemaybeusedontheserver. • XMLandXSLTtoprocessthedataifreturnedinXmlform. • SOAPmaybeusedtodialogwiththeserver. The"Asynchronous"word,meansthattheresponseoftheserverwhilebeprocessedwhen available,withouttowaitandtofreezethedisplayofthepage.

3.1.4. Howdoesitwork? Ajaxusesaprogrammingmodelwithdisplayandevents.Theseeventsareuseractions; theycallfunctionsassociatedtoelementsofthewebpage.Interactivityisachievedwith formsandbuttons.DOMallowstolinkelementsofthepagewithactionsandalsotoextract datafromXmlfilesprovidedbytheserver. Togetdataontheserver,XMLHttpRequestprovidestwomethods: Open:createaconnection. Send:sendarequesttotheserver. DatafurnishedbytheserverwillbefoundintheattributesoftheXMLHttpRequest object: ResponseXmlforaXmlfileor ResponseTextforasimpletext. TakenotethatanewXMLHttpRequestobjecthastobecreatedforeachnewfiletoload. Wehavetowaitforthedatatobeavailabletoprocessit,andinthispurpose,thestateof availabilityofdataisgivenbythereadyStateattributeofXMLHttpRequest. StatesofreadyStatefollow(onlythelastoneisreallyandmostlyuseful): 0:notinitialized 1:connectionestablished 2:requestreceived 3:answerinprocess 4:finished

9 3.1.5. AjaxandDHTML Dhtmlhassamepurposeandisalso,asAjax,asetofstandards: • Html, • Css, • JavaScript. Dhtmlallowschangingthedisplayofthepagefromusercommandsorfromtexttypedby theuser.Ajaxallowsalsosendingrequestsasynchronouslyandloadingdatafromtheserver.

3.1.6. TheXMLHttpRequestclass TheXMLHttpRequestclassallowsinteractingwiththeservers,thankstoitsmethodsand attributes. Attributes ReadyState:thecodesuccessivelychangesvaluefrom0to4thatmeansfor"ready". Status :200isok,404ifthepageisnotfound. ResponseText:holdsloadeddataasastringofcharacters. ResponseXml:holdsanXmlloadedfile,DOM'smethodallowstoextractdata. Onreadystatechange:onreadystatechange Methods Open(mode,url,boolean) Mode:typeofrequest,GETorPOST Url:thelocationofthefile,withapath. Boolean:true(asynchronous)/false(synchrous). Optionally,aloginandapasswordmaybeaddedtoarguments. Send("string") NullforaGETcommand.

10 3.1.7. Buildingarequest,stepbystep Buildingarequestoccurintheresteps. 3.1.7.1. Createaninstance Thisisjustaclassicalinstanceofclass,buttwooptionsmustbetried,forbrowser compatibility. if(window.XMLHttpRequest)//Objectofthecurrentwindows { request=newXMLHttpRequest();//Firefox,Safari... } else if(window.ActiveXObject)//ActiveXversion { request=newActiveXObject("Microsoft.XMLHTTP");//InternetExplorer } AsamplecodeforcreatinganinstanceofXMLHttpRequest,the"request"object 3.1.7.2. Wait Theresponseandfurtherprocessingareincludedinafunctionandthereturnofthe functionwillbeassignedtotheonreadystatechangeattributeoftheobjectpreviouslycreated. request.onreadystatechange=function(){//instructionstoprocesstheresponse}; if(request.readyState==4) { //received,OK }else { //wait... }

11 3.1.7.3. Sendtherequest TwomethodsofXMLHttpRequestareused: open:commandGETorPOST,URLofthedocument,trueforasynchronous. send:withPOSTonly,thedatatosendtotheserver. Therequestbelowreadadocumentontheserver. http_request.open('GET','http://www.ceng.metu.edu.tr/seniorproject.xml',true); http_request.send(null);

3.1.8. Examples 3.1.8.1. Getatext ThisisanexampletogetatextandsyntaxofformusingAjax Iftogivesomecommentsonthecodeabove: newActiveXObject(Microsoft.XMLHTTP) ThisconstructorisforInternetExplorer. newXMLHttpRequest() Thisconstructorisforanyotherbrowserincluding. http.onreadystatechange Ananonymousfunctionisassignedtotheeventindicator. http.readyState==4 The4statemeansfortheresponseisreadyandsentbytheserver. http.status==200 Thisstatusmeansok,otherwisesomeerrorcodeisreturned,404forexample. http.open(“POST","data.xml",true);

13 POSTorGET URLofthescripttoexecute. trueforasynchronous(falseforsynchronous). http.setRequestHeader("ContentType","application/xwwwformurlencoded"); ThisisforPOSTonly. http.send(document.getElementById("TYPEDTEXT").value); Senddatatotheserver.Datacomesfromthe"TYPEDTEXT"variablefilledthrought theformbytheuser. 3.1.8.2. Getfromxml Togetdatafromanxmlfilewehavejusttoreplacethisline: document.ajax.dyn=""Received:"+req.responseText; bythiscode: vardoc=req.responseXML;//assigntheXmlfiletoavar varelement=doc.getElementsByTagName('root').item(0);//readthefirstelementwith adom'smethod document.ajax.dyn.value=element.firstChild.data;//assignthecontentoftheelementto theform 3.1.8.3. Writetobody Inthecodesegmentgivenabove,thetextreadisputinthebodyofthepage,andnotinto atextfield.Thecodebelowreplacesthetextfieldformobjectandthesecondpartreplacesthe assignmentintotheJavaScriptfunction. ...sometexttoreplace...