En español

CodeIgniter is a framework used for the development of web applications and, like Laravel, it is open source; is a framework for PHP and was created by EllisLab and is now maintained by British Columbia Institute of Technology.

CodeIgniter 4 is the latest version of this framework and was released in 2020 and in this version, many changes and improvements have been made compared to the previous version, CodeIgniter 3, modernizing the framework quite a bit and creating structures similar to the one we have in a project in Laravel but, maintaining the simplicity that characterizes the framework.

CodeIgniter 4, like many other frameworks, uses the MVC (Model-View-Controller) which is used to develop web applications; There are certain frameworks like Django or Laravel that also use MVC but not in a pure way, for example Django uses a variant called MTV and Laravel due to the large number of ways that exist to link a piece of code to a route, you cannot consider a pure MVC.

Advantages and features

One of the great advantages that the framework has if we compare it with Laravel is that it is very lightweight and has few dependencies. In addition to its ease of installation, the framework requires PHP 7.2 or higher.

  • The framework can be easily extended by using third-party libraries or components and even PHP-specific libraries when using composer.
  • The framework can be easily configured to work with different databases and web servers which makes it a great candidate for developing web applications.
  • It is a small framework but with everything necessary to create most web applications today.

Model, View and Controller

Let's review what each MVC layer is for in CodeIgniter 4.

  • The model is used to interact with the database, it is the only layer and the only way we have to connect to the database, a model is nothing more than a class whose structure is a copy or mirror of a table and is Use this class to interact with the database and be able to retrieve, create, update or delete records.
  • The controller is used to handle user requests, that is, each controller has at least one route associated with it and is responsible for carrying out the strong part and where the business logic and structure of the project itself is implemented, it is the component used to connect to the database through the previous layer and send the data to the view.
  • The view is used to show the data to the user, here are the forms, lists, details views, etc., it is the presentation layer and is only responsible for showing the data, in C4, this layer is PHP files that are then processed by the framework when making a query and generating HTML, which is what is finally returned as a response.

CodeIgniter is an excellent framework, if you have little knowledge in web development and have not used another web framework, I highly recommend that you start with this type of framework, which has a fairly low learning curve and you will not get dizzy in the configuration and use as you would if you try to start with other more powerful frameworks such as Laravel.

Resources, Tutorials, Post and much more

In this blog you will find a large amount of both free and paid material to take the first steps with the framework and a little more; In this section, we are going to list several and you can take it as the entry point to get to know the framework for free.

In this blog, we present a series of tutorials that can help you get started with this peculiar framework, a small but powerful framework! It is a framework that is very small but brings everything necessary and more than necessary to develop the most common functionalities that make up most web applications today.

 

Guide to take the first steps with CodeIgniter 4 on the blog and YouTube completely FREE

We begin by preparing the necessary environment, which consists of installing our Lamp, to do this, we configure it in Windows using Laragon:

Primeros pasos para crear aplicaciones en Laravel en Windows usando Laragon

Continuar leyendo 

On MacOS:

Software necesario e instalación de las herramientas: MacOS para CodeIgniter 4

Continuar leyendo 

To begin, you can start experimenting with the framework without many complications, we see how to install C4 manually:

Instalar Lamp: Apache, PHP, MySQL y PHPMyAdmin en MacOS

Continuar leyendo 

Or by composer:

Instalar CodeIgniter 4 con composer

Continuar leyendo

Demo: instalar CodeIgniter 4 manualmente sin composer

Continuar leyendo 

You know the structure of folders and files, it is essential to develop anything in any framework:

Organización de un proyecto en CodeIgniter 4

Continuar leyendo 

Developer mode gives us exact information about what is happening at the time of development, such as database connection problems, among others:

Habilitar modo desarrollador en CodeIgniter 4

Continuar leyendo 

We move on to installing the framework, which is an extremely simple process and we can do it using a composer command:

Conociendo e instalando CodeIgniter 4 para el desarrollo de apps modernas, guía rápida

Continuar leyendo 

Once the framework is installed, the next thing we want to see is something in the browser. To do this, we use the routes, which are like the other layer of our MVC:

Manejando las rutas y URLs en CodeIgniter 4

Continuar leyendo 

Once the framework is installed, the next thing we want to see is something in the browser. To do this, we use the routes, which are like the other layer of our MVC:

Creando nuestro primer hola mundo en CodeIgniter 4 y conociendo los controladores y vistas

Continuar leyendo 

Now that we know how to use controllers and views, let's see how to connect to the database using models:

Crear modelos en CodeIgniter 4

Continuar leyendo 

Now that we know how to use controllers and views, let's see how to connect to the database using models:

Consultas joins para la base de datos en CodeIgniter 4

Continuar leyendo

Operaciones comunes sobre los modelos en CodeIgniter 4

Continuar leyendo 

Migrations are those files that we must define to translate a PHP file to a table in the database; this process is known as migrations and is an important part of the framework:

Las migraciones en CodeIgniter 4

Continuar leyendo 

With the MVC understood through the previous posts, the next thing we need to know is the use of forms in CodeIgniter 4; They are used to add or modify existing records in the database, which are a fundamental piece of the CRUD processes in any system:

¿Cómo crear una API REST (RestFul) en CodeIgniter 4?

Continuar leyendo 

A RestApi is one of those elements that are essential when we want to connect the application with other applications in an easy, extensible, secure and controlled way:

¿Cómo crear una API REST (RestFul) en CodeIgniter 4?

Continuar leyendo 

The validations applied to forms through server-side validations are a very important feature in this type of framework. C4 handles them very easily and is the next step that we must follow, to avoid processing records to the database that are not consistent and therefore should be considered invalid to avoid problems in the application:

Validaciones e imprimir errores de formularios en CodeIgniter 4 con estilo de Bootstrap 5

Continuar leyendo 

Validaciones personalizadas en CodeIgniter 4

Continuar leyendo 

Once we know the basic aspects of the Framework, we must continue on our way knowing important features, such as CRUD. Before, we saw how to use forms to create elements, but what about deleting records:

Eliminar registros en CodeIgniter 4

Continuar leyendo 

Showing the list of information so that the rest of the options are easily accessible can be done using a list:

Crear una vista de listado o tabla en CodeIgniter 4 con estilo en Bootstrap 4 o 5

Continuar leyendo 

There are basic operations that we must know in CodeIgniter, working with files and images that range from loading files to processing them are necessary to be able to do many other operations:

Como hacer un upload o carga de archivos o imágenes en CodeIgniter 4

Continuar leyendo

Cómo mostrar imágenes cargadas en Codeigniter 4: DOS FORMAS!

Continuar leyendo 

Generating test data is the best way we have to create an initial list of data without having to create it manually:

Seeder o semilleros en CodeIgniter 4 para generar datos de prueba

Continuar leyendo 

Spark is the C4 command line, with which we can create models, controllers, run the framework in the browser, among others:

Línea de comandos en CodeIgniter 4, Spark

Continuar leyendo

Ejecutar la aplicación en CodeIgniter 4 en un navegador

Continuar leyendo 

Course and Book to master CodeIgniter 4

CodeIgniter is a fascinating framework, and it is ideal when you are entering the world of programming, you already know how to program in PHP and what this language and the technologies that revolve around it such as HTML, CSS and JavaScript and you want to go a step further. step further, you want to start developing in a more professional, efficient and scalable way over time; although the fact of using CodeIgniter or another framework is not a guarantee that you will be able to take that step, since the most important thing is that you know how to use it, and that is what this book is for, so that you have progressive progress, from scratch and with a growth curve. moderate learning; taking the first steps with CodeIgniter, explaining what each component works for and, doing practice, programming your first application that will surely be the first of many more.

Although I mentioned previously that CodeIgniter is ideal for an apprentice, it does not necessarily have to be used as a simple stepping stone to go higher and work with more complete and complex frameworks such as Laravel or Symfony.

CodeIgniter is a fairly powerful framework that for most of the applications we create on a daily basis would be more than enough; It brings functionalities to work in an organized way through MVC, a route layer, easy Rest Api creations, validations, form processing, filters to intercept requests and a lot more functions that will surely help you when programming your applications. That said, Codeigniter, once mastered, will help you get to know larger frameworks like Laravel, since many of its features exist in Laravel.

 

The purpose of the book and course is to take the first steps with CodeIgniter in version 4; For this, we will take two things into account:

  • We do not intend for the person to be able to know Codeigniter 100% from zero to expert, since it would be too big an objective for the scope of what is written here, otherwise, to know its ecosystem, what it offers us and how it works based on several examples and/or small applications with limited scope.
  • The reader is expected to have knowledge of JavaScript, HTML and CSS as they are necessary to be able to develop in any PHP or server-side web framework that you want to learn; On my website developmentlibre.net I have multiple resources that may interest you to take the first steps with various technologies for free; Just like on my YouTube channel, you have a lot of free, unique and quality material.

To follow this book all you need is to have a computer with Windows, Linux or MacOS and a desire to learn!

If you are interested in this premium content, you can check the Courses and Books links in the navbar of this site.

Ver Listado »

Acepto recibir anuncios de interes sobre este Blog.

!Cursos desde!

10$

En Udemy

Quedan 1d 13:31!


Udemy

!Cursos desde!

4$

En Academia

Ver los cursos

!Libros desde!

1$

Ver los libros
¡Hazte afiliado en Gumroad!