You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

2 Días
10 Hrs
7 Min
45 Seg

Comparte tus buenas prácticas con la comunidad

29/30
Resources

How to apply routing and versioning systems in your projects?

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.

What is a versioning system?

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.

Example of separation of logic in routes

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.

Why is testing crucial in professional development?

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.

How to apply TDD in your projects?

  1. Write the tests: Before starting with the implementation, you must write the tests that will define the expected behavior of the code.
  2. Get red answers: When running the tests, you will see red answers, indicating that the code does not yet meet the requirements.
  3. Implement the code: Now, write the code necessary for the tests to pass.
  4. Refactor: Once all the tests pass (green answers), you can refactor or improve the code while maintaining the functionality.

Example of changing paths

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).

What can you achieve with an API system?

By adopting the practices of path management, versioning, and testing, you can create an API system that:

  • Is flexible: Able to adapt to new needs without rewriting from scratch.
  • Scalable: Handles increased load or functionality without problems.
  • Maintainable: Allows changes and updates without affecting the stability of the system.

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

Sort by:

Want to see more contributions, questions and answers from the community?

Estaria muy bien un curso de documentacion para el backend de manera profesional.

Estuvo poderosoooooo este cursooo. Deberia hacer una continuacion usando las api creadas, pero ya conectarla desde el frontend y un poco de tailwindui

Para mi el nombre de esté curso no tienen que ver con el contenido Debería llamarse DJANGO Api Rest : PHP, estandares y buenas prácticas. Vine a esté curso pensando que abría contenido para aprender acerca de estandares y buenas prácticas pero solo habla de PHP y poco de por que son estandares y buenas prácticas
Es un tema de mucho cuidado y conocimiento de las herramientas de Laravel. Como docente, es excelente el tono y manejo que tiene de exponer la temática del curso. Espero ver muchos más cursos en la plataforma contigo.
estuvo muy bueno el curso la verdad aprendí varias cosas de laravel que aún no sabía con respecto a lo de las APIs, muy chévere aunque hubiera estado mejor si se trabajaba con el frontend pero de resto todo bien 👍
Excelente curso, profesor italo mis felicitaciones eres lo best.
Excelente Curso! Han mejorado realmente los curos de Italo Morales, no sé si fue por una mala experiencia pero antes los cursos de él parecían estar mal estructurados a nivel de contenido y explicación, pero los últimos que he estado tomando de él, han sido todos muy buenos realmente. Gran avance realmente, buen curso!
Muy buen curso. La verdad no esperaba que hubiese tanta codificación para ejemplificar los temas. Fue una grata sorpresa y le agrego mucho valor.