Ruby and PHP Development: a Comparative Study of Development and Application Using Content Management Systems Refinerycms and Concrete5
Total Page:16
File Type:pdf, Size:1020Kb
Teknik och samhälle Datavetenskap Examensarbete 15 högskolepoäng, grundnivå Ruby and PHP Development: A Comparative study of Development and Application using Content Management Systems RefineryCMS and Concrete5 Ruby och PHP Utveckling: En jämförande studie av utveckling och applicering med content management systemen RefineryCMS och Concrete5 Melinda Dinh Examen: Kandidatexamen 180hp Handledare: Kristina von Hausswolff Huvudämne: Datavetenskap Andrabedömare: Naisan Farid Program: Data-telekom Datum för slutseminarie: 140827 ii Abstract With many options to choose from when designing and developing websites, it can be difficult for a beginner developer to know what to choose. This thesis compares how easy it is for a beginner to learn and use the two Content Management Systems (CMS) Concrete5 and RefineryCMS to build a web application. Concrete5 uses PHP and RefineryCMS uses Ruby and the ease of learning the basics of these programming languages is also discussed. To compare the two CMSs, different steps were documented and compared. The implementation was done on a MacBook Pro, OS X 10.9.2, late 2011 model. Relevant features were also compared according to the Authoring Tool Accessibility Guidelines 2.0. The results showed a significant difference between the two CMSs, even though both had their benefits and drawbacks. In conclusion, Concrete5 was better for building a basic website under the writer’s conditions, thanks to the many features, modules, packages, plugins and templates available, and because it required less time and effort to install. This conclusion is limited to the writer’s conditions and it is possible that RefineryCMS could have worked better than found, if the conditions had been different. iii iv Sammandrag Med flera alternativ att välja mellan för att designa och utveckla webbsidor kan det vara svårt för en nybörjarutvecklare att veta vad man ska välja. Detta examensarbete jämför hur enkelt det är för en nybörjare att lära sig och använda de två Content Management Systemen (CMS) Concrete5 och RefineryCMS för att bygga en webbapplikation. Concrete5 använder PHP och RefineryCMS använder Ruby och lättheten i att lära sig grunderna i dessa programmeringsspråk diskuteras också. För att jämföra dessa två CMS, dokumenterades olika steg. Implementationen utfördes på en MacBook Pro, OS X 10.9.2, sen 2011 modell. Relevanta delar av funktionaliteten jämfördes även med hjälp av Authoring Tool Accessibility Guidelines 2.0. Resultaten visade en signifikant skillnad mellan de två CMS:en, även om båda har sina för- och nackdelar. Sammanfattningsvis ansågs Concrete5 som det CMS:et med bättre aspekter för att bygga en enkel hemsida med de förutsättningar som fanns och tack vare de många funktioner det erbjöd användaren. RefineryCMS kanske kunde ha fungerat bättre om det var under andra förutsättningar, vilket inte kan dras som en slutsats i denna uppsats. v Acknowledgements I would like to thank Kristina von Hausswolff for her help and guidance throughout this thesis. I would also like to thank Kibria Ali who participated as co-observer in the observation sessions. vi Table of contents 1. INTRODUCTION .......................................................................................................................................... 1 1.1. BACKGROUND .............................................................................................................................................................. 1 1.2. THE QUESTION ............................................................................................................................................................ 2 1.3. PURPOSE ....................................................................................................................................................................... 2 1.4. LIMITATIONS ................................................................................................................................................................ 2 1.5. #GRATEFUL365 ......................................................................................................................................................... 3 2. THEORY ........................................................................................................................................................ 4 2.1. PHP ............................................................................................................................................................................... 4 2.2. RUBY ON RAILS ............................................................................................................................................................ 4 2.3. MVC CYCLE .................................................................................................................................................................. 5 2.4. CONTENT MANAGEMENT SYSTEMS .......................................................................................................................... 6 3. PRIOR WORK ............................................................................................................................................... 8 4. METHODS ..................................................................................................................................................... 9 4.1. CASE STUDIES .............................................................................................................................................................. 9 4.2. COMPARATIVE STUDIES .......................................................................................................................................... 10 4.3. AUTHORING TOOL ACCESSIBILITY GUIDELINES 2.0 ......................................................................................... 11 4.4. METHODS DISCUSSION AND CREDIBILITY ............................................................................................................ 11 5. RESULTS ..................................................................................................................................................... 12 5.1. DESIGN SPECIFICATION OF #GRATEFUL365 ...................................................................................................... 12 5.2. IMPLEMENTATION OF #GRATEFUL365 .............................................................................................................. 13 5.3. CASE 1 - CONCRETE5 .............................................................................................................................................. 13 5.4. CASE 2 - REFINERYCMS ......................................................................................................................................... 15 5.5. COMPARISON TABLE ................................................................................................................................................ 18 6. DISCUSSION ............................................................................................................................................... 22 7. CONCLUSION ............................................................................................................................................. 23 8. RECOMMENDATIONS FOR FUTURE WORK ..................................................................................... 24 vii viii List of figures Figure 1: The MVC cycle .............................................................................................................................................................................. 6 Figure 2: Concrete5 pre-content ........................................................................................................................................................... 14 Figure 3: Concrete5 editing and adding subpage ......................................................................................................................... 15 Figure 4: RefineryCMS changing sitename ...................................................................................................................................... 17 List of tables Table 1: Websites using PHP ..................................................................................................................................................................... 4 Table 2: Comparative table of Concrete5 and RefineryCMS .................................................................................................... 19 List of abbreviations AMP Apache MySQL PHP CMS Content Management System CoC Convention over Configuration DRY Don’t Repeat Yourself Full-stack Customizable on every layer Gem Extension for Ruby Hashtag Metadata tag Htaccess HyperText Access HTML Hypertext Markup Language IIS Internet Information Server JSON JavaScript Object Notation MAMP Mac Apache MySQL PHP MVC Model View Controller OAuth Authorization Framework Open-source Universal access and contribution in development projects PC Personal Computer PHP PHP: Hypertext Processor SEO Search Engine Optimization URL Uniform Resource Locators XML Extensible Markup Language ix 1. Introduction As usage of the Internet is increasing, so are the content management systems (CMS) for creating webpages. Today, there is a wide range of different CMSs to choose from, based on different kinds of frameworks, programming languages and purpose. A different approach to using a premade CMS is to create your own CMS, as Simpson (2005) pursued in his comparative study on a range