Blog of a web developer

"Folk programming" - web developer's blog, specializing primarily in Symfony framework.

Creating and Handling Forms in Vue with Data Transformers

Vue.js, a popular progressive JavaScript framework, offers an intuitive way of building user interfaces. One of the common tasks in web development is handling forms. This article will guide you through creating and handling forms in Vue and demonstrate the advantage of using data transformers.

Why Use Data Transformers?

Imagine a situation where the data format required by the API doesn't align with the format in which the form data is maintained internally in the Vue component. This can lead to potential bugs and issues.

Data transformers come in handy in these situations. They act as an intermediary, converting or transforming the data from the form’s internal state to the state needed by the API (and vice versa). This ensures a clear separation of concerns, making the code maintainable and readable.

en uk

A Night Before the Deadline Press Kit

Fact sheet

  • Developer: Harentius
  • Genre: Indie, Adventrue
  • Release Date: June 1st, 2021
  • Platforms: Windows, Linux
  • Price: $3.99
  • Availability: Digital Download
  • Languages: English, Ukrainian
  • ESRB: E for everyone
  • Website
  • Steam page

Request keys hereKeymailer

Description:

A Night Before the Deadline is an adventure story-driven game with a nice low poly aesthetic and ambient soundtrack.
You play as a developer Joe who stays at the office till late night because his boss asked him to finish the work. All you need to do is to collect code fragments written by other developers, merge them and deploy the project. Nothing special, right?
Everything seems to go as planned but at some point strange things start to happen. You see visions you can’t explain and receive phone calls from an unknown number. That person obviously just wants to distract you from doing your work.
Or is he warning you about something? As you progress the work further you begin to realize that something is wrong…

Key features:

  • Explore an empty night office

  • Solve minigame puzzles to progress the story

  • Figure out the cause of your visions and unravel a mystery of an unknown caller

Cypress tests organizing (or any e2e/ui tests)

Nowadays cypress is quite a hype technology (I am saying this in Fall 2020, everyone knows how rapidly js world can change ;))

"Cypress is a next generation front end testing tool built for the modern web."

https://docs.cypress.io/guides/overview/why-cypress.html#In-a-nutshel

I had some experience with Behat and other types of tests like unit/integarational, but today I will tell you about e2e.

When I wrote Behat tests I didn't think a lot about how to structure my test cases in a maintainable way. This led me to the antipattern called "Single-Layer Architecture"[1].

Extending such tests quickly becomes a mess and tends to become an ineffective work:

  1. You can't focus on business logic, you always need to remember low-level details to introduce a new step definition
  2. Your low-level solutions are often duplicated, and you even don't notice that
  3. Changing testing framework means rewriting or updating all step definitions!

Fortunately there is an approach which is very easy to follow and which mitigates mentioned issues.

en uk

How games (or any pet projects) should never be developed

This story is about wasting time and life. It is about Attraction Wars.

Attraction Wars is an online browser game I developed in my free from job time.

I am surrounded with "success stories". But very few new projects (or startups if you want) succeed. According to the different sources, it is less than 10%, I more believe sources which say that it is even less than 1%.

Of course, it dramatically depends on which stage startup was accounted for this statistics... But this story is not about it. I just feel that I should write "story of NOT success", just to dilute all that success stories with other fairy tale.

Honestly I think that history of Attraction Wars development is an example of how games (or any pet projects) should never be developed.

However it teached me a lot, including technologies and outlook, so I hope this experience will be useful for someone. Or only for me as reminder.

But if you are interested of this deep dive to cave, then please go ahead.

Continuous integration using Travis CI and Behat

This note begins a series of notes on application development and deployment processes. To start with, I will show how you can relatively easily implement a code quality and functionality checking process using the Travis CI service.

The practice of continuously checking the build for defects is called Continuous Integration.

The question of writing tests will not be addressed in this article - it is the subject of another article. It is assumed that you have already set up Behat, and the tests can already be run locally using Selenium.

To begin with, let's check if there are any rule violations in the code. This will allow you to familiarize yourself with and start using Travis CI. If you don't have any tests, I strongly recommend at least checking the code style.
The justification for the importance of code consistency and style can be found in many places, for example, Steve McConnell's "Code Complete", part 7, section 31.

Creating backups of server data in Dropbox.

Recently faced with the task of creating server data backups on my vps. Various websites are hosted on it. My personal ones are built on more or less reasonable technologies/engines, so all the code is in version control system. For such sites, only backup of the database and uploaded data is needed. Some third-party sites are built on WordPress, so the source code also needs to be backed up.

So, the task is as follows: with a certain frequency, databases and the contents of certain directories need to be backed up. Backups should be kept for a specific period of time to save space.