Hello Fabio, you are the one who brought the Angular community to Rome! You are also the one who talked about refactoring an application during one of the #AperiTech meetups. Could you tell us more about this?
Exactly: on that occasion, lasting a couple of hours, I took a written application in an almost procedural way, then a single giant file where we had a small CRUD application, with the classic operations (insertion, writing, deletion), and I performed a refactoring by subdividing the component code, applying a module approach, exploiting the depending injection in an optimal way. I showed the meetup attendees how to switch from a “scrambled” code with the so-called spaghetti code to something more structured and scalable, which is one of the advantages of using Angular, i.e. providing all the means to be able to write codes of extremely high quality.
It’s not easier to write it because it requires more time, more attention. Writing everything in a single file rather than splitting it into different units takes more time but is more sustainable, scalable and readable, even by colleagues. The important thing is to understand the following fact: writing good code doesn’t mean being more productive in the short term, because it clearly requires more attention, but in the medium/long term it offers great advantages.
We totally agree with you! What’s your story?
You found yourself choosing between programming languages and you chose Angular. What are the future prospects for this technology?
What I notice, through contact with very many companies, is that many are trying to migrate the entire front-end, especially in the scope of enterprises like banks with the software of a certain nature, with a medium-long life cycle. In many of these cases, we’re trying to replace the front-end previously developed in Java (usually in JSF or DotNet) with Angular.
Migrations are delicate stages and the process happens slowly. It must be said that Angular 7 has only been released in beta for a few days, and it’ll be in the next few months that it’ll gain prominence, greatly changing the perspective of Angular itself, because currently, the bundle size (the total size of the application) is a bit big compared to a React or a View. For example, we come to a “hello world” of 300k, against the 60/20k of other frameworks which are therefore significantly lower. However, it seems that in Angular7 you’ll be able to have a bundle size of about 3/4k in “hello world” and this could change the perspective, attracting a new target, for example, that of websites or micro applications.