<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abirami Velsivananthan on Medium]]></title>
        <description><![CDATA[Stories by Abirami Velsivananthan on Medium]]></description>
        <link>https://medium.com/@abirami.vel?source=rss-cf57b15455d7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KAMuPMrZ6ez-r8oYvfYLMg.png</url>
            <title>Stories by Abirami Velsivananthan on Medium</title>
            <link>https://medium.com/@abirami.vel?source=rss-cf57b15455d7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:01:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abirami.vel/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Streamlining Templates with Built-in Control flow]]></title>
            <link>https://engineering.corzent.com/streamlining-templates-with-built-in-control-flow-2e6d96b6f308?source=rss-cf57b15455d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e6d96b6f308</guid>
            <dc:creator><![CDATA[Abirami Velsivananthan]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 10:30:16 GMT</pubDate>
            <atom:updated>2024-04-09T11:36:01.433Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gp6BdGzTacICqNirZ_CI1Q.jpeg" /></figure><p>In version 17 Angular introduced a range of exciting new features. As a front-end developer, I am particularly interested in the new <strong>built-in</strong> control flow feature. This new functionality will be instrumental in managing the flow of data and the rendering of components in response to various conditions.</p><p>Control flow is an essential aspect of programming. It enables developers to manage the execution of code based on specific conditions, events, or asynchronous operations.</p><p>In this blog, we will explore the new control flow capabilities and limitations of directive-based control flow.</p><h3>Conditional Statements</h3><h4>Replacement of ngIf</h4><p>The ngIf directive in Angular is a powerful tool for conditionally rendering elements in the DOM based on a given expression.</p><p>ngIf is designed to handle a single condition. It’s possible to use logical operators within the expression, but the directive only accepts one condition.</p><pre>&lt;div *ngIf=&quot;isValid; else other&quot;&gt;<br>  Given condition is valid<br>&lt;/div&gt;<br>&lt;ng-template #other&gt;<br>  Given condition is invalid<br>&lt;/ng-template&gt;</pre><p>with the built-in if statement,</p><pre>@if (isValid) {<br>  &lt;p&gt;Given condition is valid&lt;/p&gt;<br>} @else {<br>  &lt;p&gt;Given condition is invalid&lt;/p&gt;<br>}</pre><p>We can now use the variable @else directly instead of the “else” clause when using the *ngIf directive. It’s important to note that traditional directive-based control flows do not allow else-if conditions, but with the new built-in if statements, we can include @else if statements.</p><p>Let’s consider an example of comparing values for the scenario mentioned above.</p><p>In the code below, we need to check whether amount is less than or greater than or equal to zero.</p><pre>@if (amount &gt; 0) {<br>  &lt;p&gt;Amount is a positive value&lt;/p&gt;<br>} @else if (amount &lt; 0) {<br>  &lt;p&gt;Amount is a negative value&lt;/p&gt;<br>} @else {<br>&lt;p&gt;Amount is Zero&lt;/p&gt;<br>}</pre><h4>Replacement of ngSwitch</h4><p>In a situation of a multiple conditional statement,ngSwitch is a structural directive in Angular used for conditionally rendering content based on the evaluation of multiple expressions. It provides a way to choose one among multiple possible templates to display, depending on the value of an expression.</p><p>Angular’s new built-in-control @switch has addressed a very important limitation of the traditional directive-based control flows, *ngSwitch does not provide advanced type narrowing in its individual branches. in contrast,@switch supports template type-checking, including type narrowing within each branch. Also, it does not require a container element to hold the condition expression or each conditional template.</p><p>For example, let’s say we have different types of products that a user can select.</p><p>This is how we would have done it using *ngSwitch.</p><pre>&lt;div [ngSwitch]=&quot;productTypes&quot;&gt;<br>  &lt;p *ngSwitchCase=&quot;&#39;Electronics&#39;&quot;&gt;You selected Electronics.&lt;/p&gt;<br>  &lt;p *ngSwitchCase=&quot;&#39;Cosmetics&#39;&quot;&gt;You selected Cosmetics.&lt;/p&gt;<br>  &lt;p *ngSwitchCase=&quot;&#39;Toys&#39;&quot;&gt;You selected Toys.&lt;/p&gt;<br>  &lt;p *ngSwitchDefault&gt;Unknown Product.&lt;/p&gt;<br>&lt;/div&gt;</pre><p>With the new control flow - @switch,</p><pre>@switch (productTypes) {<br>  @case (&#39;Electronics&#39;) { &lt;p&gt;You selected Electronics.&lt;/p&gt; }<br>  @case (&#39;Cosmetics&#39;) { &lt;p&gt;You selected Cosmetics.&lt;/p&gt; }<br>  @case (&#39;Toys&#39;) { &lt;p&gt;You selected Toys.&lt;/p&gt; }<br>  @default { &lt;p&gt;Unknown Product.&lt;/p&gt; }<br>}</pre><h3>Loop Statements</h3><h4>Replacement of ngFor</h4><p>The *ngFor directive is a structural directive in Angular that enables the dynamic rendering of a set of elements based on an iterable, like an array or a list. It is a powerful tool for generating content in the DOM, especially when working with collections of data.</p><p>As per the Angular team, this new built-in control flow will help with performance improvement. Specifically, they have mentioned the usage of the new For Loop flow that has improvements in rendering times.</p><p>Angular states,</p><blockquote>@for uses a new optimized algorithm for calculating a minimal number of DOM operations to be performed in response to changes in a collection, instead of Angular’s customizable diffing implementation (IterableDiffer);</blockquote><p>I believe this simplifies usage and improves application performance.</p><p>Let’s compare the usage of *ngFor and @for</p><p>We have an array of products that we can display as listed items</p><pre>import { Component } from &#39;@angular/core&#39;;<br>import { CommonModule } from &#39;@angular/common&#39;;<br>import { RouterOutlet } from &#39;@angular/router&#39;;<br><br>@Component({<br>  selector: &#39;app-root&#39;,<br>  standalone: true,<br>  imports: [CommonModule, RouterOutlet],<br>  templateUrl: &#39;./app.component.html&#39;,<br>  styleUrls: [&#39;./app.component.css&#39;]<br>})<br>export class AppComponent {<br>  products: string[] = [&#39;Mobile phone&#39;, &#39;Laptop&#39;, &#39;Smart Watch&#39;];<br>}</pre><p>Displaying the products with *ngFor,</p><pre>&lt;h1&gt;Products&lt;/h1&gt;<br>&lt;div *ngFor=&quot;let product of products&quot;&gt;<br>  &lt;ul&gt;<br>    &lt;li&gt;{{product}}&lt;/li&gt;<br>  &lt;/ul&gt;<br>&lt;/div&gt;</pre><p>How can we simplify this with, @for,</p><pre>&lt;h1&gt;Products&lt;/h1&gt;<br>@for (product of products; track $index) {<br>  &lt;ul&gt;<br>    &lt;li&gt;{{product}}&lt;/li&gt;<br>  &lt;/ul&gt;<br>} @empty {<br>  &lt;ul&gt;<br>    &lt;li&gt;There are no items in the list&lt;/li&gt;<br>  &lt;/ul&gt;<br>}</pre><p>Above, we can notice two important features,</p><ul><li>Track statement: The “track by” expression helps Angular to keep track of the unique key of each item in an array. This key is used to associate the items with the corresponding views in the DOM. By having a clear indication of the item identity, Angular can minimize the number of DOM operations required when items are added, removed, or moved in a collection. New @for statement reduces the performance issue caused by lack of track by statement</li><li>Empty block: You can display the @empty block content when there are no items by including it immediately after the @for statement.</li></ul><p>This concludes the blog’s objective. However, I have some additional tips on how we can migrate to new control flows.</p><p>First, keep in mind that this new feature is still in <strong>developer preview. </strong>So it’s not stable yet.</p><p>You can migrate your angular project control flow with this command (still in developer preview):</p><pre>ng g @angular/core:control-flow</pre><p>It will move all files and sub-directories to the new control flow.</p><p>If we want to keep traditional control flows, we can always import them from CommonModule.</p><pre>import { Component } from &#39;@angular/core&#39;;<br>import { NgIf } from &#39;@angular/common&#39;<br><br>@Component({<br>  selector: &#39;app-root&#39;,<br>  standalone: true,<br>  imports: [NgIf],<br>  templateUrl: &#39;./app.component.html&#39;,<br>  styleUrls: [&#39;./app.component.css&#39;]<br>})<br>export class AppComponent {<br>  products: string[] = [&#39;Mobile phone&#39;, &#39;Laptop&#39;, &#39;Smart Watch&#39;];<br>}</pre><p>In conclusion, Angular v17’s enhanced control flow features offer a powerful toolkit for developers seeking more efficient and expressive ways to manage data and UI rendering. By using the new control flows, developers can streamline their code, improve type-narrowing, and enhance the overall development experience.</p><p>Please share your thoughts and feedback regarding this new control flow. Let me know what you think about it.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e6d96b6f308" width="1" height="1" alt=""><hr><p><a href="https://engineering.corzent.com/streamlining-templates-with-built-in-control-flow-2e6d96b6f308">Streamlining Templates with Built-in Control flow</a> was originally published in <a href="https://engineering.corzent.com/">Corzent</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A fresher software engineer’s life at Corzent …]]></title>
            <link>https://engineering.corzent.com/a-fresher-software-engineers-life-at-corzent-32e0085e4dbd?source=rss-cf57b15455d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/32e0085e4dbd</guid>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[fresh-graduate]]></category>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[beginning]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Abirami Velsivananthan]]></dc:creator>
            <pubDate>Sat, 30 Jul 2022 14:03:03 GMT</pubDate>
            <atom:updated>2023-02-08T23:31:38.602Z</atom:updated>
            <content:encoded><![CDATA[<h3>A fresher software engineer’s life at Corzent …</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IE9JqYH23xKB10fIBU3bLw.jpeg" /></figure><p>Let me take this article 10 months ago, I have just finished the final exams of my 4-year bachelor’s degree. I was searching for jobs as a software engineer. If I remember correctly, I was extremely nervous when I applied to a lot of software companies. The main reason was, this is where my career is going to start, rather than the tech. What is more important is that the team that I am going to work with, I did not want to get into a place where I will be working with modern technologies, but the company environment is incredibly stressful. Luckily, I got a chance to apply at Corzent.</p><p><a href="https://www.linkedin.com/company/corzent/">Corzent Edge</a> is a startup company, which helps clients to develop their ideas through a high-performance team focused on quality and outcome over output. As a beginner in this career path, there will be questions and doubts that will run in mind. I was no exception. I was thinking, will there be any risks? Will this help me in my career path? Will there be space for me to learn new things?</p><p>There is a quote that says, “First impression is the best impression,” well in my interview I was given a chance to ask the doubts that I had. For me, the first and best impression happened when they provided with all the information and how they interacted with me. This gave me confidence in accepting the offer.</p><p>I joined Corzent as an associate software engineer, the tech stack here is Angular and .NET core. I was new to both. Again, I was a bit nervous about this. They made sure I get the confidence by building my knowledge from the beginning.</p><p>On my first day, our chairperson &amp; Co-Founder Mr. Sameera Gunasinghe quoted below Einstein’s quote</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*r6eboh3ro8ZUkBnFPI5BwQ.jpeg" /></figure><p>and he said we should always learn from our mistakes, and we should never do the same mistake again.</p><p>After working here for 10 months, I can say I have made a lot of mistakes but when I did, Team Corzent showed me how to avoid them and be more effective.</p><p>Coming back to the first step I stepped in Corzent life. As I said earlier, they introduced me to a space called Newbie Bootcamp. What is a newbie bootcamp? This is all about building our foundation correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*1DG8mSysi1SKUD7vCjEdFQ.jpeg" /></figure><p>Me and my peer colleagues were given a complete roadmap for a full stack developer. First month we spent entirely on developing our basic skills, revising basic skills, and applying them to a sample project. Even though in the beginning some of the concepts felt like “Why are we learning about them again?” But now I have an answer to them.</p><p>It is always important to develop new skills, but it is equally important to make sure our foundation is strong. A solid foundation will help our mind to think broader than how we usually think.</p><p>After my first month, I was put into one of our company’s projects. So, one of the good things in a startup company is that you are exposed to projects from scratch.</p><p>Our initial work was to gather user requirements. I was nervous because I did not know what questions to ask and most importantly the client is from a western world country, how will they react? My team encouraged me to ask any questions that come to my mind even if I feel they are not valid questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6GFDW53Y6fjaJ3ARHFaJnQ.jpeg" /></figure><p>I was able to ask many questions, and the clients were impressed with us too. That is the moment I realized we should never be afraid of asking questions. Asking questions always gives us confidence and the person who answers will have a good impression of us.</p><p>The Corzent team assigned a mentor for me, my mentor and our team’s one of the tech lead Mr. Deleepa Perera always said that we should never stop exploring. He helped me with how we can tackle any tech problems in an organized way. He always made sure that I improved my knowledge not only for company’s sake but also personal growth as well.</p><p>We always shared good articles and new knowledge that we gained within our team in a gathering called “tech talk.” We get to ask questions, brainstorm, and learn new things.</p><p>Not only technical related things, but Team Corzent has helped me to improve organizational skills. They let me organize small events inside the company. They were always open to my feedback on the company or their process. They never failed to take action on our feedback.</p><p>For the past months, as Sri Lankans we are facing a huge economic crisis, and this is the most stressful period this country has faced. During this tough time our company made a substantial change. They pegged all our employees’ salaries against USD. The most beautiful thing happened within our company is that we had a virtual round table discussion on how we are facing these issues. An open talk within ourselves. Not as co-workers but like a family. They arranged a meditation session for us to overcome this stressful situation. I always felt this is my company, but when they cared about their employees’ mental health more than anything else I felt like family.</p><p>If I want to list everything I have learned so far in one article, that is impossible. I will cover more technical aspects that I have learned here in upcoming articles. In summary I want to let the readers know that Team Corzent not only made me a better software engineer, they also showed me how I can change the impossible to possible.</p><p>In a few months, it is going to be 1 year for me in the company. When I look back, I can see that I have climbed a lot of steps, there were a lot of hurdles, happiness, and surprises, but I can proudly say this path is more beautiful because of Team Corzent.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32e0085e4dbd" width="1" height="1" alt=""><hr><p><a href="https://engineering.corzent.com/a-fresher-software-engineers-life-at-corzent-32e0085e4dbd">A fresher software engineer’s life at Corzent …</a> was originally published in <a href="https://engineering.corzent.com/">Corzent</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>