Introducción a desarrollo web con PHP y Yii
¿Qué es Yii2?
¿Por qué usar PHP y Yii2?
Arquitectura modelo–vista–controlador
Instalación de Yii2
Estructura de una aplicación con Yii2
Configuración de variables de entorno
Quiz: Introducción a desarrollo web con PHP y Yii
Esquema de la aplicación
Proyecto: The Book Club
Creación del schema de la base de datos
Creación de tablas clubs y club_members
Quiz: Esquema de la aplicación
Modelos, vistas y controladores
Commands
Model
ActiveRecord
ActiveRecord de la clase author
Relational data: hasOne()
Relational data: hasMany()
Web Controllers
Controller de la clase author
Enrutamiento y creación de URLS con urlManager
Views
Configuración de vistas con Smarty
Quiz: Modelos, vistas y controladores
Manejo de usuarios con Yii2
Clase user
Autenticación de usuarios
Autenticación de usuarios: LoginForm
User input
Formulario de login con ActiveForm
Validación de modelo con core validators
Core validators: unique, filter, email
Quiz: Manejo de usuarios con Yii2
Enlaces, navegación y tablas intermedias
Dar de alta un libro
Asignación de libros a usuario
Asignación de libros a usuario: vista
Calificar un libro
Promedio de calificaciones de libro
Relaciones entre tablas intermedias con viaTable()
Enlaces y navegación
Quiz: Enlaces, navegación y tablas intermedias
Despliegue y cierre del proyecto
Despliegue de aplicación de Yii2 a Heroku
PHP is a language that, while it has received mixed reviews over the years, remains a viable and powerful choice for web development. Used in 65% of the world's websites, its ability to enable both bad practices and incredibly fast, efficient performance makes it stand out. But why choose Yii as a framework when there are so many options available?
Yii is a framework that offers a perfect balance for web development projects:
Ease of installation: Comparatively simple to set up and configure.
Depth of concepts: Works with concepts that are precise and well-defined, making it easy to understand and implement, such as the MVC (Model-View-Controller) model.
Exceptional documentation: It provides detailed guides in both English and Spanish, being extremely clear and complete.
A crucial aspect is its API, well structured and understandable, although it is not in Spanish.
Yii's documentation covers the entire spectrum needed to learn and apply the framework:
Yii Active Record
, allowing for more informed and efficient development.Yii is especially for developers looking for:
Choosing PHP and Yii for web development means taking advantage of their inherently positive characteristics as an engine for innovation. However, it is important to:
With the right approach, PHP coupled with Yii can empower web project development with speed, efficiency, and ease. Learning and leveraging these resources opens a window to a world of opportunities in modern programming - never stop learning and exploring these sides of technology!
Contributions 6
Questions 1
Want to see more contributions, questions and answers from the community?