Developing a Cms Php Framework with Symfony
Total Page:16
File Type:pdf, Size:1020Kb
CALIFORNIA STATE UNIVERSITY, NORTHRIDGE DEVELOPING A CMS PHP FRAMEWORK WITH SYMFONY A thesis submitted in partial fulfillment of the requirements For the degree of Master of Science in Software Engineering by Justin Khoi Bao Han-Nguyen December 2016 Copyright © Justin Khoi Bao Han-Nguyen 2016 All Rights Reserved ii The thesis of Justin Khoi Bao Han-Nguyen has been approved by: Professor Richard Covington Date Approved Professor Li Liu Date Approved Professor Taehyung “George” Wang, chair Date Approved California State University, Northridge iii PREFACE This thesis is submitted for the degree of Master of Science in Software Engineering at the California State University at Northridge. The work described herein was done under the supervision and advice of a committee headed by Professor Taehyung “George” Wang in the department of Computer Science between January 2016 and December 2016. This work is done for the purpose of creating an easy to use PHP framework for web developers looking to develop Content Management Systems (CMS). Since most PHP frameworks are made generically, there is nothing focused for CMS development. This work is original to the best of my knowledge, except where acknowledgements and references are made. Justin Khoi Bao Han-Nguyen December 2016 iv ACKNOWLEDGEMENTS I would like to thank my committee chair, Professor Taehyung “George” Wang, for his support and supervision. I would like to thank my committee members, Professor Richard Covington and Professor Li Liu, for taking their time to be available to help me with my thesis, providing me their valuable input and ideas. I would like to thank the friends and peers whom I’ve met at the College of Engineering and Computer Science at the California State University at Northridge for providing me with Finally, I would also like to thank my family and friends for supporting me with my decision to give up my pursuit of a medical degree in order to pursue my passion in programming and engineering. v TABLE OF CONTENTS Copyright ............................................................................................................................ ii Signature Page ................................................................................................................... iii Preface................................................................................................................................ iv Acknowledgements ..............................................................................................................v List of Figures .................................................................................................................. viii Abstract .............................................................................................................................. ix CHAPTER 1 INTRODUCTION .........................................................................................1 1.1 The Objectives ...................................................................................................1 1.2 The Motivations .................................................................................................2 1.3 The Approach.....................................................................................................2 1.4 The Tools ...........................................................................................................3 1.5 The Next Chapters .............................................................................................3 CHAPTER 2 REVIEW OF POPULAR PHP FRAMEWORKS .........................................5 2.1 The Common Problem .......................................................................................5 2.2 Laravel Framework ............................................................................................5 2.3 CakePHP Framework.........................................................................................6 2.4 CodeIgniter Framework .....................................................................................7 2.5 Why Symfony? ..................................................................................................8 CHAPTER 3 THE REQUIREMENTS ..............................................................................10 3.1 Who Are the Users? .........................................................................................10 3.2 Gathering Requirements ..................................................................................10 3.3 Functional Requirements .................................................................................11 3.4 Non-functional Requirements ..........................................................................11 CHAPTER 4 FRAMEWORK DESIGN ............................................................................13 4.1 Design Decisions and Structure .......................................................................13 4.2 High Level Overview .......................................................................................15 4.3 Inside the Code ................................................................................................16 4.4 Behind the Reasoning ......................................................................................17 vi CHAPTER 5 TESTING PROCESS ..................................................................................19 5.1 Codeception .....................................................................................................19 5.2 PHPUnit ...........................................................................................................20 5.3 SimpleTest .......................................................................................................21 5.4 Our Testing Process .........................................................................................21 CHAPTER 6 TOOLS AND TECHNOLOGIES ...............................................................23 6.1 XAMPP ............................................................................................................23 6.2 Atom.io for Text Editing..................................................................................24 6.3 Dreamweaver CS 5 ..........................................................................................25 6.4 Google Chrome for Debugging .......................................................................26 6.5 Toad for MySQL..............................................................................................27 6.6 Symfony PHP Reference Documentation ........................................................28 CHAPTER 7 IMPACT ON END USER ...........................................................................29 7.1 Level of Experience Required .........................................................................29 7.2 Installation Method ..........................................................................................30 7.3 Value to the End User ......................................................................................31 7.4 Value to the Project Stakeholders ....................................................................33 7.5 Possible Value ..................................................................................................34 CHAPTER 8 THE FINALE ..............................................................................................35 8.1 The Problems ...................................................................................................35 8.2 Thoughts on the Project ...................................................................................36 8.3 Future Work .....................................................................................................37 8.4 Conclusion .......................................................................................................39 WORKS CITED ................................................................................................................41 APPENDIX A: GLOSSARY .............................................................................................43 APPENDIX B: CODE EXCERPT OF SELECT API CALL ............................................44 vii LIST OF FIGURES 4.1 CMS Framework UML Diagram ...........................................................................14 4.2 CMS Database Object UML Diagram ...................................................................14 4.3 High Level Overview of the Framework ...............................................................15 4.4 Framework Instantiation Code ...............................................................................16 4.5 Excerpt of code from Select API Call ....................................................................17 6.1 XAMPP Control Panel ...........................................................................................24 6.2 Atom.io UI .............................................................................................................25 6.3 Dreamweaver CS 5 ................................................................................................26 6.4 Google Chrome Developer Tools for Debugging ..................................................27 6.5 Toad for MySQL....................................................................................................28 7.1 Using createtable controller to create a new table .................................................32 7.2 Sample Code of API Calls .....................................................................................32