Tuesday, 28 October 2014

Demystifying Polymorphism: Understanding Its Concept and Implementation in Object-Oriented Programming.

Demystifying Polymorphism: Understanding Its Concept and Implementation in Object-Oriented Programming.

Polymorphism

Polymorphism is a word which is created by a combination of two word Poly and morphism means that a thing which is created by one or more thing
In the polymorphism we create a one object and associated with many name which name is same
means that


Polymorphism means one object behaving as multiple forms. One function behaves in different forms. In other words, Many forms of a single object is called Polymorphism.


there are two type of polymorphism 
1. Compile time poly morphism that is also known as function overloading or operator overloading

or 2. Run time polymorphism that is also known as virtual function 

in function or operator overloding we create on object and associated with same name function
and in virtual function we must override the function

Partial Classes in C#: Understanding Their Purpose and Implementation

What is a Partial Class.

Partial class is one of the most important thing when we work on larger project we can break the concept of interface,class into one or more thing and use partial keyword with each of this so that many of the person can work on them at same time

"To split the definition of a class or a struct, an interface or a method over two or more source files is known as Partial Class."
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UsingPartialClass
{
    public partial class book
    {
        public void study()
        {
            Console.WriteLine("Reading..........");
        }
    }

    public partial class book
    {
        public void watch()
        {
            Console.WriteLine("watch movie........");
        }
    } 
}

class Program
    {
        static void Main(string[] args)
        {
            book obj = new book();
            obj.study();
            obj.watch();

            Console.ReadKey();
        }
    }
it is very necessary to use partial keyword with each portion of the partial class 
access specifier is also attach with each part of partial class




we can create partial interface,struct and method.
we can create partial delegate and enumrator.
Different parts of a partial class can inherit from different interfaces.
nested classes can be specified as partial classes even if the containing class is not partial. An example is shown below.

Understanding ASP.NET, IIS Web Server, and Request Processing

Exploring ASP.NET and IIS Web Server: Understanding Request Handling and Web Gardening

Question :--what is ASP .net IIS web server how this work? how it handle request ? what is web gardening?

Answer :When a request comes from client to the server a lot of operations is performed before sending the response to client browser. This is all about how IIS process the request from client to server. So in this article I will explain about IIS Request Processing and concept of ASP.Net Worker Process and IIS Application Pool. When we run our asp.net web application from Visual Studio IDE, there visual studio integrated asp.net engine is responsible to execute all kind of asp.net requests and responses. The "WebDev.WebServer.Exe" process take care of all request and response of an web application which is running from Visual Studio IDE. So when we want to host the application on a centralized location and wanted to access from many locations. Web server is responsible for handle all the requests that are coming from clients, process them and provide the responses. IIS (Internet Information Server) is one of the most powerful web server from Microsoft that is used to host your ASP.NET Web application. IIS has it's own ASP.NET Process Engine to handle the ASP.NET request. So, when a request comes from client to server, IIS takes that request and process it and send response back to clients. There are two main major concepts available in IIS Process Request:- Worker Process (w3wp.exe) Application Pool Worker Process (w3wp.exe) Worker process is responsible to manage all the request and response that are coming from client system. All the asp.net functionality runs under the scope of worker process. In a single word we can say "Worker process is the heart of asp.net web application which runs on IIS" How to run Worker Process If you are debugging a ASP.NET web application which is hosted on IIS7, you need to attach the particular worker process in Visual Studio to start debugging. To Attach a process we can go to Tools -> Attach Process or use shortcut key Ctrl +P. The process window will show the worker process (w3wp.exe) which is currently running on IIS7. You need to select the process and click on attach button to start the debugging. Application Pool Application pool is the container of worker process. Application pools is used to separate sets of IIS worker processes that share the same configuration. Application pools enables a better security, reliability, and availability for any web application. Application pools allow you to isolate your applications from one another, even if they are running on the same server. This way, if there is an error in one app, it won't take down other applications. Application Pool with multiple worker process is called "Web Garden" Summary : When client request for some information from a web server, request first reaches to HTTP.SYS of IIS. HTTP.SYS then send the request to respective Application Pool. Application Pool then forward the request to worker process to load the ISAPI Extension which will create an HTTPRuntime Object to Process the request via HTTPModule and HTTPHanlder. After that the ASP.NET Page LifeCycle events starts.

AdSense

The Ultimate Guide to Interceptors: Understanding Their Power and Functionality

  The Ultimate Guide to Interceptors: Understanding Their Power and Functionality An interceptor is a service that can intercept HTTP reques...

Follow