Caching static content in IIS

Most of the websites today use client side scripts, styles and images. When browser requests a webpage, it has to make n number of HTTP requests to get each of these resources. Caching, combining, compressing are few techniques we use to improve the performance of such websites. In this blog I will concentrate on caching images using IIS settings. 

Basics of ASP.NET MVC Model Binding

In this blog I will document some of the basics of asp.net mvc model binding. Model binding is the process when action parameters are populated from the ASP.NET request data. Two things happen in this process - collecting data from the request and populating the model with that data. The first part is achieved by value providers and the second part is achieved via model binders.

Task and ConcurrentQueue

In this blog, I will create a sample to demo the usage of Task and ConcurrentQueue. Task allows us to represent an asynchronous operation. ConcurrentQueue is a FIFO data structure similar to Queue, however, it is thread-safe. Thread-safe means that we will not have undesirable results in case multiple threads operate over this data structure.

ASP.NET MVC Caching

In this blog post, I will document the caching mechanism provided in ASP.NET MVC3. MVC allows us to cache results from the whole controller or just some selected actions. It also provides parameters which help in configuring caching according to our needs.

HTML 5 - Web Sockets and Microdata

In this blog, I will continue to look at the new features of HTML5. This time I will pay attention to web sockets and microdata. Read on to learn more.

HTML5 - Web Storage and Offline Capabilities

In this blog, I will try to understand the new concepts with HTML5, namely, web storage which allows storing data on client side easier and offline capabilities which allow web apps to function even if they are offline.

HTML 5 GeoLocation Example

In this blog, I will try to create a simple sample which uses the new geo location feature of HTML5. Read on -

JQuery Cheatsheet

To be good at JQuery, it is very important to understand and know how to select the HTML DOM elements. In this blog, I just wanted to provide some examples (more on the lines of a cheat sheet) of JQuery selectors which I use most often. I also wanted to document some of the methods that I use most of the times. I didn't want to go through JQuery documentation all the time. As I said, this list is not comprehensive but these are the items I use the most.

EF Code First Example

Entity Framework (EF) recently started supporting code-first development. This means that we don't have to create our database first before we can write any code. It allows developers to create their models (business entities, data objects etc) and then it will automatically create the database after very little configuration. I wanted to see how EF handles relationships. So I created this sample to demonstrate how EF code first handles many-to-many relationship.

.NET Reactive Extensions Rx - 3 (Cleanup)

In this blog, I will create a small app to describe how to perform cleanup after the Rx subscription has finished its work.

.NET Reactive Extensions Rx - 2 (Concurrency)

In this blog, I will further explore Rx framework and specifically look into the concurrency and threading enhancements because I think this is where most of the value for Rx is.

.NET Reactive Extensions Rx - 1 (Basics)

In this blog, I will explore the reactive extensions (Rx) framework. Rx extends .NET. Rx extends LINQ so that results of a query can be converted to an observable sequence. Let's explore more..

HTML 5 Basic Examples

In this blog, I will try to understand what is HTML5 and what enhancements it brings over current HTML. I will also try to write some sample code to demonstrate the new features.

Android - 2 (Eclipse project)

Now that I understand some of the basics of Android development, I will start exploring more into the Android and Eclipse project and get a better idea about what the files in this project mean. Then I will try to create a simple app to sort of gel all the ideas together. Lets get started -

Android - I

In this blog, I will look into the overview of Android and how we can use .NET to build applications for Android. I will continue to explore more until I am ready to create an android app and publish it in the android market. 

Out for a while

Last few days, I haven't posted any new blog. That is partly due to laziness and mostly due to Cricket world cup. Also, now I am leaving for India for a month, so there will be no blogs in April as well. I hope to be back to studying and writing from May. 

HttpModule and HttpHandler

HttpModule and HttpHandler provide mechanism to execute some logic before the page is requested. In this blog I will create a simple demo which shows the utility of these two components.

C# Set Operations

In this blog, I will cover 2 data structures, namely, HashSet and SortedSet and will create small examples to show how we can achieve mathematical set operations of Union, Intersect, Minus etc with these data structures.

Windows Azure - Part 2 - Publishing to Cloud

In this blog, I will reiterate steps to publish a simple solution to the cloud.

LINQ Examples

In this blog, I will try to create samples of LINQ extension methods which are very helpful in accomplishing things which earlier would take 10-15 lines (or more) of code and were difficult to manage as well as to understand. I will also try to keep this blog as a running list of good LINQ extension methods.

Encodings

In this blog post, I will explain how to play around with different types of encodings using C#. I will mainly concentrate on ASCII, UTF-8 and UTF-16.

Storing BLOBs, CLOBs and XML in SQL

In this blog post, I will explore how to use OPENROWSET in SQL to perform operations for BLOBS, CLOBS, external XML files etc.

Windows Azure - Part 1 - Overview

In this blog post, I will cover the basics of Windows Azure and cloud computing. 

Dynamic keyword in C#

In this blog post, I will try to understand the dynamic keyword that was introduced in C# 4.0. These notes are from Alexandra Rusina's article.

Singleton Pattern

In this blog post, I will try to create an example demonstrating the usage of singleton pattern.

Factory Pattern

In this blog post, I will try to create a simple program which will demonstrate the utility and significance of the factory pattern.

Migration from 32bit to 64bit Projects in .NET

In this blog post, I am going to explain the solution for a few issues that I had working with 32bit and 64 bit Operating systems and what we should do to create applications that would work without any code changes in any environments.

Reading a web page

Many times there is a need to read a web page programatically. That is, get the html through code and parse through it to search what you want. Codeplex has a DLL named HTML Agility Pack (HAP) that comes to our rescue.

Saving Application State in Windows Phone 7

In the last post, I created a small app to store the page state. In this blog post,  I will try to create an app that stores some counters across the application lifetime. We will store two counters: 1. How many times this app was used 2. Last datetime this app was used.

Saving Page State in Windows Phone 7

In this blog post, I will try to create a sample app in which we store the page state. By default, once you move away from your windows phone app, the page state is not stored. We need to take measures to store the page state when deactivating and restore the page state when activating.
Read on to see the code snippets and explanation -

IValueConverter Example

WPF and Silverlight extensively use XAML and data binding. Sometimes, such scenarios come up where we need to bind a control to a property but the property value needs to be converted to something which makes sense for the control. That's where IValueConverter comes in.

Windows Phone 7 - Overview

Happy New Year 2011!! 
In this blog post, I will take a look at Windows Phone 7 and how to develop an application for this platform. Why should we develop for Windows Phone 7 -
  • There is a huge market for mobile apps
  • Consumers expect all of their apps (even business apps) to have mobile components

Extension Methods in LINQ

In this blog, I will create a sample of a very useful feature provided by LINQ. These are called extensions and can be very handy to write helpful methods.

Stopwatch

Many a times I had to measure the time a method, a module or a functionality is taking. The only way I knew till now was to do it the DateTime way. Now, there is a new class to help us out with that: Stopwatch

Helpful SQL Commands

SQL server provides a rich set of commands to do operations other than the normal CRUD operations. In this blog, I will try to maintain a list of commands that are frequently used and required.

Simple PLINQ example

I love LINQ. From the onset, I liked the idea of having a simple and similar way of accessing any kind of data, be it objects, be it SQL data or xml or any other structured form. MSDN says that PLINQ is a parallel implementation of LINQ to objects. In this blog, I am providing a simple sample about one of the operators for PLINQ.

Data WareHousing and Business Intelligence

In this blog, I look at some of the theoretical concepts behind Data Warehousing and how Data Warehousing helps in achieving Business Intelligence.

Certificates

In this blog, I will examine the basics of cryptography and usability of IIS Certificates. I will also describe symmetric key cryptography, public-private key cryptography, digital signing and SSL.

WCF RIA Services - Authentication/Authorization

In this blog, I continue to research on the Authentication/Authorization piece of WCF RIA Services. If you haven't read the overview, I encourage you to do so in my previous blog post titled "WCF RIA Services Overview". For Authentication/Authorization read on...

WCF RIA Services Overview

WCF RIA Services makes it easy to concentrate on the data and business logic rather than worrying about creating multiple layers. Besides that it also simplifies querying, updating, validation and authentication among other features.

Iron Ruby DLR Sample

Recently, I created a very simple Iron Ruby sample for understanding how it works and what is the concept of DLR (Dynamic Language Runtime). DLR is built on top of CLR (Common Language Runtime). In .NET you can create apps which use IronRuby dynamic code and run them with the help of DLR.

HTTP

In this blog, I will document some basic concepts about HTTP. HTTP stands for Hyper Text Transfer Protocol and is a way to communicate between a server and a client. I will also look into some of the Headers associated with HTTP.

INotifyPropertyChanged and ObservableCollection

In case of binding scenarios, earlier, developers had to write code to make sure that UI and internal objects are all in sync with each other. With INotifyPropertyChanged interface and ObservableCollection<T>, it has become simple to keep those layers in sync.

Useful DOS/Powershell Commands

In this blog, I wanted to document some of the nice DOS/powershell commands that I frequently use.

Some Excel Formulas

Most of the people who use computers, have in some way or form used excel. Its always handy to know few important excel formulas that can help us write 1-liner code that otherwise in normal programming languages like C, C++ or even C# would have taken 10 or more lines of code. In this blog post, I will keep a list of helpful excel formulas.

Events

As I mentioned in my delegates article, it took me quite a lot of time to understand the importance of delegates and events. For some time, I was confused as to when would I need events. I understood the button click events but was not able to come up with a concrete non-UI scenario in which I would like to use events. In this blog post, I will share a scenario which made it very easy for me to understand events. I hope this makes it simple for you too - 

Action and Func Delegates

Earlier in .NET, we had to declare our own delegates definitions. This was cumbersome and more importantly not very intuitive. It took me a lot of time to understand the concepts of delegates. The newer versions of .NET frameworks come up with two handy delegates that are very easy to use -

ASP.NET Authentication

Authentication: Who are you? Default: Windows
Authorization: What are you allowed to do? Default: Anonymous