{"id":{"repo_id":"ubc","oai_identifier":"oai:circle.library.ubc.ca:2429/56290"},"canonical_url":"https://search.ndltd.org/etd/ubc/oai:circle.library.ubc.ca:2429/56290","repository":{"repo_id":"ubc","name":"University of British Columbia","base_url":"http://circle.library.ubc.ca/oai/request"},"display":{"title":"Characterizing and refactoring asynchronous JavaScript callbacks","abstract":"Modern web applications make extensive use of JavaScript, which is now estimated to be one of the most widely used languages in the world. Callbacks are a popular language feature in JavaScript. However, they are also a source of comprehension and maintainability issues. We studied several features of callback usage across a large number of JavaScript applications and found out that over 43 of all callback-accepting function call sites are anonymous, the majority of callbacks are nested, and more than half of all callbacks are invoked asynchronously. Promises have been introduced as an alternative to callbacks for composing complex asynchronous execution flow and as a robust mechanism for error checking in JavaScript. We use our observations of callback usage to build a developer tool that refactors asynchronous callbacks into Promises. We show that our technique and tool is broadly applicable to a wide range of JavaScript applications.","abstract_html":"Modern web applications make extensive use of JavaScript, which is now estimated to be one of the most widely used languages in the world. Callbacks are a popular language feature in JavaScript. However, they are also a source of comprehension and maintainability issues. We studied several features of callback usage across a large number of JavaScript applications and found out that over 43 of all callback-accepting function call sites are anonymous, the majority of callbacks are nested, and more than half of all callbacks are invoked asynchronously. Promises have been introduced as an alternative to callbacks for composing complex asynchronous execution flow and as a robust mechanism for error checking in JavaScript. We use our observations of callback usage to build a developer tool that refactors asynchronous callbacks into Promises. We show that our technique and tool is broadly applicable to a wide range of JavaScript applications.","abstract_has_math":false,"creators":["Gallaba, Keheliya"],"institution":"University of British Columbia","degree_name":"Master of Applied Science - MASc","degree_level":"master's","degree_discipline":"Electrical and Computer Engineering","degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2015,"date_issued":"2015","date_published":"2015","updated_at":"2026-11-19T15:00:11Z","subjects":[],"languages":["eng"],"rights":["Attribution-NonCommercial-ShareAlike 2.5 Canada"],"rights_urls":["http://creativecommons.org/licenses/by-nc-sa/2.5/ca/"],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"http://hdl.handle.net/2429/56290","outbound_label":"Handle","outbound_source":"dc:identifier","record_url":"http://hdl.handle.net/2429/56290","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier","download_url":"http://circle.library.ubc.ca/bitstream/2429/56290/1/ubc_2016_february_gallaba_keheliya.pdf","download_label":"Download PDF","download_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"http://circle.library.ubc.ca/oai/request?verb=GetRecord&metadataPrefix=etdms&identifier=oai%3Acircle.library.ubc.ca%3A2429%2F56290","prefix":"etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Gallaba, Keheliya"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2015"]},{"key":"dc:publisher","label":"Institution","values":["University of British Columbia"]},{"key":"dc:type","label":"Dc Type","values":["Text"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Electrical and Computer Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["master's"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Applied Science - MASc"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of British Columbia"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["http://creativecommons.org/licenses/by-nc-sa/2.5/ca/","Attribution-NonCommercial-ShareAlike 2.5 Canada"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["http://hdl.handle.net/2429/56290","http://circle.library.ubc.ca/bitstream/2429/56290/1/ubc_2016_february_gallaba_keheliya.pdf"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Modern web applications make extensive use of JavaScript, which is now estimated to be one of the most widely used languages in the world. Callbacks are a popular language feature in JavaScript. However, they are also a source of comprehension and maintainability issues. We studied several features of callback usage across a large number of JavaScript applications and found out that over 43 of all callback-accepting function call sites are anonymous, the majority of callbacks are nested, and more than half of all callbacks are invoked asynchronously. Promises have been introduced as an alternative to callbacks for composing complex asynchronous execution flow and as a robust mechanism for error checking in JavaScript. We use our observations of callback usage to build a developer tool that refactors asynchronous callbacks into Promises. We show that our technique and tool is broadly applicable to a wide range of JavaScript applications."]},{"key":"dc:format","label":"Dc Format","values":["616693","application/pdf"]},{"key":"dc:title","label":"Title","values":["Characterizing and refactoring asynchronous JavaScript callbacks"]}]}],"canonical_facts":{"dc:creator":["Gallaba, Keheliya"],"dc:date":["2015"],"dc:description":["Modern web applications make extensive use of JavaScript, which is now estimated to be one of the most widely used languages in the world. Callbacks are a popular language feature in JavaScript. However, they are also a source of comprehension and maintainability issues. We studied several features of callback usage across a large number of JavaScript applications and found out that over 43 of all callback-accepting function call sites are anonymous, the majority of callbacks are nested, and more than half of all callbacks are invoked asynchronously. Promises have been introduced as an alternative to callbacks for composing complex asynchronous execution flow and as a robust mechanism for error checking in JavaScript. We use our observations of callback usage to build a developer tool that refactors asynchronous callbacks into Promises. We show that our technique and tool is broadly applicable to a wide range of JavaScript applications."],"dc:format":["616693","application/pdf"],"dc:identifier":["http://hdl.handle.net/2429/56290","http://circle.library.ubc.ca/bitstream/2429/56290/1/ubc_2016_february_gallaba_keheliya.pdf"],"dc:language":["eng"],"dc:publisher":["University of British Columbia"],"dc:rights":["http://creativecommons.org/licenses/by-nc-sa/2.5/ca/","Attribution-NonCommercial-ShareAlike 2.5 Canada"],"dc:title":["Characterizing and refactoring asynchronous JavaScript callbacks"],"dc:type":["Text"],"thesis:degree_discipline":["Electrical and Computer Engineering"],"thesis:degree_level":["master's"],"thesis:degree_name":["Master of Applied Science - MASc"],"thesis:institution_name":["University of British Columbia"]},"updated_at":"2026-11-19T15:00:11Z"}