Weekly Update Nov 11-18 - Testing in Inertia, Introduction to Alpine Todo App, Optimizing Queries +

Hello everyone, welcome to another week in which I will comment on the updates for the week of November 11 to November 18 for the YouTube channel, the blog and of course the courses and books.

Youtube

Starting as always with the YouTube channel here, as a first class we have the has method that also accompanies the where and has() methods that we saw last week, which are specific methods for unit tests or integration of any kind with Laravel Inertia, which in this case are to compare the data of the props, which is the fundamental difference that we have with the tests in basic AR, and this is the only class of this type that I uploaded for this week.

The following is the update that was last week, of course.

Also here, which is part of the Laravel Livewire course, in this case, is the alpine introduction, since we remember that the pin is a crucial part of what Livewire is, so we have several things here, we have a minimal example with the x-data block that defines what a component is, the click event and display some content. Here we also have, commenting on the above, Livewire and alpine js are the best allies, as discussed above, it is part of the Livewire scaffolding, and here we also have what it means to prepare a project and install the CDN, which is for testing, which is recommended with alpine js.

Here, too, what is the keyboard event in this case, this is for Laravel Livewire, through the wire click enter, which is very important for when we want to give or listen to the keyboard event, we can send a request as if it were with axios, but in this case, it is using the internal Livewire messages directly to the server to a component method.

Here we also have what are the hooks in javascript in this specific case of Livewire, that is, the javascript on the Livewire side to optimize queries. This is a specific or exclusive video for what is the YouTube channel in which I explain a little about what the importance of optimizing queries is. That is, when we want to have a relational query, for example, post and categories, also bring us the categories, bring only the fields that we are going to use, for example for the lists, suppose we have precisely the posts and the categories and we are going to build a list. It doesn't make sense, usually it is not what we want, it also brings us the content, the content of the post since we would simply want the title and the description, but the content would not be necessary, so it is important to do this type of optimization, especially when we are building a Rest API.

Another specific video for the YouTube channel, which is to manage user preferences from a json field. Well, it sounds a bit complicated or difficult to understand, but this is what I mean. In this case, specifically for the Academy application, I wanted to keep some specific settings for the user. Initially, it was the dark mode, which is to change it here, and I wanted to save it and I saved it in a user preference, therefore, every time I reload this preference, it is saved. Well, right now I am not authenticated, but when I authenticate, it then occurred to me to put the autoplay on. The first idea would be to create a column for each of them, but obviously this is something quite annoying because the preferences are going to change little by little, so what I did was create a single field called preferences or something similar in which, using a Jason, a Jason object, a text, at the end, I was saving those preferences, and it is that simple, therefore, I could scale it as much as I wanted, so I will show you how I made the configurations both at the Arabic server level and also at the client level, which in this case is Vue.

Here we have a video that was quite old, although it is current, but I had not published it, about managing preferences in a Flash application for development mode, and this would be all it has to do with what is related to the videos uploaded to the YouTube channel.

Courses

Here we move on to the content uploaded at the level of the courses that I am still working on, which is the Livewire course and the Larabel Inertia course. So here, starting with what I uploaded for the Livewire course, which as I was telling you is part of Alpine, we finally finished the todolist application here, a bit the same, we had already created the todolist application with the pin, so here what we did was adapt the todo application to Livewire, then we created the migrations, the models, we created the delare component, then the method to be able to create them, and well, little by little, everything.

An introduction to Alpine, which I have already finished, so those are the videos that I am exposing little by little on the YouTube channel.

For inertia as I was telling you, we are working with the tests, we have already seen the most crucial part which was the specific characteristics of inertia, the ace methods, how to evaluate the component and a few more things and now we are moving on to directly evaluate each of the components, the functionalities, the modules, whatever you want to call them, that we implemented throughout the course and we are now in the step by step as you can see, we verified the first step, the second step, well the first step for the post, the get, there are two steps eh for the company, the get, also the post here and also to verify what the stat is, which was one of the mental steps here, which was to determine which step we are in, whether in step one, two, or three, the coupon of the week and finally.

Introducción a Alpine JS

  1. Configurar Bootstrap 5

    1. Vamos a adaptar el estilo de B5 en la app.

  2. Extra: Guardar de manera persistente

    1. Vamos a guardar los datos de manera persistente.

  3. Sortable: Ordenable

    1. Vamos a instalar y configurar un plugin para hacer ordenable el listado.

Aplicación de To Do con Livewire y Alpine

  1. Adaptar la app de Todo de Alpine en Livewire

    1. Vamos a clonar el proyecto de Alpine en Livewire.

  2. Crear migración y modelo

    1. Vamos a crear el modelo  y migración de los to do.

  3. Crear to do desde Livewire

    1. Vamos a crear un to do desde Livewire y la clase componente.

  4. Crear migración y modelo

    1. Vamos a crear el modelo  y migración de los to do.

  5. Crear to do desde Livewire

    1. Vamos a crear un to do desde Livewire y la clase componente.

  6. Popular listado de todos desde Livewire

    1. Vamos a mostrar el listado de to do desde la base de datos en Alpine.

  7. Reordenación: Actualizar arrays en el cliente y servidor

    1. Vamos a presentar un esquema de ordenación el clásico de construir el array desde cero.

  8. Reordenación: Actualizar en la base de datos con un evento

    1. Vamos a guardar los to do en la base de datos.

 

Integración con Inertia - Pruebas

  1. Dashboard: Pruebas para el Post, upload

    1. Vamos a realizar una corrección en el módulo de dashboard sobre el upload.

  2. Dashboard: Pruebas para el Post, aserciones adicionales

    1. Vamos a implementar algunos métodos de aserciones adicionales.

  3. Paso por Paso: Primer paso, Get

    1. Vamos a crear las pruebas para el primer paso del formulario paso por paso, el get.

  4. Paso por Paso: Primer paso, Post

    1. Vamos a crear las pruebas para el primer paso del formulario paso por paso, el post.

  5. Paso por Paso: Segundo paso, Company, Get

    1. Vamos a crear las pruebas para el segundo paso del formulario paso por paso, el get.

  6. Verificar step

    1. Verificar la propiedad de step.

  7. Implementar Facades para los pasos

    1. Implementamos los facades de los pasos por pasos.

  8. Paso por Paso: Segundo paso, Company, Post

    1. Vamos a crear las pruebas para el segundo paso del formulario paso por paso, el post.

Blog

Now we move on to what are the updates at the blog level here this also what I was telling you before eh handling the key down enter event in Livewire very important again to make requests to the component the configurations that I told you about the installation of the pin the best allies as I was telling you well this is a little bit a copy of what we have or what I published on the YouTube channel optimize the queries in the database here the minimal example that I told you about the pin this is also specific to the channel of well the other channel that I am managing apart or parallel to the main one that is to apply rotations on a platform a very personal video that I think I did not upload here How strange it is that it is which Mac mini I would recommend you for development some tips that I hope will be useful to you and from here it would be content for the other week So nothing this was all the content that I uploaded for the aforementioned week so without further ado let's go see you in another video,

- Andrés Cruz

En español

Andrés Cruz

Desarrollo con Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz En Udemy

Acepto recibir anuncios de interes sobre este Blog.

!Cursos desde!

10$

En Udemy

Quedan 1d 01:38!


Udemy

!Cursos desde!

4$

En Academia

Ver los cursos

!Libros desde!

1$

Ver los libros
¡Hazte afiliado en Gumroad!