Developing a Cms Php Framework with Symfony

Total Page:16

File Type:pdf, Size:1020Kb

Developing a Cms Php Framework with Symfony 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
Recommended publications
  • Patrick Sweeney Resume
    Patrick Sweeney Integration Specialist/Full Stack Web Developer 20 North State Street, 814-331-6059 [email protected] Warren, PA, 16365 OBJECTIVE My objective is to find a new position as a full stack web developer. I have over a decade of experience with many different web development technologies, and would love to bring my talent to a new team. EDUCATION — EXPERIENCE Empire State College ‘13 October 2012 - Present Associate of Science Full Stack Web Developer / Integration Specialist • Digitell, Inc. My team and I built the Opus online LMS. I am the integration PROFILE S — specialist, so I built out the endpoints that we use to consume data https://github.com/blueshift9 from our clients and to send data back to them. In addition to taking the lead on integrations, I’ve built many different modules of SKILLS — functionality. This included modules for forums, shopping carts, PHP (Frameworks: Laravel, event pages, user evaluation and testing, and reporting. My team Symfony, FuelPHP) has built numerous mobile applications for clients, based on Flutter. MySQL/MariaDB I have built “all-in-one” USB drives with audio and video. Trained Javascript and jQuery internal users on how to use tools, used feedback to design the HTML5 and CSS best tools. I deployed new code, and followed the Agile Linux Administration methodology. I also paired with co-workers in a remote Git and Github Version Control environment. Vue.js / React Mobile App Development Dart (Flutter Framework) January 2012 – October 2012 Login Integration (Salesforce, Web Developer • CJ’s Home Décor and Fireplaces Absorb, NetForum) I maintained the approximately 10 websites that CJ’s ran, designed CSS Frameworks / Preprocessors and deployed new sites, and maintained the servers and IT (Bootstrap, Foundation, Tailwind, infrastructure.
    [Show full text]
  • Security Issues and Framework of Electronic Medical Record: a Review
    Bulletin of Electrical Engineering and Informatics Vol. 9, No. 2, April 2020, pp. 565~572 ISSN: 2302-9285, DOI: 10.11591/eei.v9i2.2064 565 Security issues and framework of electronic medical record: A review Jibril Adamu, Raseeda Hamzah, Marshima Mohd Rosli Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA, Malaysia Article Info ABSTRACT Article history: The electronic medical record has been more widely accepted due to its unarguable benefits when compared to a paper-based system. As electronic Received Oct 30, 2019 medical record becomes more popular, this raises many security threats Revised Dec 28, 2019 against the systems. Common security vulnerabilities, such as weak Accepted Feb 11, 2020 authentication, cross-site scripting, SQL injection, and cross-site request forgery had been identified in the electronic medical record systems. To achieve the goals of using EMR, attaining security and privacy Keywords: is extremely important. This study aims to propose a web framework with inbuilt security features that will prevent the common security vulnerabilities CodeIgniter security in the electronic medical record. The security features of the three most CSRF popular and powerful PHP frameworks Laravel, CodeIgniter, and Symfony EMR security issues were reviewed and compared. Based on the results, Laravel is equipped with Laravel security the security features that electronic medical record currently required. SQL injection This paper provides descriptions of the proposed conceptual framework that Symfony security can be adapted to implement secure EMR systems. Top vulnerabilities This is an open access article under the CC BY-SA license. XSS Corresponding Author: Jibril Adamu, Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA, 40450 Shah Alam, Selangor, Malaysia.
    [Show full text]
  • Modern Web Application Frameworks
    MASARYKOVA UNIVERZITA FAKULTA INFORMATIKY Û¡¢£¤¥¦§¨ª«¬­Æ°±²³´µ·¸¹º»¼½¾¿Ý Modern Web Application Frameworks MASTER’S THESIS Bc. Jan Pater Brno, autumn 2015 Declaration Hereby I declare, that this paper is my original authorial work, which I have worked out by my own. All sources, references and literature used or ex- cerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Bc. Jan Pater Advisor: doc. RNDr. Petr Sojka, Ph.D. i Abstract The aim of this paper was the analysis of major web application frameworks and the design and implementation of applications for website content ma- nagement of Laboratory of Multimedia Electronic Applications and Film festival organized by Faculty of Informatics. The paper introduces readers into web application development problematic and focuses on characte- ristics and specifics of ten selected modern web application frameworks, which were described and compared on the basis of relevant criteria. Practi- cal part of the paper includes the selection of a suitable framework for im- plementation of both applications and describes their design, development process and deployment within the laboratory. ii Keywords Web application, Framework, PHP,Java, Ruby, Python, Laravel, Nette, Phal- con, Rails, Padrino, Django, Flask, Grails, Vaadin, Play, LEMMA, Film fes- tival iii Acknowledgement I would like to show my gratitude to my supervisor doc. RNDr. Petr So- jka, Ph.D. for his advice and comments on this thesis as well as to RNDr. Lukáš Hejtmánek, Ph.D. for his assistance with application deployment and server setup. Many thanks also go to OndˇrejTom for his valuable help and advice during application development.
    [Show full text]
  • Design Patterns in PHP and Laravel — Kelt Dockins Design Patterns in PHP and Laravel
    Design Patterns in PHP and Laravel — Kelt Dockins Design Patterns in PHP and Laravel Kelt Dockins [email protected] Design Patterns in PHP and Laravel Kelt Dockins Dolph, Arkansas USA ISBN-13 (pbk): 978-1-4842-2450-2 ISBN-13 (electronic): 978-1-4842-2451-9 DOI 10.1007/978-1-4842-2451-9 Library of Congress Control Number: 2016961807 Copyright © 2017 by Kelt Dockins This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made.
    [Show full text]
  • Vulnerable Web Application Framework
    University of Rhode Island DigitalCommons@URI Open Access Master's Theses 2015 Vulnerable Web Application Framework Nicholas J. Giannini University of Rhode Island, [email protected] Follow this and additional works at: https://digitalcommons.uri.edu/theses Recommended Citation Giannini, Nicholas J., "Vulnerable Web Application Framework" (2015). Open Access Master's Theses. Paper 629. https://digitalcommons.uri.edu/theses/629 This Thesis is brought to you for free and open access by DigitalCommons@URI. It has been accepted for inclusion in Open Access Master's Theses by an authorized administrator of DigitalCommons@URI. For more information, please contact [email protected]. VULNERABLE WEB APPLICATION FRAMEWORK BY NICHOLAS J. GIANNINI A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN COMPUTER SCIENCE AND STATISTICS UNIVERSITY OF RHODE ISLAND 2015 MASTER OF SCIENCE THESIS OF NICHOLAS GIANNINI APPROVED: Thesis Committee: Major Professor Victor Fay-Wolfe Lisa DiPippo Haibo He Nasser H. Zawia DEAN OF THE GRADUATE SCHOOL UNIVERSITY OF RHODE ISLAND 2015 ABSTRACT Utilizing intentionally vulnerable web applications to teach and practice cyber security principles and techniques provides a unique hands-on experience that is otherwise unobtainable without working in the real world. Creating such applications that emulate those of actual businesses and organizations without exposing actual businesses to inadvertent security risks can be a daunting task. To address these issues, this project has created Porous, an open source framework specifically for creating intentionally vulnerable web applications. The implementation of Porous offers a simplified approach to building realistic vulnerable web applications that may be tailored to the needs of specific cyber challenges or classroom exercises.
    [Show full text]
  • 1 Introducing Symfony, Cakephp, and Zend Framework
    1 Introducing Symfony, CakePHP, and Zend Framework An invasion of armies can be resisted, but not an idea whose time has come. — Victor Hugo WHAT’S IN THIS CHAPTER? ‰ General discussion on frameworks. ‰ Introducing popular PHP frameworks. ‰ Design patterns. Everyone knows that all web applications have some things in common. They have users who can register, log in, and interact. Interaction is carried out mostly through validated and secured forms, and results are stored in various databases. The databases are then searched, data is processed, and data is presented back to the user, often according to his locale. If only you could extract these patterns as some kind of abstractions and transport them into further applications, the developmentCOPYRIGHTED process would be much MATERIAL faster. This task obviously can be done. Moreover, it can be done in many different ways and in almost any programming language. That’s why there are so many brilliant solutions that make web development faster and easier. In this book, we present three of them: Symfony, CakePHP, and Zend Framework. They do not only push the development process to the extremes in terms of rapidity but also provide massive amounts of advanced features that have become a must in the world of Web 2.0 applications. cc01.indd01.indd 1 11/24/2011/24/2011 55:45:10:45:10 PPMM 2 x CHAPTER 1 INTRODUCING SYMFONY, CAKEPHP, AND ZEND FRAMEWORK WHAT ARE WEB APPLICATION FRAMEWORKS AND HOW ARE THEY USED? A web application framework is a bunch of source code organized into a certain architecture that can be used for rapid development of web applications.
    [Show full text]
  • Krahasimi I Framework-Ave Zend Framework Dhe Laravel Ne PHP
    University of Business and Technology in Kosovo UBT Knowledge Center Theses and Dissertations Student Work Summer 7-2020 Krahasimi i Framework-ave Zend Framework dhe Laravel ne PHP Gentrit Gruda Follow this and additional works at: https://knowledgecenter.ubt-uni.net/etd Part of the Computer Sciences Commons Programi për Shkenca Kompjuterike dhe Inxhinierise Krahasimi i Framework-ave Zend Framework dhe Laravel ne PHP Shkalla Bachelor Gentrit Gruda Korrik / 2020 Prishtinë Programi për Shkenca Kompjuterike dhe Inxhinierise Punim Diplome Viti akademik 2013 – 2014 Gentrit Gruda Krahasimi i Framework-ave Zend Framework dhe Laravel ne PHP Mentor: MSc. Betim Gashi Korrik / 2020 Ky punim është përpiluar dhe dorëzuar në përmbushjen e kërkesave të pjesshme për Shkallën Bachelor ABSTRAKT Zhvillimi i Teknologjive i cili sa vjen e rritet, bien më vetë një nevojë e cila është që çdo gjë që zhvillohën, të zhvillohën më shpejtë, më stabil dhe më pak probleme. Pikërisht këtë problem disa individë më idetë e tyre mundohën ta largojnë duke zhvilluar framework-a të cilat na ndihmojnë të zhvillojmë webfaqe apo aplikacion sa më shpejtë që të jetë e mundur, por duke mos anashkaluar cilësinë dhe saktësinë në vetë. Kur zhvillohën kësi framework-a, zhvillohën që të lehtësohet puna e një zhvilluesi, duke i ndihmuar dhe lehtësuar futjen e të dhënave në bazën e shënimeve, krijimin e aplikacioneve etj. Për të lehtësuar punën, shumë kompani dhe zhvilluës kanë krijuar vegla dhe framework-at në mënyrë që të bëjnë më të lehtë punën e zhvilluësve. Dy framework-at më të njohura aktualisht janë Laravel dhe Zend, të cilat kanë ofruar zgjidhjët e tyre për zhvillimin e aplikacioneve të vogla, të mesme dhe të mëdha.
    [Show full text]
  • Implementación De Framework De Desarrollo Web Durante Un Proyecto”
    UNIVERSIDAD POLITÉCNICA DE SINALOA PROGRAMA ACADÉMICO DE INGENIERÍA EN INFORMÁTICA Tesina “Implementación de Framework de desarrollo web durante un proyecto” Para obtener la acreditación de las estadías profesionales y contar con los créditos para el grado de Ingeniero en Informática. Autor: Bernal Corral Daniel Asesor: M. C. Alejandro Pérez Pasten Borja Asesor OR: Ing. Omar Vidaña Peraza Mazatlán, Sinaloa 13 de Diciembre del 2019 Agradecimientos Agradezco a mis padres por brindarme todo su apoyo durante mis estudios, por darme las clases más importantes, por haber hecho posible que llegara a este momento, por enseñarme que no siempre todo sale perfecto y que debo esforzarme para obtener lo que quiero, por darme ánimos para seguir, por preocuparse por mí y esforzarse para que mi vida fuera mejor. A mi asesor por aconsejarme y corregir los errores que cometí durante el desarrollo de la tesina, por tomarse el tiempo para ver cada detalle y hacer recomendaciones, sugerir opciones, etc. A mi hermano por ayudarme a no rendirme, por asumir su rol de hermano mayor y tratar de guiar, por preocuparse por mí y ayudarme siempre que lo he necesitado. A los profesores que he tenido a lo largo de mis estudios y que me aportaron un poco de su conocimiento para enriquecer el mío. A todos mis compañeros que me ayudaron a hacer más amenas las clases. 6 ÍNDICE TEMÁTICO Índice de imágenes. 9 Resumen. ….. .11 Abstract. …. .11 Introducción. 11 Capítulo I. .. ... …12 1. Antecedentes. .. 13 1.1. Localización. .. ….. 13 1.2. Objetivos de la institución. …………….. 13 1.3. Visión. .14 1.4.
    [Show full text]
  • Cakephp Cookbook Documentation Release 4.X
    CakePHP Cookbook Documentation Release 4.x Cake Software Foundation Sep 25, 2021 Contents 1 CakePHP at a Glance 1 Conventions Over Configuration........................................1 The Model Layer................................................1 The View Layer.................................................2 The Controller Layer..............................................2 CakePHP Request Cycle............................................3 Just the Start...................................................4 Additional Reading...............................................4 2 Quick Start Guide 13 Content Management Tutorial......................................... 13 CMS Tutorial - Creating the Database..................................... 15 CMS Tutorial - Creating the Articles Controller................................ 19 3 4.0 Migration Guide 29 Deprecated Features Removed......................................... 29 Deprecations.................................................. 29 Breaking Changes................................................ 31 New Features.................................................. 37 4 Tutorials & Examples 41 Content Management Tutorial......................................... 41 CMS Tutorial - Creating the Database..................................... 43 CMS Tutorial - Creating the Articles Controller................................ 47 CMS Tutorial - Tags and Users......................................... 56 CMS Tutorial - Authentication......................................... 64 CMS Tutorial - Authorization.........................................
    [Show full text]
  • Development of a Blog System Using Codeigniter Framework
    Li Yicheng Development of a blog system using CodeIgniter framework Development of a blog system using CodeIgniter framework Li Yicheng Bachelor‟s thesis Spring 2011 Degree Programme in Business Information Technology Oulu University of Applied Sciences Abstract School: Oulu University of Applied Sciences Programme: Degree Programme in Business Information Technology Author: Li Yicheng Supervisor: Matti Viitala The title of thesis: Development of a blog system using CodeIgniter framework Year: 2011 Number of pages + number of appendices: 59 This thesis is project based thesis. It is a simple blog system. In the thesis will introduces the development blog background and discuss the design and development platform targets, set out the structure of the website and the function modules and introduce how to build this system step by step. The whole system can be divided into three parts: Information services, Album service, Message service. However, due to the large size of the project, It cannot be explained how to make it step and step. So in this thesis will be focus more on the main part. In the theory part, will be discussed the exactly advantages of those programming language which will be used in the project. In the tutorial part, will be introduced how to build this blog system. Use the programming codes and pictures which from the project to describe clearly. This purpose of this bachelor‟s thesis is to introduce the advantages and techniques of PHP framework (CodeIgniter) and jQuery. Another purpose is to build an example system which is using PHP framework and jQuery to student who want to learn more about programming.
    [Show full text]
  • Symfony2 Docs Documentation Release 2
    Symfony2 Docs Documentation Release 2 Sensio Labs January 10, 2016 Contents 1 Quick Tour 1 1.1 Quick Tour................................................1 2 Book 23 2.1 Book................................................... 23 3 Cookbook 263 3.1 Cookbook................................................ 263 4 Components 455 4.1 The Components............................................. 455 5 Reference Documents 491 5.1 Reference Documents.......................................... 491 6 Bundles 617 6.1 Symfony SE Bundles........................................... 617 7 Contributing 619 7.1 Contributing............................................... 619 i ii CHAPTER 1 Quick Tour Get started fast with the Symfony2 Quick Tour: 1.1 Quick Tour 1.1.1 The Big Picture Start using Symfony2 in 10 minutes! This chapter will walk you through some of the most important concepts behind Symfony2 and explain how you can get started quickly by showing you a simple project in action. If you’ve used a web framework before, you should feel right at home with Symfony2. If not, welcome to a whole new way of developing web applications! Tip: Want to learn why and when you need to use a framework? Read the “Symfony in 5 minutes” document. Downloading Symfony2 First, check that you have installed and configured a Web server (such as Apache) with PHP 5.3.2 or higher. Ready? Start by downloading the “Symfony2 Standard Edition”, a Symfony distribution that is preconfigured for the most common use cases and also contains some code that demonstrates how to use Symfony2 (get the archive with the vendors included to get started even faster). After unpacking the archive under your web server root directory, you should have a Symfony/ directory that looks like this: www/ <- your web root directory Symfony/ <- the unpacked archive app/ cache/ config/ logs/ Resources/ bin/ src/ Acme/ DemoBundle/ Controller/ Resources/ ..
    [Show full text]
  • Web Development Frameworks Ruby on Rails VS Google Web Toolkit
    Bachelor thesis Web Development Frameworks Ruby on Rails VS Google Web Toolkit Author: Carlos Gallardo Adrián Extremera Supervisor: Welf Löwe Semester: Spring 2011 Course code: 2DV00E SE-391 82 Kalmar / SE-351 95 Växjö Tel +46 (0)772-28 80 00 [email protected] Lnu.se/dfm Abstract Web programming is getting more and more important every day and as a consequence, many new tools are created in order to help developers design and construct applications quicker, easier and better structured. Apart from different IDEs and Technologies, nowadays Web Frameworks are gaining popularity amongst users since they offer a large range of methods, classes, etc. that allow programmers to create and maintain solid Web systems. This research focuses on two different Web Frameworks: Ruby on Rails and Google Web Toolkit and within this document we will examine some of the most important differences between them during a Web development. Keywords web frameworks, Ruby, Rails, Model-View-Controller, web programming, Java, Google Web Toolkit, web development, code lines i List of Figures Figure 2.1. mraible - History of Web Frameworks....................................................4 Figure 2.2. Java BluePrints - MVC Pattern..............................................................6 Figure 2.3. Libros Web - MVC Architecture.............................................................7 Figure 2.4. Ruby on Rails - Logo.............................................................................8 Figure 2.5. Windaroo Consulting Inc - Ruby on Rails Structure.............................10
    [Show full text]