Buenas prácticas a nivel general
Convenciones para crear APIs: rutas y datos
¿Qué son los HTTP Status Codes?
¿Qué son los Métodos HTTP?
Creación del proyecto
Boilerplate y estructura de datos en frameworks de backend
Creación de datos: factories y seeders
Consulta de datos: rutas y controladores
Consulta de datos con tablas relacionadas
Quiz: Creación del proyecto
Planificación y mantenimiento
¿Cómo planificar el alcance de tus APIs?
Consistencia entre endpoints: recursos y colecciones
Recursos anidados o multinivel
Optimización y auditoría de APIs
Alteración de datos
Validación de datos
Quiz: Planificación y mantenimiento
Funciones de seguridad
Autenticación vs. autorización
Autorización: tokens y middlewares
Autenticación: inicio de sesión y generación de tokens
Corrigiendo bugs de seguridad
Políticas de acceso
Subir imágenes desde API
¿Qué es la autenticación?
Quiz: Funciones de seguridad
API Testing
API Testing
Testing en tags
Testing en recipes
Testing método store
Testing método update
Quiz: API Testing
API Breaking Changes
Versionamiento de la API
Evolución de la API: v2, paginación y TDD
Quiz: API Breaking Changes
Conclusiones
Recapitulación de las buenas prácticas para desarrollo de APIs
Comparte tus buenas prácticas con la comunidad
You don't have access to this class
Keep learning! Join and start boosting your career
When we embark on application development, one of the fundamental aspects is the design of our routing systems. These allow us to define what we want to deliver and what we need from our application. This concept is the first cog in a much more complex machine that, when well developed, ensures that our code can continue to run smoothly across multiple versions.
The versioning system makes it possible to keep the code stable for different users while making updates. Separating the system logic into specific folders allows that, if a user does not want to update the application, it continues to work smoothly. This approach can be applied both in validations and in the resource system, achieving cleaner controllers focused on solving specific application problems.
Suppose we have a route that returns a query. The logic of exactly what it returns is isolated into a set of specific fields. This not only keeps the code tidy, but it is also easier to maintain and scale.
Professional software development should always be supported by testing to ensure that the code works correctly and behaves as expected. This is where TDD (Test-Driven Development) comes in, a methodology that teaches us to write tests first before implementing functionality.
You might have an image with a relative path (for example, /folder/file.png
). You can transform it into an absolute path using a function that generates the format http://.../carpeta/archivo.png.
This process involves refactoring the code and must be done without breaking existing functionality (green tests).
By adopting the practices of path management, versioning, and testing, you can create an API system that:
With these tools, you will be able to build robust applications that meet professional standards. I encourage you to apply this knowledge in your next projects to raise the quality of your development.
Finally, share your achievements and learnings on social networks once you complete this course. What new practices will you implement in your code? Share your experience and keep learning!
Contributions 8
Questions 0
Estuvo poderosoooooo este cursooo. Deberia hacer una continuacion usando las api creadas, pero ya conectarla desde el frontend y un poco de tailwindui
Want to see more contributions, questions and answers from the community?