<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Indraneel Pole - DEVELOPERS.DE]]></title><description><![CDATA[Software Development Blog with focus on .NET, Windows, Microsoft Azure powered by daenet]]></description><link>https://developers.de/</link><image><url>https://developers.de/favicon.png</url><title>Indraneel Pole - DEVELOPERS.DE</title><link>https://developers.de/</link></image><generator>Ghost 1.21</generator><lastBuildDate>Fri, 03 Apr 2026 01:56:39 GMT</lastBuildDate><atom:link href="https://developers.de/author/indraneel/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Unlocking Efficiency: My One-Month Journey with GitHub Copilot in Visual Studio Code]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Over the past month, I’ve embarked on a coding journey with a trusty companion by my side — GitHub Copilot integrated into Visual Studio Code. This AI-powered coding assistant has been nothing short of impressive, revolutionizing the way I write code. Let me share my firsthand experiences and insights on</p></div>]]></description><link>https://developers.de/2023/09/01/unlocking-efficiency-my-one-month-journey-with-github-copilot-in-visual-studio-code/</link><guid isPermaLink="false">64f1c28cc40afa1b00a47cfd</guid><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Fri, 01 Sep 2023 10:59:24 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card-markdown"><p>Over the past month, I’ve embarked on a coding journey with a trusty companion by my side — GitHub Copilot integrated into Visual Studio Code. This AI-powered coding assistant has been nothing short of impressive, revolutionizing the way I write code. Let me share my firsthand experiences and insights on how Copilot has made a significant impact on my development workflow.</p>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2023/9/1110_github-copilot.png" alt="1110_github-copilot"><br>
<strong>A Seamless Experience</strong><br>
One word that comes to mind when I think of Copilot is ‘seamless.’ It seamlessly suggests methods and completes code snippets, accurately hitting the mark eight out of ten times. This incredible efficiency boost has made coding both enjoyable and productive. Gone are the days of slogging through documentation or fumbling through syntax errors; Copilot has your back.</p>
<p>Let’s dive into a few aspects that have made Copilot my go-to companion for the past month.</p>
<ol>
<li>
<p><em>Effortless Coding for Common Tasks</em><br>
GitHub Copilot shines brightest when tackling everyday programming tasks. Whether it’s writing loops, crafting conditions, or implementing recursion, Copilot consistently delivers on-point suggestions. For example, if I am accessing an array or list, Copilot starts suggesting .ForEach loop, and many a times, further implementation in the loop which is near correct 60–70% of the time.</p>
</li>
<li>
<p><em>Method Name Suggestions</em><br>
One of my favorite features is Copilot’s ability to suggest method names. This is particularly handy when working on larger projects where naming conventions matter. Copilot seems to have an uncanny knack for proposing intuitive and relevant method names.</p>
</li>
<li>
<p><em>TypeScript Compatibility</em><br>
In my experience, Copilot shines even brighter in TypeScript projects. TypeScript’s strong typing often requires meticulous attention to detail, and Copilot’s ability to infer types and provide relevant suggestions makes the development process smoother and more enjoyable. For context though, I have only used Copilot for TypeScript and HTML languages in VS Code, and I am comparing the typescript compatibility to HTML in this case.</p>
</li>
</ol>
<p><strong>A Few Minor Hiccups</strong><br>
While Copilot has been a game-changer, it’s not without its quirks. There have been instances where it goes slightly off track, and it’s important to exercise caution.</p>
<ol>
<li><em>Inventing the Unseen</em><br>
One occasional annoyance is Copilot’s tendency to invent code elements that don’t exist in your project. For instance, when referencing an ENUM value, Copilot might suggest enum values that sound legitimate but aren’t part of your codebase.</li>
</ol>
<pre><code class="language-javascript">// Copilot suggesting ENUM values that don't exist
enum Color {
    Red = &quot;RED&quot;,
    Green = &quot;GREEN&quot;,
    Blue = &quot;BLUE&quot;,
}

const selectedColor = Color.Blue;

// Copilot suggesting: Color.Magenta (which doesn't exist in the enum)
</code></pre>
<p>While Copilot’s inventiveness can sometimes be useful, it’s crucial to verify its suggestions, especially in more complex scenarios.</p>
<p><strong>Overzealous Property Generation</strong><br>
While referencing DTOs (Data Transfer Objects) or similar structures, Copilot occasionally suggests properties that are not present in your data model. While it aims to be helpful, you might find yourself cleaning up unnecessary code and if you just blindly implement every suggestion, you might find reference to a property or two, that doesn’t even exist, and have to handle compilation errors.</p>
<p><strong>Conclusion: An Invaluable Coding Companion</strong><br>
In essence, Copilot is like having an experienced pair of coding hands always at the ready. It’s not here to replace developers but to empower them. With Copilot by your side, you can code faster, more accurately, and with a lot less hassle.</p>
<p>So, if you haven’t tried GitHub Copilot in Visual Studio Code yet, I wholeheartedly recommend giving it a go. It might just become your new best friend in the world of coding.</p>
<p><em>Indraneel Pole</em></p>
</div>]]></content:encoded></item><item><title><![CDATA[Cannot reset password in Azure B2C — Quick Solution]]></title><description><![CDATA[<div class="kg-card-markdown"><p>A recent problem I faced on a client project dealt with Azure b2c password management from C# .NET application. The scenario was following — We are using password reset workflow from our application, where when a user wants to reset his/her password, we send them an activation link, clicking on</p></div>]]></description><link>https://developers.de/2022/10/31/cannot-reset-password-in-azure-b2c-quick-solution/</link><guid isPermaLink="false">621604b591a50615e0338d3c</guid><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Mon, 31 Oct 2022 17:05:00 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card-markdown"><p>A recent problem I faced on a client project dealt with Azure b2c password management from C# .NET application. The scenario was following — We are using password reset workflow from our application, where when a user wants to reset his/her password, we send them an activation link, clicking on which we confirm that it is indeed the user who wanted to reset their password. Then we reset the password with a strong random string that passes the Azure password policy and send this to the customer. Customer is forced to change the password on next login with this temporary password.<br>
We recently moved the resources to new tenant and new subscription in Azure and after that the password reset didn’t work anymore. We were getting 403 error with message “Insufficient Privileges”. What was the issue?</p>
<p>After hours of investigation, we found out following problem —</p>
<p>We are using Graph API to reset the password. The API that we are using is, PATCH with endpoint “users/{objectId}”, with PasswordProfile data object. So far so good. To use this API, according to Microsoft documentation, the B2C App needs Directory.AccessAsUser.All. This is something every StackOverflow question and even some Microsoft Forums. What both of those places miss is the clear instruction of how to do it. (Our problem was not that however, but I will explain that a little later).<br>
So to set the correct permission you need to do following —</p>
<ol>
<li>Go to Azure Portal. Open your B2C tenant.</li>
<li>Go to App Registrations. Click on your App.</li>
<li>Go to API Permissions. Here under Configured Permissions. You have option to Add Permission. Click on it.</li>
<li>Select Microsoft Graph -&gt; Delegated Permissions -&gt; and then under Directory, select Directory.AccessAsUser.All</li>
<li>This permission needs Admin Access, so Grant Admin Consent for {your app name}.</li>
</ol>
<p>That’s it. You have granted the needed permission. However, it was not our problem. We had already granted this permission. and still the password reset workflow was not working because of insufficient privileges.</p>
<p>After further probe, we found out a small caveat in document, that is nowhere else documented. We were missing User Administrator role assignment on our Graph API application. What is this role assignment? Graph API application needs the correct role assignement so it can perform the action. this can be set in B2C under roles and administrators.</p>
<ol>
<li>Go to B2C tenant.</li>
<li>Click on Roles and administrators menu from left pane.</li>
<li>Click on User Administrator. It will open the Role in new view. You can alternatively also select Helpdesk Administrator or Password Administrator.</li>
<li>From top menu click on Add assignment and select your Graph App.</li>
</ol>
<p>And this was exactly our problem. When we changed the tenant and Subscription (That was another hell. If you are having a CSP subscription, best luck moving your resources), we lost this role assignment. (Because you need to delete and recreate the Graph App).</p>
<p>The issue is, because for a specific app or identity, you don’t have a view where you can see the role assignment and this creates major confusion. Micrsoft needs to update their UX in this regard. (Are you listening Microsoft?)</p>
<p>Anyway that is the solution to this confusing problem. I hope this post helps someone, being in the same hell as I was couple of days ago.</p>
<p>In next post, I will talk about another strange problem associated with identity creation in B2C.</p>
<p>Until then :)</p>
</div>]]></content:encoded></item><item><title><![CDATA[Happy Birthday .NET - 20 Years of .NET Framework]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Today, .NET celebrates its 20th birthday. According to <a href="https://devblogs.microsoft.com/dotnet/happy-20th-anniversary-net/">Microsoft blog</a>, today there are over five million developers who use .NET for there development projects. That is a huge number. If not the single largest community, this is definitely one of the top largest communities. 13th February, 2002 is when .NET</p></div>]]></description><link>https://developers.de/2022/02/13/20-years-of-net-framework/</link><guid isPermaLink="false">620950dda0287a5898b44b04</guid><category><![CDATA[.NET]]></category><category><![CDATA[.NET Core]]></category><category><![CDATA[ASP.NET Core]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Sun, 13 Feb 2022 21:12:30 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2022/2/132110_FLPqITEVcBAUeln.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2022/2/132110_FLPqITEVcBAUeln.jpg" alt="Happy Birthday .NET - 20 Years of .NET Framework"><p>Today, .NET celebrates its 20th birthday. According to <a href="https://devblogs.microsoft.com/dotnet/happy-20th-anniversary-net/">Microsoft blog</a>, today there are over five million developers who use .NET for there development projects. That is a huge number. If not the single largest community, this is definitely one of the top largest communities. 13th February, 2002 is when .NET was officially launched along side Visual Studio .NET. I was around 12 years old then. I didn't know what .NET is, or what Microsoft does apart from faintly knowing that they make the Word application that I use for my school projects. I didn't know .NET will become such a huge part of my life, or that I will write a blogpost about it on its 20th birthday. But that is life, and here I am.</p>
<p>I am one of those developers who started real coding directly with C#. Yes, I studied C++ in University, and before that C in highschool, so I had some background in this, but I never really coded in any of those two languages. My journey of coding started as C# and .NET developer, and thus this framework holds special place in my heart. I recently read a COOL fact about C# (Pun intended). The original proposed name of C# was - COOL. Which is abbrivation for C-Like Object Oriented Language. From what I have read, they feared trademark issues, and thus decided to go for C++++, which translated to # (Matrix of four + signs) and became C#. But that is just half of the story. The original story is that .NET's C# is the second C# at Microsoft. There is a great article by <a href="https://ricomariani.medium.com/c-88-the-original-c-66a1b5de47d7">Rico Mariani about this from 2018</a>. The original C# was concived at Microsoft in 1988, today the OG peeps from Microsoft call it C#88.<br>
Apparently originally it was written to run the Project Omega, which we now know as Microsoft Access. Eventually for various other reasons, they had to kill the OG C#88 but it still survived as parts in different projects of Microsoft Ecosystem. A lot of cool features from original Visual Studio have their roots in original C#.</p>
<p>From being a close knit, walled framework to being open source, .NET has come a long way. A lot of people, specially the ones who worked with .NET in 2000s and later switched to other frameworks don't realise .NET is no more the guarded framework that they knew from early 2000s. Developers who haven't been in touch with .NET since 2010s usually get really surprised or are outright in denial when I tell them .NET repositories are in top 30 most engaged open source repositories on GitHub since last five years.</p>
<p>I was reading through all the stories and tweets on Twitter with <a href="https://twitter.com/search?q=%23dotNETLovesMe">#dotNETLovesMe</a> and I read so many interesting stories of people writing their journeys of developing with .NET for last 20 years. There are people sharing their first .NET code written in 2003, people who have old installation CDs from 2005, screencaps of first videos of The .NET show and what not. It just makes me realise the huge impact a successful framework can have on society. If data is the new oil, software frameworks are the steel that builds those huge ass refineries and pipes to extract and transport that oil. And I think .NET is and will be ruling this space.</p>
<p>I have been working with .NET for some time now, and I intend to do so for the foreseeable future. I have built Web, Front-End, Android apps, iOS apps, IoT solutions, Raspberry Pi apps, HoloLens apps, Middleware solutions, Windows Forms, Windows Phone Application, WebJobs, CRON Jobs, and of course plain old console apps. I have wrote .NET code on Windows 7,8,10,11, on MacOS, and on Linux. I want to code in .NET for all the possible platform on all the possible platforms. I am excited to see what .NET brings out in future. Aren't you?</p>
</div>]]></content:encoded></item><item><title><![CDATA["Can't bind to 'ngFor' since it isn't a known property" - Angular error and cause of it..]]></title><description><![CDATA[<div class="kg-card-markdown"><p><img src="https://developersde.blob.core.windows.net/usercontent/2021/11/291316_4989799.jpg" alt="291316_4989799"><br>
This is such a beginners problem, you would think.. But today, after developing angular application for more than five years now, I spent my 10 valuable minutes figuring out this issue. And, thus, this blogpost...</p>
<p>So I got this error on my developer tools console, and the first thing that</p></div>]]></description><link>https://developers.de/2021/11/29/cant-bind-to-ngfor-since-it-isnt-a-known-property/</link><guid isPermaLink="false">61a4cf4e57e33e259ccb6079</guid><category><![CDATA[angular]]></category><category><![CDATA[Javascript]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[web framework]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Mon, 29 Nov 2021 13:17:03 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card-markdown"><p><img src="https://developersde.blob.core.windows.net/usercontent/2021/11/291316_4989799.jpg" alt="291316_4989799"><br>
This is such a beginners problem, you would think.. But today, after developing angular application for more than five years now, I spent my 10 valuable minutes figuring out this issue. And, thus, this blogpost...</p>
<p>So I got this error on my developer tools console, and the first thing that came to my mind was I am missing some core module import in my module.ts file. So I checked the imports section of my module.ts file. Everything seemed correct. And so the confusion increased.</p>
<p>After developing various web apps in the framework for five years, you would expect that you know the syntax of the framework. Well, not apparantly, in the hurry, I made two mistakes in the syntax, first I forgot to use &quot;let&quot;. My syntax was -</p>
<pre><code class="language-html">&lt;tr *ngFor=&quot;car in cars&quot;&gt;&lt;td&gt;.....&lt;/td&gt;&lt;/tr&gt;
</code></pre>
<p>Second mistake was using &quot;in&quot; instead of &quot;of&quot;. Correct syntax should be -</p>
<pre><code class="language-html">&lt;tr *ngFor=&quot;let car of cars&quot;&gt;&lt;td&gt;.....&lt;/td&gt;&lt;/tr&gt;
</code></pre>
<p>Yes I made a syntactical mistake, but the error message didn't help me either. ngFor is not a known property would mean for whatever reason, ngFor cannot be recognized in the application. However, the real problem was that ngFor was recognised but the syntax of ngFor was wrong. Anyway, let's hope Angular team improves their logging in future updates.</p>
<p>Until then, happy coding :)</p>
</div>]]></content:encoded></item><item><title><![CDATA[Writing a linear regression algorithm in Python]]></title><description><![CDATA[<div class="kg-card-markdown"><p>When starting with Machine Learning, there are couple of &quot;Hello World&quot; template algorithms that helps beginner understand how basic concepts of ML work. Linear Regression is one of them. In this blogpost we are going to see how to write a linear regression program in Python.</p>
<p>As a</p></div>]]></description><link>https://developers.de/2021/11/28/writing-a-linear-regression-algorithm/</link><guid isPermaLink="false">619e307f57e33e259ccb606d</guid><category><![CDATA[Python]]></category><category><![CDATA[MachineLearning]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Sun, 28 Nov 2021 11:14:43 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2021/11/29121_Linear-Regression-model-sample-illustration_Q640.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2021/11/29121_Linear-Regression-model-sample-illustration_Q640.jpg" alt="Writing a linear regression algorithm in Python"><p>When starting with Machine Learning, there are couple of &quot;Hello World&quot; template algorithms that helps beginner understand how basic concepts of ML work. Linear Regression is one of them. In this blogpost we are going to see how to write a linear regression program in Python.</p>
<p>As a beginner you should still know the basics of python and python libraries such as numpy, matplotlib, pandas etc., as we are going to use these libraries for writing our algorithm.</p>
<p>First, let's start with an example. We have here a dataset, that looks like following -<br>
age,speed<br>
5,99<br>
7,86<br>
8,87<br>
7,88<br>
2,111<br>
17,86<br>
2,103<br>
9,87<br>
4,94<br>
11,78<br>
12,77<br>
9,85<br>
6,86</p>
<p>This data is in a csv file called - <strong>cardata.csv</strong>. Each row of the dataset represents a car. In age column, we have the age of the car, i.e. how old the car is. Under speed column, we have avg. high speed this car can achieve. As it is visible from data, car that is not so old, e.g. age 2 Years, has higher avg. high speed, and car that is older, has lower avg. high speed. Our task is for algorithm to predict the avg. speed of the car based on it's age.</p>
<p>To do that, let's create a new python class - <strong>regression.py</strong>.<br>
We import numpy, pyplot (For plotting the result), pandas (For reading the data from csv file, and scipy for doing the linear regression.</p>
<pre><code class="language-python">import numpy as np
import matplotlib.pyplot  as plot
import pandas as pa
from scipy import stats
</code></pre>
<p>Then we read the csv values in a variable, and write the feature (that is age of the cars), and labels (i.e. avg. high speed of the car) in two separate variables -</p>
<pre><code class="language-python">pd = pa.read_csv(&quot;regression.csv&quot;)
features = pd[&quot;age&quot;]
labels = pd[&quot;speed&quot;]
</code></pre>
<p>Now use stats library from scipy to calculate the linear regression.</p>
<pre><code class="language-python">slope, intercept, r, p, std_err = stats.linregress(features, labels)
</code></pre>
<p>linregress method calculates slope, intercept, correlation cofficient, p-value, and standard error. Using the slope from this, we now calculate line function with the formula - Y = mX + c; where m is slope and c is constant which in our case is intercept.</p>
<pre><code class="language-python">def lineFunc(x):
  return slope * x + intercept
</code></pre>
<p>Now using this line function, we can plot a line classifying our dataset.</p>
<pre><code class="language-python">lineY = list(map(lineFunc, features))
print(lineY)

plot.scatter(features,labels)
plot.plot(features,lineY)
plot.show()
</code></pre>
<p>Which looks like this -<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2021/11/281054_0__SH7tsNDTkGXWtZb.png" alt="Writing a linear regression algorithm in Python"></p>
<p>By looking at this graph we can see the line is pretty much reflecting the data. Now let's use this to predict speed of a car which is 6 years old -</p>
<pre><code class="language-python">speedY = lineFunc(6)
print(speedY)

result -
92.59823399558499
</code></pre>
<p>And that is basically all of it. :)<br>
You can find the complete code on my <a href="https://github.com/poleindraneel/self/tree/main/linear_regression">GitHub Repo</a></p>
</div>]]></content:encoded></item><item><title><![CDATA[5 new changes in Angular 13 - The latest Angular Framework]]></title><description><![CDATA[So, as every six months, Angular team is back with a newer version, an update to Angular 12, with version 13. Angular 13 is the latest in the arsenal of Angular framework, a web framework used not only to build Websites and Web-Apps but also cross-platform mobile applications.]]></description><link>https://developers.de/2021/11/23/whats-new-in-angular-13/</link><guid isPermaLink="false">619cba2257e33e259ccb6066</guid><category><![CDATA[angular]]></category><category><![CDATA[Javascript]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[web framework]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Tue, 23 Nov 2021 11:07:50 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2021/11/23116_download.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2021/11/23116_download.png" alt="5 new changes in Angular 13 - The latest Angular Framework"><p><img src="https://developersde.blob.core.windows.net/usercontent/2021/11/23118_download.png" alt="5 new changes in Angular 13 - The latest Angular Framework"><br>
So, as every six months, Angular team is back with a newer version, an update to Angular 12, with version 13. Angular 13 is the latest in the arsenal of Angular framework, a web framework used not only to build Websites and Web-Apps but also cross-platform mobile applications.</p>
<p>In this blog, we are going to look at the 5 things that are changed/newly introduced in latest version of Angular framework - Angular 13.</p>
<p><strong>1. Full Ivy support</strong> - Ivy support has been in there in Angular for a while now. Ivy is the complete rewrite of the Angular's rendering engine. Actually to be more accurate, it is the fourth rewrite of the Angular's rendering engine, and third since Angular 2 - a version that redefined Angular completely. Since Angular 8, Ivy is available to be used in your projects, but Angular still had backward compatibility with older rendering engine - View Engine. In Angular 8, you had to explicitly Opt-In for the Ivy Engine, since Angular 9, Ivy became standard, and starting with Angular 13, it will be the <strong>ONLY</strong> rendering engine Angular supports. Meaning, if you are upgrading to Angular 13 and are still using View Engine in your project, you have no other option but to also switch to <strong><a href="https://docs.angular.lat/guide/ivy">Ivy</a></strong>.</p>
<p><strong>2. IE 11 Support is removed</strong> - I am surprised, Angular kept the IE11 support until so long, but given that a lot of Enterprise applications are written using Angular Framework, they probably had no choice but to support it. Nonetheless, starting Angular 13, the support for IE11 is now officially removed. This is a breaking change and will affect you if your userbase is not yet switched to new Edge or other modern browsers.<br>
<em>If your website/web-app is predominantly used on IE, it is better not to update to Angular 13.</em></p>
<p><strong>3. Support to enable Built-in validators dynamically</strong> - This is honestly a feature that is going to be very useful for me in my projects. You can now enable or disable the built-in validators like <em>min</em>, <em>max</em>, <em>minLength</em> <em>maxLength</em>, <em>email</em> <strong>dynamically</strong>, meaning no need to write custom workarounds for this. So you can use the validators in the same form conditionally in different use-cases.</p>
<p><strong>4. New type for Forms</strong> - For Angular Forms, a new type <strong>FormControlStatus</strong> has been introduced. It is a union of all the status strings possible for form control. Also the old AbstractControl.status has change of type. From previous type <em>string</em>, it is now shifted to this new type <em>FormControlStatus</em>. Additionally, the StatusChange is now of type Observable<formcontrolstatus> instead of old Observable<any></any></formcontrolstatus></p>
<p><strong>5. Improvements of Component API</strong> - With update to <em>ViewContainerRef.createComponent</em> API, it has become now easier to create a dynamic component in your Angular App. This will also require now less boilerplat code. This means, with new API, you don't need to use ComponentFactoryResolver in order to create a component dynamically. There is no need to pass the componentFactory to the componentRef anymore.</p>
<p>I hope this list helps you in deciding if the new Angular update is worth the trouble, specially if you are already on Version 12. For me personally, version 13 brings a lot of exciting changes, and I cannot wait to update my project..!</p>
<p>Indraneel Pole</p>
</div>]]></content:encoded></item><item><title><![CDATA[Sencha Touch/Ext JS paint event not triggered on iOS 14+]]></title><description><![CDATA[How to solve paint event not being triggered on iOS 14 for Sencha and ExtJs Apps.]]></description><link>https://developers.de/2021/01/06/sencha-touch-ext-js-paint-event-not-triggered-on-ios-14/</link><guid isPermaLink="false">5ff5b84c60715f2b241bb459</guid><category><![CDATA[iOS]]></category><category><![CDATA[iOS14]]></category><category><![CDATA[SenchaTouch]]></category><category><![CDATA[ExtJs]]></category><category><![CDATA[Cordova]]></category><category><![CDATA[iPhone]]></category><category><![CDATA[Javascript]]></category><category><![CDATA[CSS]]></category><category><![CDATA[Mobile Development]]></category><category><![CDATA[Cross Platform App Development]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Wed, 06 Jan 2021 13:38:15 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2021/1/61338_sencha-200.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2021/1/61338_sencha-200.png" alt="Sencha Touch/Ext JS paint event not triggered on iOS 14+"><p>This issue made my life hell.! Yes I can sum up this problem in this one line. So first of all, I am one of those very few developers around the globe who use Sencha/Ext for a mobile application. It is an old application that needs to be supported from time to time for both Android and iOS.</p>
<p>In December 2020, we realized that suddenly after updating to iOS 14, one of the features that uses html canvas not working anymore on iPhone and iPads. The first thought was something is broken on Canvas, because we couldn't draw anything on it. So I started debugging the part of code where I am initializing and using Canvas. Everything looks good. On top of it, it works fine for Android. So the next thought came to mind was something specific to iOS libraries is not working. But it was plain html css code that wasn't working. I couldn't figure out why.</p>
<p>An extensive debugging revealed that issue was with paint event of EXT JS. It wasn't being fired. Thus code written inside this Paint Event subscription wasn't reached.<br>
Now why does paint events are not triggered? NO IDEA WHY.<br>
But it was one step closer to the solution. Finally after fiddling through Stack Overflow, I found <a href="https://stackoverflow.com/questions/62873256/extjs-modern-painted-event-is-not-triggered-in-ios-13-4-wkwebview">this question</a> that saved my life.<br>
Actually this is a css issue.  Just add following code to your app.css and it works</p>
<p><code>.x-paint-monitor.cssanimation { -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; }</code></p>
<p>For webkit, with new iOS update something is going wrong with css animation that cannot be triggered which creates a problem with paint event triggers. Yeah, talk about strange issues.</p>
<p>When I read a little bit more about <strong>animation-fill-mode</strong>, found following explanation - &gt;</p>
<blockquote>
<p>Setting animation-fill-mode: forwards means that after the animation has completed execution, the animation will hold at final properties until it is removed.</p>
</blockquote>
<p>Which would mean that EXTJS is expecting some animation state to fire the paint event that was probably changed in webkit-webview.</p>
<p>I didn't get time to delve deep into iOS changeset. But if I get any time, I will update this blogpost for the same.</p>
<p>Till then. I hope this helps someone like me in distress. :)</p>
</div>]]></content:encoded></item><item><title><![CDATA[Angular 101 - Create your first Angular project from scratch (Angular 11)]]></title><description><![CDATA[Create your first Angular project from scratch. This guide is for latest Angular version Angular v11.]]></description><link>https://developers.de/2021/01/05/angular-101-create-your-first-angular-project-from-scratch/</link><guid isPermaLink="false">5fe222fce7277226c8ed1a9b</guid><category><![CDATA[angular]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[web framework]]></category><category><![CDATA[HTML]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Tue, 05 Jan 2021 11:05:01 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2021/1/5113_download.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2021/1/5113_download.png" alt="Angular 101 - Create your first Angular project from scratch (Angular 11)"><p><strong>How to create your first Angular project from scratch?</strong></p>
<p>So today, we are going to take a look at how to create your first Angular project from scratch. But before that, couple of things that you need to keep in mind. Angular is a web-app development framework. Which means, learning Angular is basically learning the framework. To learn the framework, it is implied that you know the basics of web development such as programming languages, HTML, CSS, Javascript/Typescript, as well as basics of web hosting and development tools such as IDE (I use Visual Studio Code mostly for my needs), Source Control such as GitHub, and a bit of DevOps.</p>
<p>If you are absolutely new to development and not well versed with even basics of HTML or CSS, I would suggest that you first get to know how and what HTML and CSS is before you dive into a full fledged Web Framework. You can find some excellent online resources for this e.g. <a href="https://www.w3schools.com/">W3Schools</a>.</p>
<p>Now to create an absolutely new project, you have to do following things -&gt;</p>
<blockquote>
<ol>
<li>Set up your development environment</li>
<li>Create a workspace</li>
<li>Create the project</li>
<li>Install libraries</li>
<li>Serve the project and lastly</li>
<li>Test it locally</li>
</ol>
</blockquote>
<p>To set up your environment, First install Node.js. You will need the active or maintained LTS version of Node. <a href="https://nodejs.org/en/about/releases/">Find out about them here.</a><br>
Once you have the node environment on your system, you need Node Package Manager. Angular library comes as different packages, such as Angular CLI, Angular Core etc. On top of that, when you need some new library in project, you again have to install them as a package in your project. These packages are maintained and delivered through Node Package Manager. If you are coming from .NET background (Like me), think of it as NuGet Package Manager. Node Package Manager (Henceforth written as NPM) is usually installed together with Node.js. To check that you have the npm client installed, run <code>npm -v</code> in a terminal window. You will see something like this -<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2020/12/221935_2.jpg" alt="Angular 101 - Create your first Angular project from scratch (Angular 11)"></p>
<p>Now run a new command-&gt;<br>
<code>ng new &lt;your-project-name&gt;</code></p>
<p>This will create a new angular project for you. But before that Angular will ask you couple of questions to start with. For example,</p>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2021/1/51048_33333.jpg" alt="Angular 101 - Create your first Angular project from scratch (Angular 11)"></p>
<p>So because we are going to use routing for navigation, let's select y</p>
<p>Then it will also ask you what type of styling format you would prefer?<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2021/1/51050_4444.jpg" alt="Angular 101 - Create your first Angular project from scratch (Angular 11)"></p>
<p>Because I am more comfortable with scss, I always prefer it.<br>
Once you select it, Angular will install all the required framework libraries and node modules.</p>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2021/1/5111_angular.gif" alt="Angular 101 - Create your first Angular project from scratch (Angular 11)"></p>
<p>And that is it basically.<br>
Now you have to run <code>ng serve</code> or <code>ng s</code> to compile the project. Once it is compiled, go to browser and type <strong>localhost:4200</strong> and voila. Your first angular website is on ready.</p>
<p>Now what all can you do with this website? We will see in next post..!</p>
<p>Till then :)</p>
</div>]]></content:encoded></item><item><title><![CDATA[Angular 101: All you need to know about Angular Web Framework..!]]></title><description><![CDATA[Angular is as good a web framework as any with its advantages and disadvantages. Personally for me, the learning curve is good enough and there is enough support on internet to get you going without getting stuck.]]></description><link>https://developers.de/2020/12/21/angular-101-how-to-create-your-first-angular-application/</link><guid isPermaLink="false">5f217da3e5afcf0f74a2d0d6</guid><category><![CDATA[angular]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[web framework]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Mon, 21 Dec 2020 19:11:37 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2020/12/211910_download.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2020/12/211910_download.png" alt="Angular 101: All you need to know about Angular Web Framework..!"><p><strong>SPA, Web Frameworks, and History of Angular..!</strong></p>
<p>I know, I know, another Angular app blogpost. Aren't there already tens of thousands of such blogposts out there? Sure, there are. But the thing with blogposts is, that you don't know how and when they might help someone despite of there being thousands such blogposts already exisitng on internet. For example, just the other day, I was checking on one of my old blogposts about some drag and drop Javascript component, I am sure there are already multiple such code blocks exists on Github or wherever, but still I saw there were four new comments asking for code block that I shared in my blogpost. So I was sure, there are at least four more people reading my blog ;)</p>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2020/12/21196_download.png" alt="Angular 101: All you need to know about Angular Web Framework..!"></p>
<p>Another reason to write this post is, I am working in Angular space for almost 4 years now. I have seen Angular evolving from AngularJS to Angular 10 (And now v11) with all the quirks and workarounds, and bugs and change requests. I have built couple of Enterprise web applications using Angular framework, as well as web app that is now serving tens of thousands of users every month. And still, I haven't shared the knowledge I have gained in all these years as much as I should have.</p>
<p>So this is (hopefully) start of a series of blogposts, that I am planning to write about Angular Framework. After reading this series, the reader should be able to have a basic understanding of Angular framework, and should be able to build a basic CRUD app using Angular.</p>
<p>So enough of introduction. Let's dive into the topic. Angular.</p>
<p>Before you start with creating your first app with Angular, you should know couple of things about Angular. Angular is a SPA, meaning Single Page Application. Single Page Applications are basically web apps that renders a single page on your browser and routes to other components or views inside this single page. This means, techincally you just have one view or one page as your application. Of course you can emulate going to other views or URLs and have different views, but this is done by your framework for you. You don't technically have different HTML page for each of your route. (You can configure your Angular application to do that as well using Angular Universal which is a server side rendering technique, but we will talk about that later in this series, and will update this blogpost with the link of it as and when I do it.)</p>
<p>Here is what <a href="https://en.wikipedia.org/wiki/Single-page_application">Wikipedia has to say about SPAs</a> -</p>
<blockquote>
<p>A single-page application (SPA) is a web application or website that interacts with the user by dynamically rewriting the current web page with new data from the web server, instead of the default method of the browser loading entire new pages. The goal is faster transitions that make the website feel more like a native app.<br>
In a SPA, all necessary HTML, JavaScript, and CSS code is either retrieved by the browser with a single page load, or the appropriate resources are dynamically loaded and added to the page as necessary, usually in response to user actions. The page does not reload at any point in the process, nor does it transfer control to another page, although the location hash or the HTML5 History API can be used to provide the perception and navigability of separate logical pages in the application.</p>
</blockquote>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2020/12/21198_SPA-lifecycle.png" alt="Angular 101: All you need to know about Angular Web Framework..!"></p>
<p><em>Image source : <a href="https://msdn.microsoft.com/en-us/magazine/dn463786.aspx">https://msdn.microsoft.com/en-us/magazine/dn463786.aspx</a></em></p>
<p>There are of course advantages and disadvantages of using Single Page Application frameworks. Biggest advantages are for example, all the required assets including Javascript, CSS, HTML and everything else is fetched and loaded in the browser when the page loads for the first time. Then once everything is loaded, the view change and page change can happen on user interaction, but because everything is already loaded in the browser, you don't have to reload new code assets to load other views or URLs. This makes the transition to other views within the web apps much faster.<br>
This can however also be one of the disadvantages, for example if your application is really big or a monolith, then the initial load can be a little longer, resulting into slower page speed results and poor rankings. This can be solved by framework specific configurations such as Ahead of Time (AoT) Compilation and Lazy Loading. We will talk about them further in this series. (And I will be updating the links in this blogpost as and when I reach that point).<br>
Another disadvantage is, because we are using a Javascript framework, it is difficult for search engines to index the website for SEO, that could result in poor SEO ranking for your website if you are not careful enough. Although Google has started indexing and crawling Javascript websites since around 2015, but it still doesn't give as good result as pure HTML web pages. And because Angular Framework complies Javascript code to HTML on runtime in Browser, it is difficult for Search Engines like Google or Bing to crawl your website correctly for Search Rankings and results. It is possible to overcome this hurdle by using Server Side Rendering which is called Angular Universal in Angular's world. As I said above we will talk about this later.</p>
<p>There are other such SPA frameworks like Angular, and each one of them have their positives and negatives when it comes to web development. Some of them are React, Ember, Vue, ExtJS, Knockout, Meteor etc. You can read about them just by googling about them. For now they are not part of our scope to learn more about Angular.</p>
<p>Angular started with AngularJS which was in pure Javascript. Then it was kind of rewritten and since then if you are using Angular framework, you have to use TypeScript as main language of your coding and development. TypeScript is basically a typed version of Javascript. It is developed and maintained by Microsoft. Here is what <a href="https://en.wikipedia.org/wiki/TypeScript">Wikipedia has to say about TypeScript</a> -&gt;</p>
<blockquote>
<p>TypeScript is a programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. TypeScript is designed for development of large applications and transcompiles to JavaScript. As TypeScript is a superset of JavaScript, existing JavaScript programs are also valid TypeScript programs.</p>
</blockquote>
<p>This breaking change of switching to different approach with moving from AngularJS to Angular 2, created a kind of unique problem for Angular developers. As you know, a big part of developer's advance skillset is to be able to aquire the art of googling the correct solution of your problem on Stack Overflow. (Yes, you read it correctly, because most of us google the problem, and search the Stack Overflow links. I don't even know why Stack Overflow has built their own search) ;) Now if you google for some problem related to Angular, you have to specify something like &quot;XYZ with AngularJS&quot; or &quot;XYZ with Angular 2+&quot; Otherwise you might get mixed results and would be difficult to find the correct solution.</p>
<blockquote>
<p>So, all in all, Angular is as good a web framework as any with its advantages and disadvantages. Personally for me, the learning curve is good enough and there is enough support on internet to get you going without getting stuck.</p>
</blockquote>
<p>I hope this introductory blogpost gives you, the reader, a bird eyeview of Angular. If you are starting afresh in this framework, this should give you a base of understanding on Angular.</p>
<p>In further blogposts, I will talk about creating new App in Angular from start.<br>
Till then.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Implementing Cookie Policy for an Angular App]]></title><description><![CDATA[<div class="kg-card-markdown"><p>So if you are living in Europe and/or working for a company that has the business in Europe, your life as a web developer is already quite messy thanks to Cookie Law and GDPR.<br>
If you are building a web app, you need to keep in mind to implement</p></div>]]></description><link>https://developers.de/2018/10/29/implementing-cookie-for-angular-app/</link><guid isPermaLink="false">5bd7344eaa8ed005f44e743b</guid><category><![CDATA[angular]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[web framework]]></category><category><![CDATA[HTML]]></category><category><![CDATA[cookie]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Mon, 29 Oct 2018 16:49:17 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2018/10/291649_CookieLaw.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2018/10/291649_CookieLaw.jpg" alt="Implementing Cookie Policy for an Angular App"><p>So if you are living in Europe and/or working for a company that has the business in Europe, your life as a web developer is already quite messy thanks to Cookie Law and GDPR.<br>
If you are building a web app, you need to keep in mind to implement a proper Cookie policy that tells your customer that you are storing their session cookies to give them the better web experience. You might also consider giving them opt-out or in more advanced case, explicit opt-in.</p>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2018/10/291641_cookie1.jpg" alt="Implementing Cookie Policy for an Angular App"><br>
Copyright: Hrvoje Jurisic</p>
<p>Moreover, this can be always more irritating, as this is not your primary use case on the website. Thanks to some awesome people and awesome libraries such as CookieConsent, the life of a normal web developer is made quite easy.</p>
<p>In today's blogpost, I am going to write about how to implement cookie banner in Angular Application using <a href="https://cookieconsent.insites.com">cookie-consent</a>.</p>
<p>Cookie consent although has made our lives really really simple, but to correctly implement it in Angular application is a little bit tricky. Specially when you want to use Localisation and envrionment variables for the dynamic links. Of course, there is a plugin for this (Isn't there always a plugin?) But as I am gaining more and more experience in web development, my will to use a third party plugin is going down and down.</p>
<p>So back to our topic, how to implement cookie-consent in an Angular app?<br>
Quite simple. First, take these two references in your index.html file -</p>
<pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css&quot; /&gt;
  &lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<p>These will download relevant javascript and css files from CDN at the time of loading website. Alternatively, you can also download them, and host them inside your application.</p>
<p>Then go to your <mark>app.component.ts</mark> and write following lines of code inside ngOnInit function -</p>
<pre><code>       let cc = window as any;
       cc.cookieconsent.initialise({
         palette: {
           popup: {
             background: &quot;#164969&quot;
           },
           button: {
             background: &quot;#ffe000&quot;,
             text: &quot;#164969&quot;
           }
         },
         theme: &quot;classic&quot;,
         content: {
           message: this.cookieMessage,
           dismiss: this.cookieDismiss,
           link: this.cookieLinkText,
           href: environment.Frontend + &quot;/dataprivacy&quot; 
         }
       });
</code></pre>
<p>Using this, you can localise your message string, and even add environment specific link for <mark>more information</mark> hyperlink.<br>
You can further customise it with your own styles, text, and everything you wish to do.<br>
The final result is, something as beautiful as this -<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2018/10/291648_Sketch.png" alt="Implementing Cookie Policy for an Angular App"></p>
<p>That's it. You can make your Angular application Cookie Law compliance in less then 15 minutes.<br>
Happy Coding. :)</p>
</div>]]></content:encoded></item><item><title><![CDATA[Angular 7 - The Good, The Bad, The Ugly of the latest release]]></title><description><![CDATA[<div class="kg-card-markdown"><p>So Angular's new release is already here, for people like me who are working on the long running Angular projects it might feel that Angular versions are getting released really fast, but for a web framework, this speed seems normal.</p>
<p>I took a quick look last night after it's release,</p></div>]]></description><link>https://developers.de/2018/10/19/angular-7-the-good-the-bad-the-ugly-of-the-latest-release/</link><guid isPermaLink="false">5bc986a043df0f4c0cca4cc6</guid><category><![CDATA[angular]]></category><category><![CDATA[angular7]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[web framework]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Fri, 19 Oct 2018 07:54:24 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2018/10/1989_angular-7.0-top-4-changes.jpg" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2018/10/1989_angular-7.0-top-4-changes.jpg" alt="Angular 7 - The Good, The Bad, The Ugly of the latest release"><p>So Angular's new release is already here, for people like me who are working on the long running Angular projects it might feel that Angular versions are getting released really fast, but for a web framework, this speed seems normal.</p>
<p>I took a quick look last night after it's release, and here is a quick the good, the bad, and the ugly report of new version of Angular - Angular 7</p>
<hr>
<p><strong>1. Application Performance</strong> - Angular 7 comes with better application performance thanks to new tweaks in pollyfills.ts file.</p>
<p>With version 7, now you can also use bundle budget with CLI by setting the bundle size limit. By default you get warning at 2MB, and Error at 5MB. This can be change in <mark>angular.json</mark> this way -</p>
<pre><code>&quot;budgets&quot;: [{
  &quot;type&quot;: &quot;initial&quot;,
  &quot;maximumWarning&quot;: &quot;6mb&quot;,
  &quot;maximumError&quot;: &quot;10mb&quot;
}]
</code></pre>
<p><strong>2. Virtual Scroll, Drag and Drop via Material and CDK</strong> - Material has already received a big update in 2018. With version 7, you get some new additional features such as drag and drop and virtual scroll.</p>
<p><strong>3. Documentation Updates</strong> - Honestly, as a developer who is using Angular since the time of AngularJS, I hate Angular documentation. This is because it is confusing, frustrating to find, and extremely basic at times. Thankfully, it is improving with every update. With Angular 7 as well, you get improved developer guide and reference material for Angular CLI.</p>
<p><strong>4. Dependency Updates</strong> - Also, the dependecy updates come as expected on the following libraries -<br>
TypeScript 3.1<br>
RxJS 6.3<br>
Node 10 along with on going support for Node 8</p>
<p><strong>5. Angular CLI Prompts</strong> - This one is my most favorite one. I love Angular CLI. It is a major help for faster developement. However, without prompts, the learning curve is a little bit steeper. But thanks to update, now you can see the CLI prompts. Yaay.</p>
<h2 id="updatetolatestversion">Update to latest version</h2>
<p>This is always the pain. But to be up to date, you have to do it, no matter what. <a href="http://update.angular.io">update.angular.io</a> provides better documentation on this. However, if you are already on version 6, following commands should be enough for you -<br>
<code>ng update @angular/cli @angular/core</code></p>
<p>So that's all for now.<br>
Happy coding!</p>
</div>]]></content:encoded></item><item><title><![CDATA[Creating a "drag and drop" component for Angular 4+ app from scratch]]></title><description><![CDATA[Creating a drag and drop component in an Angular app to provide file drag and drop feature for file upload]]></description><link>https://developers.de/2018/10/18/creating-a-drag-and-drop-component-for-angular-4-app-from-scratch/</link><guid isPermaLink="false">5bc1deb3181f1d3f60d27dc0</guid><category><![CDATA[angular]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[HTML]]></category><category><![CDATA[CSS]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Thu, 18 Oct 2018 16:01:45 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2018/10/181610_dd1.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2018/10/181610_dd1.png" alt="Creating a "drag and drop" component for Angular 4+ app from scratch"><p>Recently in a project, I had to create a drag and drop component. Now usually, for everything there is already an existing library in Angular framework, and I found couple of them as well. If you are using Angular Material, your life is even more simplified as Material already has &quot;drag and drop&quot; feature. However, I have two problems with Libraries.</p>
<ol>
<li>If it is a third party library, you have to be dependent upon the creator's wish for bug fixing and updates. I recently had a problem with another library for multi-select checkboxes, where I used a certain library for multi-select checkboxes which has absolutely beautiful rendition of multi-select checkboxes with absolutely great styles and design. The only problem - when I tried to build it using AoT build, it failed because there were some AoT compilation errors in the library itself. My build server is configured to build using AoT and I couldn't build this application because of this issue. I created a bug with the said library in GitHub, but I don't know when the developer of this library going to take this bug on the priority and fix it.</li>
<li>The customization options become quite limited for the component if you chose to use a third party library instead of writing it on your own. Sure, some developers give you option to use custom styles, but they also end up giving you limited scope of customization more often than not.</li>
</ol>
<p>Thus, considering these issues, I decided to write my own &quot;Drag &amp; Drop&quot; component instead of using a library for it. This blogpost will explain you the steps to do it yourself.</p>
<p>So here we go -</p>
<ol>
<li>
<p>The HTML part is quite simple to be honest. I have created a drop zone container where user can drop the files. Inside this drop zone, I have an option given to browse the file for those who don't know or want to use the drag and drop feature. Look at the following html code -<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2018/10/131228_new.png" alt="Creating a "drag and drop" component for Angular 4+ app from scratch"></p>
</li>
<li>
<p>Now, we need to show this drop zone as a real drop zone. This we are going to with css styles. Check the stylesheet -</p>
</li>
</ol>
<pre><code>.hcentered {
    text-align: center;
}

.container-row {
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: 15px;
}

.mediaInput {
    margin: 20px;
}

.progressheader {
    display: inline;
}

.refreshicon {
    margin-bottom: 5px;
    margin-left: 10px;
}

h3 {
    text-align: left;
    font-weight: 500;
}

.box-dragndrop,
 {
    display: none;
}

.box.has-advanced-upload {
    outline: 2px dashed #92b0b3;
    outline-offset: -10px;
    -webkit-transition: outline-offset .15s ease-in-out, background-color .15s linear;
    transition: outline-offset .15s ease-in-out, background-color .15s linear;
}

.box.has-advanced-upload .box-dragndrop {
    display: inline;
}

.box {
    font-size: 1.25rem;
    background-color: #f4f8fc;
    position: relative;
    padding: 50px 20px;
}

.box-icon {
    font-size: 6em;
    fill: #92b0b3;
    display: block;
    margin-bottom: 40px;
    text-align: center;
}

.box-button {
    text-align: center;
    display: block;
    margin: 20px auto 0;
}

.box-file {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
    text-align: center;
}

.box-file-label-text {
    text-align: center;
    font-size: 1.3em;
}

.box-file-label {
    max-width: 80%;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    display: inline-block;
    overflow: hidden;
    &amp;:hover {
        color: #e05048;
    }
}

.is-dragover {
    outline-offset: -20px;
    outline-color: #c8dadf;
    background-color: #cdcdcd;
}
</code></pre>
<ol start="3">
<li>And now, it is time to handle the events. To do so, see the html code above. I have registered three events on the drop zone - (drop), (dragover), and (dragleave). On dragover event I am preventing the browser from performing its default action on the dragged object, and then setting a flag to true, which I am using in html to conditionally apply the styles.</li>
</ol>
<pre><code>public onDragOver(event): void {
  event.preventDefault();
  this.isDragged = true;
}
</code></pre>
<p>On dragleave event, I am setting this same flag to false.</p>
<pre><code>public onDragLeave(event): void {
    this.isDragged = false;
  }
</code></pre>
<p>And then, most importantly, I am catching the files that are dragged with (drop) event as below -</p>
<pre><code>public onDrop(event: DragEvent): void {
    event.preventDefault();
    this.isDragged = false;
    if (event.dataTransfer.items) {
      // Use DataTransferItemList interface to access the file(s)
      for (var i = 0; i &lt; event.dataTransfer.items.length; i++) {
        // If dropped items aren't files, reject them
        if (
          event.dataTransfer.items[i].kind === &quot;file&quot; &amp;&amp;
          event.dataTransfer.items[i].type == &quot;application/x-zip-compressed&quot;
        ) {
          var file = event.dataTransfer.items[i].getAsFile();
          this.files.push(file);
         }
      }
    }
  }
</code></pre>
<p>As you can see, I am only selecting the files that are zip and pushing them to list of files.</p>
<p>And basically that's it. You have the drag and drop component in your Angular app.<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2018/10/18160_dd1.png" alt="Creating a "drag and drop" component for Angular 4+ app from scratch"></p>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2018/10/18160_dd2.png" alt="Creating a "drag and drop" component for Angular 4+ app from scratch"></p>
<p><img src="https://developersde.blob.core.windows.net/usercontent/2018/10/18160_dd3.png" alt="Creating a "drag and drop" component for Angular 4+ app from scratch"></p>
</div>]]></content:encoded></item><item><title><![CDATA[Deploying a Node.js Express app to Azure App Service using Visual Studio Code]]></title><description><![CDATA[<div class="kg-card-markdown"><p>So Node.js is really cool if you have to do the rapid prototyping, and that is why I decided to use it in our demo for the Vivatech TechCrunch Hackathon at Paris.</p>
<p>Altough I have never used Node before, I was quickly able to setup a new Node.js</p></div>]]></description><link>https://developers.de/2018/05/26/deploying-a-node-js-express-service-app-to-azure-app-service-using-visual-studio-code/</link><guid isPermaLink="false">5b090c1ff351d9108cc4a0c0</guid><category><![CDATA[node.js]]></category><category><![CDATA[express]]></category><category><![CDATA[Azure]]></category><category><![CDATA[app service]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Sat, 26 May 2018 09:44:17 GMT</pubDate><media:content url="https://developersde.blob.core.windows.net/usercontent/2018/10/1987_1200px-Node.js_logo.svg.png" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://developersde.blob.core.windows.net/usercontent/2018/10/1987_1200px-Node.js_logo.svg.png" alt="Deploying a Node.js Express app to Azure App Service using Visual Studio Code"><p>So Node.js is really cool if you have to do the rapid prototyping, and that is why I decided to use it in our demo for the Vivatech TechCrunch Hackathon at Paris.</p>
<p>Altough I have never used Node before, I was quickly able to setup a new Node.js project and get it running. I was also able to integrate Express framework for all the routing and server logic.</p>
<p>However, when I decided to deploy the app to Azure app service, I found it really hard and confusing to do so. In fact it took me almost more time to deploy this tiny app than finish all the initial setup and coding. To start with, the documentation is really confusing and do not provide a simpler way to do the deployment. On the top of it, if you are not following the Microsoft documentation to create the node.js app, and you have done it on your own, it is almost impossible to be able to deploy the service to cloud.</p>
<p>However, after couple of trial and errors, I found the most optimum way to do the deployment, and avoid all the possible pitfalls, and have decided to write a blogpost about it.</p>
<p>If you are here to see how to write your first Node.js express app, this is the wrong place to lurk in. This blog post is only about deploying the service to Azure app service using Visual Studio Code.</p>
<p>Actually doing this is really easy, once you know how to do it. And that's the catch!</p>
<p>So first, Install Azure App Services plugin in Visual Studio Code!<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2018/5/26933_New%20Bitmap%20Image.png" alt="Deploying a Node.js Express app to Azure App Service using Visual Studio Code"></p>
<p>Once you install it, you will see the Azure icon on left side (Might need to close and open the VS Code). Open the tab, and connect to azure subscription. Once you are connected to azure subscription, you see your subscription.<br>
Add a new app to your subscription, it will take you through the whole process of creating resrouce group, app service plan, and yada yada yada!!<br>
<img src="https://developersde.blob.core.windows.net/usercontent/2018/5/26947_Sketch.png" alt="Deploying a Node.js Express app to Azure App Service using Visual Studio Code"></p>
<p>Once you do it, it is really easy to deploy your code to app, just by right clicking on the new app service, and saying deploy to app. this will pop up a box on top and ask you the folder to select. BUT BEFORE YOU DO THAT!<br>
THERE IS A CATCH!<br>
You need to make sure you have added the web.config file to your project. Without adding this file, your app will show you strange error such as app is unavailable. I copied the file from the github samples <a href="https://github.com/Azure-Samples/nodejs-docs-hello-world">nodejs-docs-hello-world-master</a></p>
<p>Another Tip: Make sure to use process.env.PORT || 3000 in your app.listen function inside server.js instead of hardcoded 3000. This environmental variable you can set to application settings, either from VS Code or Portal. Just the hard coded port number, does not work in cloud!</p>
<p>And that's it. You are done!</p>
</div>]]></content:encoded></item><item><title><![CDATA[Microsoft Quantum Development Kit - Introduction]]></title><description><![CDATA[<div class="kg-card-markdown"><p><img src="https://developersde.blob.core.windows.net/usercontent/2018/4/231540_test.jpg" alt="231540_test"></p>
<p>Quantum Computing is a buzz word for quite sometime now in research world. However developer world is still not caught up with this trend as of yet. There are certain reasons behind that as well. For one, the field quantum computing is still pretty much in research zone. There still</p></div>]]></description><link>https://developers.de/2018/04/23/microsoft-quantum-development-kit-introduction/</link><guid isPermaLink="false">5addd9353e783e2df4541da9</guid><category><![CDATA[Quantum Development Kit]]></category><dc:creator><![CDATA[Indraneel Pole]]></dc:creator><pubDate>Mon, 23 Apr 2018 15:41:48 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card-markdown"><p><img src="https://developersde.blob.core.windows.net/usercontent/2018/4/231540_test.jpg" alt="231540_test"></p>
<p>Quantum Computing is a buzz word for quite sometime now in research world. However developer world is still not caught up with this trend as of yet. There are certain reasons behind that as well. For one, the field quantum computing is still pretty much in research zone. There still has been no stable qunatum computer that can be ran outside research labs. The other thing is Quantum mechanics, the field behind Quantum Computing is quite complex to understand and needs good understanding of physics - classical as well as quantum.<br>
Thus, having no way to get your hands on real quantum computers, developers were still quite out of the loop when it came to this experimental field.</p>
<p>However, with the latest development from Microsoft, this is no more the case. In end of December 2017, Microsoft launched their Quantum Development Kit, which promised developers to get their hands dirty in this sci fi topic. This series of blog posts is to give the basic idea of what Microsoft's quantum development kit offers as well as to explain some quantum mechanics concepts in ELI5 way ;)</p>
<p>So first, let's start with Quantum Development Kit. What is it, and how to use it? Let me be quick upfront with the fact that this is not the real quantum computer. The programs that we will run on this platform will be ran on Simulators and not quantum computers. However, for the first time it gives developers and enthusiasts a way to simulate and learn about quantum development first hand.</p>
<p>To start, you will need to have .NET Core 2.0 on your system. If you already don't have it, <a href="https://www.microsoft.com/net/download/dotnet-core/runtime-2.0.7">please download it from here</a>.<br>
Now, while Microsoft had initially launched this development kit for Windows, it is meanwhile also available for MacOS and Linux. I have tested it on both Mac and Windows, and I am hoping that this development kit is also running seamlessly on Linux.</p>
<p>If you are a Windows user, you have two options to use this kit -</p>
<ol>
<li>Using Visual Studio</li>
<li>Using Visual Studio Code</li>
</ol>
<p>On Windows I tested it using Visual Studio and so let's take a look what Visual Studio offers.</p>
<p>To install Quantum Development Kit -&gt; Install the VSFX package from <a href="https://marketplace.visualstudio.com/items?itemName=quantum.DevKit">Visual Studio Marketplace</a> and install this package. (Make sure all Visual Studio instances are closed while doing so). Once you install it, it will install the development kit, quantum simulator, and Q# language into your visual studio environment. Why Q# you might ask? Because this is the language we will need to use further down the line in order to write our first quantum program.</p>
<p>Now, if you are on Mac (Or Linux), you are only left with one option to use this kit -<br>
With Visual Studio Code</p>
<p>Let's see how this works out. Go to extensions in your Visual Studio Code editor, and then search for <strong>Microsoft Quantum Development Kit</strong>. This is the extension by Microsoft DevLabs. Once you download it, it will download the Simulator and Q# language tools just as in Windows. (Of course, you need to download the .NET Core 2.0 or above if you haven't already).</p>
<p>And that's it actually. That is all you need to do to setup the environment. But, what can we do with this development kit? We will see that in next part. Till then, if you are really interested check the <a href="https://github.com/Microsoft/Quantum">Github repository for samples.</a></p>
</div>]]></content:encoded></item></channel></rss>