Posts

Showing posts from August, 2013

ASP.NET SignalR

SignalR is an Async signaling library for ASP.NET to help build real-time, multi-user interactive web applications. ASP.NET SignalR is a library for ASP.NET developers that makes it incredibly simple to add real-time web functionality to your applications. What we mean to say "real-time web" functionality? Real-time web is the ability to have your server-side code push content to the connected clients as it happens, in real-time. HTML 5 introduces WebSockets which enables bi-directional communication between the browser and server. SignalR uses WebSockets under the cover when it is available and when WebSockets does not available, SignalR gracefully uses other techniques and technologies (i.e. Server-Sent Events, Forever Frame etc) while application code stays the same. SignalR provides a very simple, high-level API which calls JavaScript functions in your clients' browsers from server-side .NET code in your ASP.NET application using Remote Procedure Calls (RPC)

Internet Information Services (IIS) Application Pools

An Internet Information Services (IIS) application pool is a grouping of URLs that is routed to one or more worker processes. Because application pools define a set of Web applications that share one or more worker processes, they provide a convenient way to administer a set of Web sites and applications and their corresponding worker processes. Process boundaries separate each worker process; therefore, a Web site or application in one application pool will not be affected by application problems in other application pools. Application pools significantly increase both the reliability and manageability of a Web infrastructure. An application pool  is a group of one or more URLs that are served by a worker process or a set of worker processes. Application pools set boundaries for the applications they contain, which means that any applications that are running outside a given application pool cannot affect the applications in the application pool. Application pools offer th

Different ways to maintain WCF instance management

The WCF framework has provided three ways by which we can control WCF instance creation. Here will try to understand these ways of WCF service instance control and compare when to use them and under what situations. Normally WCF request and response consists of the following actions: 1.        WCF client makes a request to a WCF service object. 2.        WCF service object is instantiated. 3.       WCF service instance serves the request and sends the response to the client. There are different ways to instantiate WCF service object.  In a simple way, create a new WCF service instance whenever WCF client method calls. Only one WCF service instance should be created for each WCF client session. And third way is only one global WCF service instance should be created for all WCF clients.  WCF provides the ways to handle the above three ways:              Per call       Per session       Single instance Per Call By default WCF is using "Per-Call&quo

GridViewHelper and Nested groups in GridView

Image
Few days ago, One of my team member has faced a problem creating nested groups with a summary of inner group's footer. Following image shows the DataTable picture which contains the data to be bind in the grid. protected void GroupingGridView() {        GridViewHelper moGrouping = new GridViewHelper(this.gvObject);        moGrouping.RegisterGroup("Customers", true, false);        moGrouping.RegisterGroup("Products", true, false);        moGrouping.GroupHeader += new HeaderEvent(GroupHeaderHandler);        moGrouping.RegisterSummary("Amount", SummaryOperation.Sum, "Products");        moGrouping.GroupFooter += new FooterEvent(GroupFooterHandler);        GridViewSummary moGrandSummary = moGroupingIN.RegisterSummary("Amount", SummaryOperation.Sum);        moGrandSummary.Automatic = false;        moGrandSummary.GeneralSummary += new SummaryEvent(GroupSummaryHandler); } In this method, two groups were registered

Basics of WCF

Image
Windows Communication Foundation (WCF) enables applications to communicate whether they are on the same computer, across the Internet, or on different application platforms. The basic tasks to perform are, in order: Define the service contract. A service contract specifies the signature of a service, the data it exchanges, and other contractually required data. Implement the contract. To implement a service contract, create a class that implements the contract and specify custom behaviors that the runtime should have. Configure the service by specifying endpoints and other behavior information. Host the service. Build a client application.  A service contract specifies the following: The operations a contract exposes. The signature of the operations in terms of messages exchanged. The data types of these messages. The location of the operations. The specific protocols and serialization formats that a

How to Create a simple jQuery Plugin

A jQuery plugin is simply a new method that we use to extend jQuery's prototype object. Why should we create plugins? in simple meaning: For re-usability. By extending jQuery, we create reusable components that can be used on any web page. Our code is encapsulated and there is less risk that we will use the same function names elsewhere. How jQuery works: First we will understand a little about how jQuery works. Take a look at below code: // color all <div> tags blue $("div").css("color", "blue"); Note: The jQuery library is named ‘jQuery’, ‘$’ is a shortcut variable that references it. Whenever we use the $ function to select elements, it returns a jQuery object, which is an array-like collection of DOM elements. This object contains all of the methods we have been using (.css(), .click() etc.) and all of the DOM elements that fit the selector (in our example code shown above, all divs). The jQuery object gets these me