Tuesday, 7 July 2015

Diving into OOP (Day 8): Indexers in C# (A Practical Approach)

Introduction

In my last article of this series we learnt about properties in c#. This article of the series "Diving into OOP" will explain all about indexers in C#, its uses and practical implementation. We’ll follow the same way of learning i.e. less theory and more practical. I’ll try to explain the concept in-depth.

Indexers in C# (The definition)

Let’s take the definition from https://msdn.microsoft.com/en-us/library/6x16t2tx.aspx,
"Indexers allow instances of a class or struct to be indexed just like arrays. Indexers resemble properties except that their accessors take parameters."

Roadmap

Let’s recall our road map,


Share/Bookmark

Diving into OOP (Day 7): Properties in C# (A Practical Approach)

Introduction:

My article of the series "Diving into OOP" will explain all about properties, its uses and indexers in C#. We’ll follow the same way of learning i.e. less theory and more practical. I’ll try to explain the concept in-depth.

Properties (The definition):

Let’s start with the definition taken from MSDN
"A property is a member that provides a flexible mechanism to read, write, or compute the value of a private field. Properties can be used as if they are public data members, but they are actually special methods called accessors. This enables data to be accessed easily and still helps promote the safety and flexibility of methods."

Roadmap:

Let’s recall our road map,

Share/Bookmark

RESTful Day #5: Security in Web APIs-Basic Authentication and Token based custom Authorization in Web APIs using Action Filters

Introduction

Security has always been a major concern we talk about enterprise level applications, especially when we talk about exposing our business through services. I have already explained a lot on WebAPI in my earlier articles of the series. I explained, how do we create a WebAPI, how to resolve dependencies to make it a loosely coupled design, defining custom routes, making use of attribute routing. My article will explain how we can achieve security in a WebAPI. This article will explain how to make WebAPI secure using Basic Authentication and Token based authorization. I’ll also explain how we can leverage token based authorization and Basic authentication in WebAPI to maintain sessions in WebAPI. There is no standard way of achieving security in WebAPI. We can design our own security technique and structure which suits best to our application.

Roadmap

Following is the roadmap I have setup to learn WebAPI step by step,


Share/Bookmark

Friday, 12 June 2015

Vote for my article on codeproject for best Web Dev article of June 2015.

Vote for my article on code project for best Web Dev article of May 2015.


Hi Friends,

It gives me immense pleasure to share that my article (http://www.codeproject.com/Articles/997216/RESTful-Day-sharp-Resolve-dependency-of-dependenci) has been nominated in one of the category "Best Web Dev Article of June 2015" on codeproject.com


You can vote on this articles if it helped you by any means.


Share/Bookmark

Thursday, 11 June 2015

RESTful Day #4: Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs

Download Source Code

Introduction

We have already learnt a lot on WebAPI. I have already explained how to create WebAPI, connect it with database using Entity Framework, resolving dependencies using Unity Container as well as using MEF. In all our sample applications we were using default route that MVC provides us for CRUD operations. In this article I’ll explain how to write your own custom routes using Attribute Routing. We’ll deal with Action level routing as well as Controller level routing. I’ll explain this in detail with the help of a sample application. My new readers can use any Web API sample they have, else you can also use the sample applications we developed in my previous articles.

Share/Bookmark

Wednesday, 3 June 2015

RESTful Day #3: Resolve dependency of dependencies using Inversion of Control and dependency injection in ASP.NET Web APIs with Unity Container and Managed Extensibility Framework (MEF)

Download Source Code

Introduction

In my last two articles I explained how to create a RESTful service using ASP.NET Web API working with Entity Framework and resolving dependencies using Unity Container. In this article I’ll explain how to create a loosely coupled system with Unity Container and MEF(Managed Extensibility Framework) using Inversion of Control. I’ll not be explaining much theory but rather focus more on practical implementations. For the readers who are following this series, they can use their existing solution that they have created till time. For my new readers of this article, I have provided the download link for the previous source code and current source code as well.
For theory and understanding of DI and IOC you can follow the following links: Unity and Inversion of Control(IOC).

Roadmap



Share/Bookmark

Thursday, 21 May 2015

RESTful Day #2: Inversion of control using dependency injection in Web API's using Unity Container and Bootstrapper

Introduction

My article will explain how we can make our Web API service architecture loosely coupled and more flexible. We already learnt that how we can create a RESTful service using Asp.net Web API and Entity framework in my last article. If you remember we ended up in a solution with a design flaw, we’ll try to overcome that flaw by resolving the dependencies of dependent components. For those who have not followed my previous article, they can learn by having the sample project attached as a test application from my first article.




Share/Bookmark

Tuesday, 12 May 2015

RESTful Day #1: Enterprise Level Application Architecture with Web API’s using Entity Framework, Generic Repository Pattern and Unit of Work

Introduction

I have been practicing, reading a lot about RESTful services for past few days. To my surprise I could not find a complete series of practical implementations of ASP.NET Web API’s on the web. My effort in this series will be to focus on how we can develop basic enterprise level application architecture with Web API’s.


Share/Bookmark

Sunday, 14 September 2014

A Practical Approach: News

A Practical Approach: News: Vote for my article on code project for best c# article of August 2014. Hi Friends, It gives me immense pleasure to share that my artic...

Share/Bookmark

Thursday, 11 September 2014

Diving in OOP (Day 6): Understanding Enums in C# (A Practical Approach)

Introduction

My article of the series “Diving in OOP” will explain enum datatype in C#. We’ll learn by doing hands on lab and not only by theory. We’ll explore the power of enum and will cover almost every scenario in which we can use enum. We’ll follow a practical approach of learning to understand this concept. We may come across complex examples to understand the concept more deeply.


Share/Bookmark

Saturday, 12 July 2014

News: VOTE FOR MY ARTICLE ON CODE PROJECT.

News

It gives me immense pleasure to share that my article (http://www.codeproject.com/Articles/792326/Diving-into-OOP-Day-All-About-Csharp-Access-Modifi) has been nominated in one of the category " Best C# article of the month July 2014" on codeproject.com


You can vote on this articles if it helped you by any means.

Share/Bookmark

Friday, 11 July 2014

Diving into OOP (Day 5): All About C# Access Modifiers (Public/Private/Protected/Internal/Sealed/Constants/Static and Readonly Fields)

Introduction

Thanks to my readers for their tremendous support which has motivated me to continue this OOP series further.
We have already covered almost all the aspects of Inheritance and Polymorphism in C#. My article will highlight almost all the aspects/scenarios of access modifiers in C#. We’ll learn by doing hands on lab and not only by theory. We’ll cover my favourite topic Constants in a very different manner by categorizing the sections in the form of “Labs”. My effort in this article will be to cover each and every concept of the related topic, so that at the end of the article, we can confidently say that we know “All about access modifiers in C#”. Just dive into OOP.


Share/Bookmark

Thursday, 5 June 2014

Diving in OOP (Day 4): Polymorphism and Inheritance (All About Abstract Classes in C#)

1. Introduction

We learnt a lot about polymorphism and inheritance. In this article of the series “Diving in OOP”, we’ll discuss about the most hot and exciting topic of OOP in C#, i.e., Abstract Classes. The concept of Abstract classes is the same for any other language, but in C# we deal with it in a bit different way. Abstract classes play a different and very interesting role in polymorphism and inheritance. We’ll cover all the aspects of abstract classes with our hands-on lab and theory as an explanation to what output we get. We’ll also list down points to remember at the end of the article.


Share/Bookmark

Sunday, 18 May 2014

Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time Polymorphism)

1. Introduction

This part of the article series will focus more on run time polymorphism also called late binding. We’ll use the same technique of learning, less theory and more hands-on. We’ll take small code snippets to learn the concept more deeply. To master this concept is like learning more than 50% of OOP.



Share/Bookmark

Friday, 16 May 2014

Diving in OOP (Part 2) : Polymorphism and Inheritance (Inheritance)

Introduction

In our first part of the article, we learned about different scenarios of method overloading and did lots of interesting hands on too. My article in the second part of the series will focus solely on inheritance concept in OOP. Let’s define Inheritance using some bullet points:


Share/Bookmark