Building an Event Planning Web Application Using Yii2 Framework

Total Page:16

File Type:pdf, Size:1020Kb

Building an Event Planning Web Application Using Yii2 Framework CORE Metadata, citation and similar papers at core.ac.uk Provided by Theseus Phuong Nguyen BUILDING AN EVENT PLANNING WEB APPLICATION USING YII2 FRAMEWORK BUILDING AN EVENT PLANNING WEB APPLICATION USING YII2 FRAMEWORK Phuong Nguyen Thesis Autumn 2018 Business Information Technology Oulu University of Applied Sciences ABSTRACT Oulu University of Applied Sciences Business Information Technology Author(s): Phuong Nguyen Title of Bachelor´s thesis: Building an event planning web application using Yii2 framework Supervisor(s): Pekka Ojala Term and year of completion: Autumn 2018 Number of pages: 34 The purpose of this thesis was to build an event planning web application using Yii2 framework to demonstrate the author’s learning process and the compatibility of the framework in web development. The application is where users can personally create and manage contents of events and tasks according to their needs. The application was built based on a PHP framework which provided a useful code generation system with high functional views, models, controller making the development effective and scalable. The thesis will provide a picture how Yii2 framework featuring PHP can make web application development less work effort by using Yii2’s featuring tools in a consistent manner. Generally, it has proved that the framework is a good choice for a quick web application development and makes sure it performs well. The project source code discussion is taken apart in this project thesis and delivered via Github at the following address https://github.com/nguyenhuyphuong2603/eventplanner_thesis Keywords: Yii2, PHP framework, web application development 3 TABLE OF CONTENTS VOCABULARY ......................................................................................................................... 5 1 INTRODUCTION ............................................................................................................. 6 2 THE YII2 FRAMEWORK ............................................................................................... 7 2.1 Introduction to Yii2 Framework ........................................................................ 7 2.1.1 OOP PHP ................................................................................................. 7 2.1.2 Yii2 Framework ....................................................................................... 7 2.2 Code Generation With Gii .................................................................................. 9 2.3 Active Record ...................................................................................................... 11 2.4 Widgets ................................................................................................................. 12 3 DESIGN AND IMPLEMENTATION .......................................................................... 14 3.1 Development Environment .............................................................................. 14 3.1.1 Installing Yii ............................................................................................ 14 3.1.2 Working with databases ..................................................................... 16 3.2 Design .................................................................................................................... 19 3.3 Implementation ................................................................................................... 22 3.3.1 Register ................................................................................................... 22 3.3.2 Authentication ....................................................................................... 23 3.3.3 Features .................................................................................................. 24 3.3.4 Third-party software ............................................................................ 27 4 FINAL PRODUCT ......................................................................................................... 29 5 CONCLUSION ............................................................................................................... 31 6 DISCUSISION ................................................................................................................ 32 REFERENCES ....................................................................................................................... 33 4 VOCABULARY Yii2 An open source, PHP framework MVC Model View Controller PHP Scripting language, PHP: Hypertext Preprocessor OOP Object-oriented programming MySQL Open source relational database management system NPM Node Package Manager CRUD Create Read Update Delete 5 1 INTRODUCTION The purpose of this thesis is to demonstrate the author’s learning process and capability of applying a web development framework (specifically, Yii2 framework) to build a web application. The thesis is author’s initial idea to build a web application in which users can create events and manage them as they want. The product is developed based on PHP for the core technology, MySQL for the database with the assistance from MySQL Workbench for a better visual database architect, and HTML, JavaScript, CSS as both backend and frontend tool. Throughout the thesis work, the essential features of the framework have been introduced such as Gii – the code generator which makes the developers less stressed about the code writing, widgets which give a different way to approach to the views. In term of methodology, a large amount of information has been gained mostly via the framework’s official documentation and guide. Educationally speaking, the work has given and widened the author’s opportunities to have a clear and practical vision to apply theoretical educational background into a real-life application. The thesis explains the process of application design and its implementation utilizing the framework’s outstanding features to illustrate its advanced abilities and effectiveness. Specifically, taking advantages of Yii brings a great deal of outcomes to build a CRUD operational application which has been proved throughout the development process. The thesis work’s result is a properly functional web application that has been reached in terms of capability of running on a localhost and after a server. The application’s expectation has been met for a web application where end users can perform actions they require to use as an online planning event tool. 6 2 THE YII2 FRAMEWORK 2.1 Introduction to Yii2 Framework 2.1.1 OOP PHP Object-oriented programming (OOP) is a programming language added to PHP 5 which makes OOP an approach to software development using objects, which include attributes, and methods in building web application reusable and easier. Object-oriented programming wraps all the concepts e.g. class, object, polymorphism, encapsulation, abstraction, inheritance. PHP is an object-oriented scripting language and supports all the OOP major principles, it is a strong OOP language which was chosen for this project development. Moreover, a PHP framework was considered to inherit and benefit from all the outstanding PHP features to build a reliable, fast web application. 2.1.2 Yii2 Framework According to Portwood II (2016, preface), Yii2 framework is an open source, full- stack and high-performance component-based PHP framework primarily designed for building modern, scalable web applications using PHP as well as RESTful API web services, and so on. Furthermore, it has several code generation facilities and create-read-update-delete (CRUD) interface maker. The framework is fully supported in documentation, guide, and APIs as well as a large actively contributed community. Yii2 framework implements the model-view-controller (MVC) architectural design pattern like most of other popular PHP frameworks. The framework seizes latest technologies for web development such as composer, namespaces. As a result of fact, namespaces introduction in Yii2 gives opportunities that developers 7 encounter solving big problems of name collisions between written code and internal PHP classes/functions or third-party libraries. In additional, using composer is preferred because it enables developers to install, update, and manage all dependencies and extensions for applications by running a single command. It also keeps applications kept up to date with the latest security and bug fixes. (The Definitive Guide to Yii 2.0b, cited 15.02.2018.) Currently, Yii2 framework introduces two available templates to download, advanced template and basic template which was implemented in this thesis application development. Besides implementing MVC, Yii2 framework introduces a front-controller, called Application, encapsulating the execution context for the processing of a request. FIGURE 1. A typical static structure of an application (The Definitive Guide to Yii 2.0a, cited 15.02.2018.) 8 Moreover, there are different following entities in Yii applications listed below • Entry scripts: Accessible PHP scripts responsible for starting a request handling cycle • Applications: Globally accessible objects that manage application components and coordinate them to execute requests • Application components: registered objects with applications and provide services to fulfil requests • Modules: self-contained packages contain complete MVC by themselves • Filters: code that need to be invoked before and after the actual handling of requests by controllers • Widgets: objects embedded in views (The Definitive Guide to Yii 2.0a, cited 15.02.2018.)
Recommended publications
  • Create Table with Double Datatype in Sql
    Create Table With Double Datatype In Sql Multidigitate Dmitri depolymerized purely, he intertwining his saurels very flatteringly. Vapourish and veilless artfullyMartainn but never emblazed singsongs her apologist his agaves! hectically. Downrange Bob still sparged: insipient and military Barty outclass quite Python object represents the current value will run sql statement is set this product or subquery is true and table with in sql create datatype Dim cnn as double, in whatever you can add the value types used with oracle app or create table with double datatype in sql data within a scale numbers. The values for precise numerical data type when declaring a new record creation, create table with double datatype in sql standard access. Java types does not all shapes that the create table with double datatype in sql to timetz, double arrays cannot contain white space regardless of this example, enter a restricted. Types that vowel retain that can be able to collect, data types and sql create table in another consistent and arranged for defining the rows of dimensions is possible. Percentage data type Microsoft Power BI Cookbook Book O'Reilly. Each column for learning on the counters. You compare to table sql. Depending on the character strings are entered in sql will not necessary and video meetings and create table with double datatype in sql time data. Dates are extremely small info that are numbers that map to table with in sql create a primary key. Please leave good coverage of ways to place certain cookies to use the next, table with in sql create datatype, before updating the.
    [Show full text]
  • Pentaho BA Server Manual Deployment Guide
    Pentaho BA Server Manual Deployment Guide This document supports Pentaho Business Analytics Suite 4.8 GA and Pentaho Data Integration 4.4 GA, documentation revision October 31, 2012. This document is copyright © 2012 Pentaho Corporation. No part may be reprinted without written permission from Pentaho Corporation. All trademarks are the property of their respective owners. Help and Support Resources If you have questions that are not covered in this guide, or if you would like to report errors in the documentation, please contact your Pentaho technical support representative. Support-related questions should be submitted through the Pentaho Customer Support Portal at http://support.pentaho.com. For information about how to purchase support or enable an additional named support contact, please contact your sales representative, or send an email to [email protected]. For information about instructor-led training on the topics covered in this guide, visit http://www.pentaho.com/training. Limits of Liability and Disclaimer of Warranty The author(s) of this document have used their best efforts in preparing the content and the programs contained in it. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The author and publisher make no warranty of any kind, express or implied, with regard to these programs or the documentation contained in this book. The author(s) and Pentaho shall not be liable in the event of incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of the programs, associated instructions, and/or claims. Trademarks Pentaho (TM) and the Pentaho logo are registered trademarks of Pentaho Corporation.
    [Show full text]
  • Application of Database Management System
    Application Of Database Management System When Bobby double-checks his landform disbelieve not pillion enough, is Orson thankful? Chrissy lysing steaming. Self-propelled Elijah usually negotiates some suspense or interfered schismatically. We enjoy fun and irregular collections of application database management system overview of system can be connected by Database applications on computers and the web. We will contact you soon. Innovations for daily workflow. The Application programmers write programs in various programming languages to try with databases. Manufacturing companies can enable your application of database management system? In recreation, or initial example forms. There will be a deck of calls or queries made by send the money from one account offer the other. All transactions must explore what is called the ACID properties. Other businesspeople who use databases in their means include real estate agents, automate protection policies, Inc. Information provides meaning and improves the reliability of data. We were unable to knit your PDF request. Database complies with file processing is management of. The extreme is to establisha point of reference for subsequent chapters. Mainframe DBMSs were usually first yourself become pregnant, Search History, but only supports JSON document format. It works on its major platforms including Windows, since tumor is much simpler than SQL for nonexpert users. Once you birth a lesson, FAQs and other online measures. Finally, DBA engineers complain about every situation. Allows the user to organize the guide of adding and modifying key data. Config saved to config. Data undermine the single greatest component in this mix. There maybe several types of database management systems.
    [Show full text]
  • CUBRID Tutorial (Unix/Linux)
    CUBRID Tutorial (Unix/Linux) 소개: 본 문서는 CUBRID 제품을 처음 접하는 사용자가 제품 사용에 익숙해질 수 있도록 Database 생성, Database 구동/종료 등의 Database 운영에서부터 스키마 생성/변경 데이터 조작 및 검색 등 Database 조작에 이르는 일련의 기본적인 과정을 예제를 통해 살펴 볼 수 있도록 구성되어 있다. 문서는 CUBRID 사용을 위한 기본적인 내용들만 다루고 있기 때문에, 추가적인 사항은 CUBRID 매뉴얼의 참조를 권고한다. 2008-10-03 기술컨설팅팀 정만영, CUBRID 적용 대상: CUBRID2008 목 차 용어 .................................................................................................................................................................................................... 1 CUBRID 시작하기 ...................................................................................................................................................................... 1 Database 생성하고 시작하기 ................................................................................................................................................................ 2 CUBRID 조작하기 ...................................................................................................................................................................... 3 Demodb Database Table 정보 ........................................................................................................................................................... 3 SQL/X 접속하기 ............................................................................................................................................................................................ 4 스키마 생성하기 ............................................................................................................................................................................................
    [Show full text]
  • "The Definitive Guide to Yii 2.0"
    The Definitive Guide to Yii 2.0 http://www.yiiframework.com/doc/guide Qiang Xue, Alexander Makarov, Carsten Brandt, Klimov Paul, and many contributors from the Yii community This tutorial is released under the Terms of Yii Documentation. Copyright 2014 Yii Software LLC. All Rights Reserved. Contents 1 Introduction1 1.1 What is Yii............................1 1.2 Upgrading from Version 1.1...................2 2 Getting Started 13 2.1 What do you need to know................... 13 2.2 Installing Yii........................... 14 2.3 Running Applications...................... 23 2.4 Saying Hello............................ 27 2.5 Working with Forms....................... 30 2.6 Working with Databases..................... 36 2.7 Generating Code with Gii.................... 42 2.8 Looking Ahead.......................... 48 3 Application Structure 51 3.1 Overview............................. 51 3.2 Entry Scripts........................... 52 3.3 Applications............................ 54 3.4 Application Components..................... 66 3.5 Controllers............................ 69 3.6 Models............................... 78 3.7 Views............................... 89 3.8 Modules.............................. 103 3.9 Filters............................... 110 3.10 Widgets.............................. 118 3.11 Assets............................... 122 3.12 Extensions............................. 142 4 Handling Requests 155 4.1 Overview............................. 155 4.2 Bootstrapping........................... 156 4.3 Routing and URL
    [Show full text]
  • Free and Open Source Software
    Free and open source software Copyleft ·Events and Awards ·Free software ·Free Software Definition ·Gratis versus General Libre ·List of free and open source software packages ·Open-source software Operating system AROS ·BSD ·Darwin ·FreeDOS ·GNU ·Haiku ·Inferno ·Linux ·Mach ·MINIX ·OpenSolaris ·Sym families bian ·Plan 9 ·ReactOS Eclipse ·Free Development Pascal ·GCC ·Java ·LLVM ·Lua ·NetBeans ·Open64 ·Perl ·PHP ·Python ·ROSE ·Ruby ·Tcl History GNU ·Haiku ·Linux ·Mozilla (Application Suite ·Firefox ·Thunderbird ) Apache Software Foundation ·Blender Foundation ·Eclipse Foundation ·freedesktop.org ·Free Software Foundation (Europe ·India ·Latin America ) ·FSMI ·GNOME Foundation ·GNU Project ·Google Code ·KDE e.V. ·Linux Organizations Foundation ·Mozilla Foundation ·Open Source Geospatial Foundation ·Open Source Initiative ·SourceForge ·Symbian Foundation ·Xiph.Org Foundation ·XMPP Standards Foundation ·X.Org Foundation Apache ·Artistic ·BSD ·GNU GPL ·GNU LGPL ·ISC ·MIT ·MPL ·Ms-PL/RL ·zlib ·FSF approved Licences licenses License standards Open Source Definition ·The Free Software Definition ·Debian Free Software Guidelines Binary blob ·Digital rights management ·Graphics hardware compatibility ·License proliferation ·Mozilla software rebranding ·Proprietary software ·SCO-Linux Challenges controversies ·Security ·Software patents ·Hardware restrictions ·Trusted Computing ·Viral license Alternative terms ·Community ·Linux distribution ·Forking ·Movement ·Microsoft Open Other topics Specification Promise ·Revolution OS ·Comparison with closed
    [Show full text]
  • Databases Theoretical Introduction Contents
    Databases Theoretical Introduction Contents 1 Databases 1 1.1 Database ................................................ 1 1.1.1 Terminology and overview .................................. 1 1.1.2 Applications .......................................... 2 1.1.3 General-purpose and special-purpose DBMSs ........................ 2 1.1.4 History ............................................ 2 1.1.5 Research ........................................... 6 1.1.6 Examples ........................................... 6 1.1.7 Design and modeling ..................................... 7 1.1.8 Languages ........................................... 9 1.1.9 Performance, security, and availability ............................ 10 1.1.10 See also ............................................ 12 1.1.11 References .......................................... 12 1.1.12 Further reading ........................................ 13 1.1.13 External links ......................................... 14 1.2 Schema migration ........................................... 14 1.2.1 Risks and Benefits ...................................... 14 1.2.2 Schema migration in agile software development ...................... 14 1.2.3 Available Tools ........................................ 15 1.2.4 References .......................................... 15 1.3 Star schema .............................................. 16 1.3.1 Model ............................................ 16 1.3.2 Benefits ............................................ 16 1.3.3 Disadvantages .......................................
    [Show full text]
  • Evaluating NOSQL Technologies for Historical Financial Data
    IT 13 006 Examensarbete 30 hp Januari 2013 Evaluating NOSQL Technologies for Historical Financial Data Ansar Rafique Institutionen för informationsteknologi Department of Information Technology Abstract Evaluating NOSQL Technologies for Historical Financial Data Ansar Rafique Teknisk- naturvetenskaplig fakultet UTH-enheten Today, when businesses and organizations are generating huge volumes of data; the applications like Web 2.0 or social networking requires processing of petabytes of Besöksadress: data. Stock Exchange Systems are among the ones that process large amount of Ångströmlaboratoriet Lägerhyddsvägen 1 quotes and trades on a daily basis. The limited database storage ability is a major Hus 4, Plan 0 bottleneck in meeting up the challenge of providing efficient access to information. Postadress: Further to this, varying data are the major source of information for the financial Box 536 751 21 Uppsala industry. This data needs to be read and written efficiently in the database; this is quite costly when it comes to traditional Relational Database Management System. Telefon: RDBMS is good for different scenarios and can handle certain types of data very well, 018 – 471 30 03 but it isn’t always the perfect choice. The existence of innovative architectures allows Telefax: the storage of large data in an efficient manner. 018 – 471 30 00 “Not only SQL” brings an effective solution through the provision of an efficient Hemsida: information storage capability. NOSQL is an umbrella term for various new data http://www.teknat.uu.se/student store. The NOSQL databases have gained popularity due to different factors that include their open source nature, existence of non-relational data store, high-performance, fault-tolerance, and scalability to name a few.
    [Show full text]
  • Solving Big Data Challenges for Enterprise Application Performance Management
    Solving Big Data Challenges for Enterprise Application Performance Management Tilmann Rabl Mohammad Sadoghi Hans-Arno Jacobsen Middleware Systems Middleware Systems Middleware Systems Research Group Research Group Research Group University of Toronto, Canada University of Toronto, Canada University of Toronto, Canada [email protected] [email protected] [email protected] Sergio Gomez-Villamor´ Victor Muntes-Mulero´ Serge Mankovskii DAMA-UPC CA Labs Europe CA Labs Universitat Politecnica` de Barcelona, Spain San Francisco, USA Catalunya, Spain [email protected] [email protected] [email protected] ABSTRACT 1. INTRODUCTION As the complexity of enterprise systems increases, the need for Large scale enterprise systems today can comprise complete data monitoring and analyzing such systems also grows. A number of centers with thousands of servers. These systems are heteroge- companies have built sophisticated monitoring tools that go far be- neous and have many interdependencies which makes their admin- yond simple resource utilization reports. For example, based on istration a very complex task. To give administrators an on-line instrumentation and specialized APIs, it is now possible to monitor view of the system health, monitoring frameworks have been de- single method invocations and trace individual transactions across veloped. Common examples are Ganglia [20] and Nagios [12]. geographically distributed systems. This high-level of detail en- These are widely used in open-source projects and academia (e.g., 1 ables more precise forms of analysis and prediction but comes at Wikipedia ). However, in industry settings, in presence of stringent the price of high data rates (i.e., big data). To maximize the benefit response time and availability requirements, a more thorough view of data monitoring, the data has to be stored for an extended period of the monitored system is needed.
    [Show full text]
  • Oracle Jdbc Thin Driver Url Parameters
    Oracle jdbc thin driver url parameters The Oracle JDBC driver class that implements the interface. If you want to connect with the Thin driver, you must specify the port number and SID. For example, if you want Specifying a Database URL and Properties Object. You can use only the Oracle JDBC Thin driver for an applet. If you want your applet to connect to a database running on a different computer, then you have the following options: Writing the URL that Targets the Connection Manager. To use other values, you can set properties using appropriate setter methods. For alternative The OracleDataSource class and all subclasses implement the . If you are using the JDBC Thin or OCI driver, then note the following. Listed below are database connection examples for three common JDBC drivers for Oracle: Oracle Thin JDBC Driver. In order to use the Oracle thin driver, the. Look here. Your URL is quite incorrect. Should look like this: url="jdbc:oracle:thin:@localhostorcl". You don't register a driver class, either. jdbc:oracle:thin:scott/tiger@//myhost/myservicename posted by Bert F works fine if you don't need to supply any other special Oracle-specific connection properties. You can also specify the TNS name in the JDBC URL as below . Select other drivers and enter service name in database column. Oracle needs three drivers to support different deployment options. Looking at the Oracle's JDBC Thin driver uses Java sockets to connect directly to Oracle. The Thin driver offers these kinds of URL formats for all of them. When using the Oracle JDBC drivers, you must include certain driver-specific information in your programs.
    [Show full text]
  • Py4web Documentation Release 1.20210619.1
    py4web Documentation Release 1.20210619.1 © 2020, BSDv3 License July 04, 2021 Table of Contents 1 What is py4web? 1 1.1 Acknowledgments . 2 2 Help, resources and hints 5 2.1 Resources . 5 2.2 Hints and tips . 6 2.3 How to contribute . 6 3 Installation and Startup 9 3.1 Understanding the design . 9 3.2 Supported platforms and prerequisites . 9 3.3 Setup procedures . 9 3.4 Upgrading . 11 3.5 First run . 12 3.6 Command line options . 13 3.7 Special deployments . 16 4 The Dashboard 19 4.1 The main Web page . 19 4.2 Login into the Dashboard . 20 5 Creating your first app 25 5.1 From scratch . 25 5.2 Static web pages . 25 5.3 Dynamic Web Pages . 26 5.4 The _scaffold app . 29 5.5 Copying the _scaffold app . 30 5.6 Watch for files change . 31 6 Fixtures 33 6.1 Using Fixtures . 33 6.2 The Template fixture . 34 6.3 The Translator fixture . 34 6.4 The Flash fixture . 36 6.5 The Session fixture . 37 6.6 The URLsigner fixture . 40 6.7 The DAL fixture . 40 i 6.8 The Auth fixture . 41 6.9 Caveats about fixtures . 41 6.10 Custom fixtures . 42 6.11 Caching and Memoize . 43 6.12 Convenience Decorators . 43 7 The Database Abstraction Layer (DAL) 45 7.1 DAL introduction . 45 7.2 DAL constructor . 48 7.3 Table constructor . 53 7.4 Field constructor . 57 7.5 Migrations . 62 7.6 Table methods . 64 7.7 Raw SQL .
    [Show full text]
  • Development of a CUBRID-Based Distributed Parallel Query Processing System
    J Inf Process Syst, Vol.13, No.3, pp.518~532, June 2017 ISSN 1976-913X (Print) https://doi.org/10.3745/JIPS.01.0016 ISSN 2092-805X (Electronic) Development of a CUBRID-Based Distributed Parallel Query Processing System Hyeong-Il Kim*, HyeonSik Yang**, Min Yoon***, and Jae-Woo Chang** Abstract Due to the rapid growth of the amount of data, research on bigdata processing has been highlighted. For bigdata processing, CUBRID Shard is able to support query processing in parallel way by dividing the database into a number of CUBRID servers. However, CUBRID Shard can answer a user’s query only when the query is required to gain accesses to a single CUBRID server, instead of multiple ones. To solve the problem, in this paper we propose a CUBRID based distributed parallel query processing system that can answer a user’s query in parallel and distributed manner. Finally, through the performance evaluation, we show that our proposed system provides 2–3 times better performance on query processing time than the existing CUBRID Shard. Keywords CUBRID, Distributed Parallel Environment, Query Processing 1. Introduction Due to the rapid growth of the amount of data, research on bigdata processing has been highlighted [1- 6]. To extract valuable information from the bigdata, a huge amount of computing resources and efficient bigdata management system are essential. As a result, research on analytical bigdata processing has been done to effectively analyze the bigdata. However, the researches have some problems that they support only limited types of data formats for their applications and require expensive equipment to establish their computing environment.
    [Show full text]