Understanding Durandal’s Lifecycle

Durandal is a JavaScript framework designed for building modular, single-page applications (SPAs). One of its key strengths is its viewmodel lifecycle, which gives developers precise control over how views and data interact during the application flow. In this post, we’ll explore Durandal’s lifecycle and explain how you can leverage it to create maintainable, responsive web … Read more

Prototype in Javascript

Every function in JavaScript automatically gets a property called prototype. When you use a function as a constructor (with the new keyword), JavaScript sets the new object’s [[Prototype]] to that function’s prototype object. Example: Here’s what’s happening behind the scenes: So when user.sayHello() is called, JavaScript looks for sayHello: The Prototype Chain A key idea … Read more

Top 10 Features of ES6

In this post, we’ll break down the most important features of ES6 and how they can improve your code. 1. let and const Before ES6, we only had var, which behaved unpredictably due to function scoping and hoisting quirks. ES6 introduced: let Block-scoped & re-assignable const Block-scoped & not re-assignable 2. Arrow Functions Arrow functions … Read more

Most Common Mistakes Developers Make in LINQ (and How to Avoid Them)

Language Integrated Query (LINQ) is one of the most elegant and powerful features in C#. It allows you to query collections, databases, XML, and more with concise, readable syntax. But as many developers quickly learn — just because LINQ looks simple doesn’t mean it’s foolproof.Subtle mistakes can cause performance issues, unexpected results, or even runtime … Read more

What’s New in C# 6.0

Introduction C# 6.0, released with Visual Studio 2015 and .NET Framework 4.6, brought several small but powerful features that made code more concise, readable, and expressive. While these weren’t groundbreaking syntax changes, they were aimed at improving developer productivity and reducing boilerplate code. In this post, we’ll go through all the key features introduced in … Read more

Building Custom Action Filters in ASP.NET MVC

ASP.NET MVC gives you a clean separation of concerns — but sometimes, you’ll need to execute certain logic before or after a controller action runs. For example: Instead of repeating the same code in every controller, Action Filters let you inject that behavior globally, per controller, or per action. In this post, we’ll explore what … Read more

Managing State in ASP.NET MVC – A Practical Guide

If you’ve been working with ASP.NET Web Forms, you might be familiar with ViewState — a feature that automatically remembers control values between requests. When you move to ASP.NET MVC, things change. MVC follows the stateless nature of HTTP, which means each request is independent. The framework doesn’t automatically preserve data between requests — you … Read more

Use of Tuple in C#

When writing C# code, we often need to return multiple values from a method. Traditionally, we might create a custom class or struct, or use out parameters. However, since .NET Framework 4.0, we have another option — tuples. Tuples provide a lightweight way to group multiple values into a single object without creating a new … Read more