Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (38 sloc) 3.81 KB
title summary category published
Jumping into the Front-end
This is my first step into the Javascript post jQuery era.
vue
true

I'm experiencing a PHP burnout since last January. We're coding at work at an insane speed because of, you know, deadlines, and the last thing I want to do at home is to write some more PHP code. Don't get me wrong on this, I love PHP and the Laravel ecosystem, but I spend eight hours a day working with it, and I don't really have an interesting side project at the moment. I've spent the last four months playing some PS4 games such as Spider-Man, Red Dead Redemption 2 and Shadow of the Colossus (this one is my all-time favorite game and they made a remake for the PS4 with a really improved graphics so I had to re-play it and complete all the achievements 😅).

It has been almost two years since I said for the first time Oh, this Vue thing looks awesome, I should dig on it sometime. I worked a week remotely from my parent's and spent a few days there to switch-off a bit. I used that free time to read, watch some Netflix shows and lately to finally put my hands on Vue.

What can I say, from my point of view it was really weird at first and time-consuming since I needed to check everything on Stack Overflow (Seriously, anything you can think of 😂). But I was enjoying every single line of code. I decided to build the classic snake 🐍 game using components and I have to say that the result is better than what I've expected. There are still a few bugs and a few checks to complete on the road map that I don't know if I will ever finish, but I'm pretty happy with the experiment.

Learning how to structure the code, or where each line belongs wasn't easy at first, I think I have a pretty good idea now, at least for the basic like created, data, props and computed. The hardest step was to put some tests in it. Thanks to Adam Wathan and his amazing course it's really hard for me to write code without tests anymore, so I was struggling with myself to learn a bit of Vue first before adding tests 😖. After finishing the project I tried to follow a few tutorials about how to add tests to a Vue project but no matter how many I followed, the terminal always blew up. After a few hours, I found one that said you can install the test suite along with the project from Vue-cli. I proceed to remove my glasses, do a strong facepalm, put them back on and create a new project. The example test ran so smoothly that I feel really stupid for my previous waste of time. I copied all the code to this new project, added some tests, check everything was fine and pushed to the repository.

The next day Christoph Rumpel told me he fought the same issue half a year ago. The funny part is that I had already read that post when it was published but couldn't remember at the time I was experiencing the same as he did. So, as I see it, start to code and see the changes in the browser is great, but nothing is so much satisfying as a green test passing. You can focus on the interface later.

I'll not become a front-end or even a full-stack developer anytime soon, we already have a front-end team at the company, but I'm enjoying this experience like a child. I consider myself as that kind of person that can't just stop learning new stuff.

You can’t perform that action at this time.