I have been working with TypeScript for almost 2 years, using it in both frontend and backend. In my opinion, TypeScript makes developers life easier, especially when they have a OOP background.

But why TypeScript?

First of all “how cool is it to have types in JavaScript?” Answer: It’s awesome!!!

It’s very important to have types when writing complex applications or libraries. Types can avoid mistakes and, in my opinion, make the code more readable. Secondly, TypeScript is maintained by Microsoft and they are doing an excellent job updating the language to support the lastest EcmaScript features. Lastly, TypeScript supports all features from ES5, ES2015 and much more: types, generics, enums, interfaces etc…

Tags ,

Every company has, usually, a single service to handle images that allows people to get easy access to them. Microservices aren’t a new thing, but now it’s an hot topic (although I won’t discuss about the advantages of using microservices in this post, I think this is a must read.) – and that’s why I have decided to create a microservice to store images into the file system, and called it ImaUp.

Tags ,

The Bug Effect

All of us have had, on an occasion or another, a co-worker (or even ourselves) changing a piece of code and reintroducing a bug in the project.
The bug then gets to the production environment and it’s reported.

Team reaction: “Damn! I’ve already corrected that”. “Oh, I just missed an if statement”.
Client reaction: “This shit does not work”. “It gets worse with each update”.

In this post I will show how I organize my node.js applications. I’ll start explaning the nodejs principles, with examples.

NodeJs Principles

NodeJs follows the next principles:

Unix philosophy

  • “Small is beautiful”
  • “Make each program do one thing well”

Keep It Simple, Stupid (KISS) principle.

“Simplicity is the ultimate sophistication.” – Leonardo da Vinci

I think I already gave the idea of the way to structuring a node application. Creating microservices to do specific work, separating the complexity and decoupling the responsibilities.

One of the biggest problems that people have with Nodejs is the maintainability of the application. That’s the reason why is better to have 3 different micro applications than a big one.

In this post I’m gonna talk about Cordova and its integration with Visual Studio. For this I created a simple bootstrap project using Cordova, Ionic and Typescript for people that are starting this adventure like me.

What is Apache Cordova?

Cordova it’s a open source platform to develop mobile applications with Web Technologies (Javascript, Html5, CSS). It’s possible to install plugins to access the device native api. For example, if we want to access the camera, we just need to install the camera plugin.

Tags , , , , ,

One of the new challenges I faced at my new job was understanding and adapting to DDD. It can be a bit confusing at first, but as soon as I made sense of it, I couldn’t not recommend it.

In this post i want to explain the basic concept of DDD.

What is DDD?

DDD consists in one domain project that doesn’t depend on anything, while the other projects depend on it. Usually, the domain project contains interfaces, domain entities and utility classes that don’t depend on third parties. Confusing? I’ll explain better in the example below.

Tags , , ,

In this post i will explain how to integrate Jenkins with Nodejs.
Why Jenkis? Because it’s the most popular CI.

What is Jenkins?

Jenkins is a continuous integration application. The main features are:

  • Building/testing software projects continuously
  • Monitoring executions of externally-run jobs

More information here.

Pros:

  • Easy to learn
  • Open Source
  • Good Documentation & Tutorials
  • Plugins for everything

Cons:

  • 404: Not Found
Tags , ,