Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Thursday, June 21, 2012

JQuery


JQuery is a new kind of JavaScript Library.jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.


jQuery is free, open source software, dual-licensed under the MIT License or the GNU General Public License. jQuery's syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications.

Thursday, June 14, 2012

GridView Events Summary

Introduction


In this article i have tried to summarize all the  events of grid view which i came across.



What is a GridView?


The DataGrid or GridView control displays data in tabular form, and it also supports selecting, sorting, paging, and editing the data inside the grid itself. The DataGrid or GridView generates a BoundColumn for each field in the data source (AutoGenerateColumns=true). By directly assigning the data source to the GridView, the data can be rendered in separate columns, in the order it occurs in the data source. By default, the field names appear in the grid's column headers, and values are rendered in text labels. A default format is applied to non-string values and it can be changed.



GridView Fields











Column Name
Description


BoundColumn
To control the order and rendering of columns.

HyperLinkColumn
Presents the bound data in HyperLink controls

ButtonColumn
Bubbles a user command from within a row to the grid event handler

TemplateColumn
Controls which controls are rendered in the column

CommandField
Displays Edit, Update, and Cancel links in response to changes in the DataGrid control's EditItemIndex property.



Wednesday, June 13, 2012

Object Serialization in the .NET Framework

Introduction


Serialization can be defined as the process of storing the state of an object instance to a storage medium. During this process, the public and private fields of the object and the name of the class, including the assembly containing the class, is converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created.


When implementing a serialization mechanism in an object-oriented environment, you have to make a number of tradeoffs between ease of use and flexibility. The process can be automated to a large extent, provided you are given sufficient control over the process. For example, situations may arise where simple binary serialization is not sufficient, or there might be a specific reason to decide which fields in a class need to be serialized. The following sections examine the robust serialization mechanism provided with the .NET Framework and highlight a number of important features that allow you to customize the process to meet your needs.

JSON – Serialization and Deserialization

What is JSON?


JSON is another format of expressing data, just like XML. But, JSON is very simpler than XML, and tiny than XML. So, it is becoming popular in the web world to choose the JSON notation over XML since JSON notation are usually shorter, and less data to be transmitted if at all they were to be.


Okay, I understood a little about JSON. Give me an example!


 I know an example will get your understanding much better. Below is a simple example of how an object can be expressed in JSON notation. Let’s take a classical example of a Person object, and expressing myself as an object.


{

   “firstName”: “Rakki”,

   “lastName”:”Muthukumar”,

   “department”:”Microsoft PSS”,

   “address”: {

      “addressline1”: “Microsoft India GTSC”,

      “addressline2”: “PSS - DSI”,

      “city”: “Bangalore”,

      “state”: “Karnataka”,

      “country”: “India”,

      “pin”: 560028

   }

   “technologies”: [“IIS”, “ASP.NET”,“JavaScript”,“AJAX”]

}

In the above example, address is another object inside my Person, and technologies is an array or strings.

 

Tuesday, June 12, 2012

SQL Tuning or SQL Optimization

SQL Tuning or SQL Optimization


Sql Statements are used to retrieve data from the database. We can get same results by writing different sql queries. But use of the best query is important when performance is considered. So you need to sql query tuning based on the requirement. Here is the list of queries which we use reqularly and how these sql queries can be optimized for better performance.


 Following are some of the techniques that i remember now to optimize the SQL :--


1) The sql query becomes faster if you use the actual columns names in SELECT statement instead of than '*'.


For Example: Write the query as


SELECT id, first_name, last_name, age, subject FROM student_details;


Instead of:


SELECT * FROM student_details;