In my last project, we needed to create an engine to search available products within a huge set of products. Those products are available in a certain geographic region with many conditions that must match to be returned as a search result. Typical search features also need to be satisfied like the use of filters and pagination.
One of the most important requirements was to solve this with a fast query using coordinates for the customer and the product location. Products availability may be represented in two different ways:
During one of our latest projects, our client told us they would be expecting a specific amount of requests in a short amount of time (think something like 5000 in 10 minutes). Even though the load is not excessive, we decided it would be best to be one hundred percent sure we would not be having trouble once those requests started pouring in. Then Martín and I started automating this task.
One of the important aspects of every application is its architecture. In our case, it being a web application, we were running a PERN stack (PostgreSQL, Express, ReactJS and Node.js) …
“🚀 A fully-featured, production ready caching GraphQL client for every UI framework and GraphQL server” — Apollo Client github repository
As GraphQL backends expose their API over a single HTTP endpoint, we could just use fetch to interact with it. The problem is this doesn’t scale well because we would need to reimplement backend agnostic features on every project, such as caching data, updating the local cache after a mutation, UI framework integration, and more!
A GraphQL client should have those kinds of functionalities so that you don’t have to reimplement these behaviors yourself. …
We will build a basic blog application. Our application will have multiple Users and they will be associated with multiple Posts.
For the sake of simplicity, we will not include authentication. We managed to authenticate users with devise-token_authenticatable by following this tutorial. You can check our project repository and see how we implemented it.
$ rails new <app_name> --api -T -d…
“GraphQL, despite the name, isn’t simply a query language. It’s a comprehensive solution to the problem of connecting modern apps to services in the cloud. As such, it forms the basis for a new and important layer in the modern application development stack: the data graph. This new layer brings all of a company’s app data and services together in one place, with one consistent, secure, and easy-to-use interface, so that anyone can draw upon it with minimal friction.” — Principled GraphQL
The API-Rest architecture suggests that we should retrieve its data according to the routes we are requesting. Let’s say that you want to get the data for a user in our system with
id=1. If we were to ask the API for this data, we would need to make a GET request to
/users/1 to retrieve this user’s data. …
How long does it take you to set up a new project before you can actually start working on it? How many times have you coded the same user model with the same sort of authentication? If you answered, like us, too long and too many times, you might consider creating a boilerplate project.
Using a pre-made template for your new projects has many advantages: less time wasted on set up, consistency across projects, a well-known folder structure to start from. …
During the development of one of the projects I was working on we faced a problem:
We need to let the user know about an incoming event in the fastest (and cleanest) way possible.
The no-brainer solution is polling, but is it the right choice? In this article, I’m going to talk about it, the reasons on why not using it, and present WebSockets as a practical solution to this problem.
Polling is a technique that consists on fetching information on a regular schedule to check for data changes. …
Authentication is crucial in a lot of web apps, as it’s what makes it possible to limit content to some users. For example, if your bank doesn’t handle it properly, anyone could be able to see your bank account data!
The main goal of this article is to show the recommended way to handle routes authorization in vue using vue-router. Although vue-router’s documentation covers this, I thought it would be great to have it all in one place with some simple and understandable code examples.
Only care about the code? Check the github repo
In order to show how this works, we are going to need at least two routes, one that requires authentication and one that doesn’t. Let’s start by creating a simple
router.js file with two routes: Log in and Profile. …
I’ve been in software development for more than 8 years, and have never been taught how to be an effective developer. My only hope was to somehow become a tech guru, but as I started to grow as a developer I also had to deal with clients, projects, epics, complex features, estimations, and that implied more than just understanding the technology I was working on.
The main purpose of this article is to share some of my learnings regarding best practices when it comes to becoming more effective as a developer.
We’ll go through the understanding of: