近年來由於雲端運算的技術發展迅速,促使軟體開發者運用雲端運算的優勢將Web應用程式遷移至雲端上,讓使用者能夠依個別需要選擇自行安裝或使用其雲端的服務。為因應遷移所需,團隊可運用重構現有軟體架構的方式,以減低團隊重複開發軟體元件的負擔。然而,由於各雲端平台提供的資料庫類型有所不同,將Web應用程式遷移至雲端平台時,經常為了增加新的需求而破壞現有軟體的架構,導致維護成本提高。本論文以系統欲加入多租戶的概念為依據,針對Web應用程式資料庫遷移至雲端平台提出一個重構方法,供團隊能藉以重構其Web應用程式,增加遷移系統的程式碼重複使用率,並降低團隊使用面向導向程式技術完成多租戶的系統需求的人力成本。本論文以一個Java Web應用程式- ezScrum遷移至Google App Engine為案例,驗證此重構方法的可行性。
To benefit from multi-tenant cloud computing, web applications can be migrated to a suitable cloud platform. In so doing, certain aspects in the existing web application need to be changed. In this thesis, we consider the problem of database migration to support multi-tenancy. Refactoring is performed to get the web application ready for applying aspect-oriented programming for introducing the multi-tenancy features. As demonstrated with the case of migrating Java web application ezScrum to Google App Engine, good code reuse can be achieved by applying the proposed method.