Evaluation of Web Application Frameworks Evaluation of Web Application Frameworks with Regards to Rapid Development
Total Page:16
File Type:pdf, Size:1020Kb
Evaluation of web application frameworks Evaluation of web application frameworks with regards to rapid development. Master of Science Thesis in Software Engineering and Technology MARTIN BJÖREMO PREDRAG TRNINIĆ Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering Göteborg, Sweden, June 2010 The Author grants to Chalmers University of Technology and University of Gothenburg the non-exclusive right to publish the Work electronically and in a non-commercial purpose make it accessible on the Internet. The Author warrants that he/she is the author to the Work, and warrants that the Work does not contain text, pictures or other material that violates copyright law. The Author shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agreement. If the Author has signed a copyright agreement with a third party regarding the Work, the Author warrants hereby that he/she has obtained any necessary permission from this third party to let Chalmers University of Technology and University of Gothenburg store the Work electronically and make it accessible on the Internet. Evaluation of web application frameworks Evaluation of web applications frameworks with regards to rapid development MARTIN BJÖREMO PREDRAG TRNINIĆ © MARTIN BJÖREMO, June 2010. © PREDRAG TRNINIĆ, June 2010. Examiner: SVEN-ARNE ANDREASSON Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering SE-412 96 Göteborg Sweden Telephone + 46 (0)31-772 1000 [Cover: Logos of frameworks evaluated in this report, from upper left to right; Ruby on Rails, Wicket, CakePHP, Stripes, Grails, Spring Roo.] Department of Computer Science and Engineering Göteborg, Sweden July 2010 Abstract This report focuses on evaluating several web application frameworks for use in rapid development. As there is a need for the possibility to deploy new applications in a short period of time there is also a need for a framework, which facilitates those demands. Creating an application from scratch would most likely be too time consuming and not very rapid. Thus the report will look closer at some of the application frameworks (CakePHP, Grails, Ruby on Rails, Stripes, Spring Roo and Wicket) to see what they have to offer and how they do it. The frameworks are evaluated based on six criteria (documentation and learning, convention over configuration, integrated development environment, internationalization (localization), user data input validation and testing) and one promising is chosen to be used to implement a web application. The conclusions of this evaluation are that there is no superior framework and one should not learn a new programming language just for using a recommended web framework. And also, one should choose framework wisely based on the size of one’s application and the scope of the application. Sammanfattning Denna rapport fokuserar på utvärdering av ett antal webbramverk för användning i snabb utveckling. Eftersom det finns ett behov av att kunna distribuera nya applikationer på kort tid finns det också ett behov av ramverk som underlättar detta krav. Skapa en webbapplikation från början skulle sannolikt bli alltför tidskrävande och inte särskilt snabb. Således kommer rapporten att se närmare på några av webbramverken som finns (CakePHP, Grails, Ruby on Rails, till Stripes, Spring Roo och Wicket) och se vad de har att erbjuda och hur de löser vissa tidskrävande uppgifter det. Ramverken bedöms utifrån sex kriterier (dokumentation och lärande, konvent över konfigurationen, integrerad utvecklingsmiljö, internationalisering (lokalisering), kontroll och validering av indata från användare) och ett lovande ramverk väljs ut för att användas för att skapa en webbapplikation. Slutsatserna i denna utvärdering är att det inte finns ett överlägset ramverk och man bör inte lära sig ett nytt programmeringsspråk bara för att använda en rekommenderat webbramverk. Dessutom bör man välja webbramverk noga baserat på storleken av ens webbapplikation och omfattningen av webbapplikationen. Acknowledgements This master’s thesis report has been written as the final part of the Master’s program Software Engineering and Technology at Chalmers University of Technology, Sweden 2010. The subject was chosen in cooperation with Logica in Gothenburg, where the thesis also has been performed. The writers of this report would like to thank their supervisor at Logica, Jesper Forslund, and at Chalmers, Sven-Arne Andreasson, for their support during this project. Martin Björemo Predrag Trninić Gothenburg, Sweden June 2010 Table of Contents 1. Introduction ....................................................................................................................... 1 1.2. About Logica ......................................................................................................................... 1 2. Background ........................................................................................................................ 2 2.1. What is a web framework? ................................................................................................... 2 2.2. Framework vs. libraries ......................................................................................................... 3 2.3. Degrees of activeness web frameworks ............................................................................... 4 2.4. Advantages of using a framework ......................................................................................... 4 2.5. Disadvantage of using a framework ...................................................................................... 5 2.6. Who should use a framework? ............................................................................................. 5 2.7. Rapid development ............................................................................................................... 6 3. Problem ............................................................................................................................. 7 3.1. Purpose .................................................................................................................................. 7 3.2. Scope ..................................................................................................................................... 7 4. Method .............................................................................................................................. 8 4.1. Investigation .......................................................................................................................... 8 4.2. Evaluation .............................................................................................................................. 8 4.3. Implementation ..................................................................................................................... 9 5. Evaluation Criteria ............................................................................................................ 10 5.1. Documentation and Learning .............................................................................................. 10 5.2. Convention over Configuration ........................................................................................... 10 5.3. Integrated Development Environment ............................................................................... 11 5.4. Internationalization (Localization) ...................................................................................... 11 5.5. Validation ............................................................................................................................ 11 5.6. Testing ................................................................................................................................. 11 5.7. Additional Criteria ............................................................................................................... 11 6. The Frameworks ............................................................................................................... 13 6.1. CakePHP .............................................................................................................................. 13 6.2. Grails .................................................................................................................................... 13 6.3. Ruby on Rails ....................................................................................................................... 13 6.4. Stripes .................................................................................................................................. 13 6.5. Spring Roo ........................................................................................................................... 13 6.6. Wicket .................................................................................................................................. 14 6.7. Other Frameworks .............................................................................................................. 14 7. Results .............................................................................................................................. 15 7.1. Documentation and Learning .............................................................................................. 15 7.1.1. CakePHP ......................................................................................................................