About programming in PHP

Published: 2018-07-27

When programming in PHP, we often have to solve problems that are already developed by others. Remember to configure our applications, connect to the database, display the templates - all of this must be programmed by yourself. It is very easy to use the framework, which contains most of the elements we need. Simply turn them on and configure them in the settings file. This allows you to start working on the system you want to program. Framework Yii has in its resources: change of operating language, components, caching, error handling, library for sending email, system log, database support, URL manager or checking and providing information about errors. Additionally, Yii is equipped with a module called Gii - it allows for automatic generation of elements such as controller, model or entire CRUD management systems. Using the framework we will build an application based on the MVC pattern, which will sort different elements of the application and in the future there will be no problem with finding the right fragment of the code. By using models with queries to databases, views containing page templates and controllers containing program code, we create a solution that is consistent with developers' practices all over the world. Additionally, Yii has an element called ActiveRecord, thanks to which the creation of simple queries to the database does not have to be done in the model. For this purpose it is enough to use controller where appropriate methods are used to create a query. The framework will process them on request in SQL language. Unfortunately, ActiveRecord must be used in moderation because of the resources used. This book was written to show you how to use most of the popular and most frequently used libraries. Only working with the whole system from A to Z will allow you to learn the knowledge, which after a few repetitions becomes very simple and friendly

Copyright © 2015-2019 - by Lucas SOS | About the Author | Tags | Blog | Links | Login