<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>T. S. Pawan</title>
	<atom:link href="http://tspawan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tspawan.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 24 Jan 2011 08:50:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tspawan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>T. S. Pawan</title>
		<link>http://tspawan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tspawan.wordpress.com/osd.xml" title="T. S. Pawan" />
	<atom:link rel='hub' href='http://tspawan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Entity Framework</title>
		<link>http://tspawan.wordpress.com/2010/11/29/entity-framework/</link>
		<comments>http://tspawan.wordpress.com/2010/11/29/entity-framework/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 14:24:19 +0000</pubDate>
		<dc:creator>T.S. Pawan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tspawan.wordpress.com/?p=46</guid>
		<description><![CDATA[What is an Entity? Entities are instances of EntityTypes; they represent the individual instances of the objects (such as candidates, opening) to which the information pertains. The identity of an entity is defined by the entity type it is an instance of; in that sense an entity type defines the class an entity belongs to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=46&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>What is an Entity?</strong></p>
<p>Entities are instances of EntityTypes; they represent the individual instances of the objects (such as candidates, opening) to which the information pertains. The identity of an entity is defined by the entity type it is an instance of; in that sense an entity type defines the class an entity belongs to and also defines what properties an entity will have. Properties describe some aspect of the entity by giving it a name and a type. The properties of an entity type in ADO.NET Entity Framework are fully typed, and are fully compatible with the type system used in a DBMS system, as well as the Common Type System of the .NET Framework.</p>
<p><strong>What is Entity Framework?</strong><br />
The ADO.NET Entity Framework enables developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications. Entity Framework applications provide the following benefits: </p>
<p>•	Applications can work in terms of a more application-centric conceptual model, including types with inheritance, complex members, and relationships.</p>
<p>•	Applications are freed from hard-coded dependencies on a particular data engine or storage schema.</p>
<p>•	Mappings between the conceptual model and the storage-specific schema can change without changing the application code.</p>
<p>•	Developers can work with a consistent application object model that can be mapped to various storage schemas, possibly implemented in different database management systems.</p>
<p>•	Language-integrated query (LINQ) support provides compile-time syntax validation for queries against a conceptual model. </p>
<p>ADO.NET Entity Framework abstracts the relational (logical) schema of the data that is stored in a database and presents its conceptual schema to the application. For example, in the database, entries about a candidate and their information can be stored in the Candidates table, their opening in the Openings table and their contact information in yet another Contacts table. For an application to deal with this database, it has to know which information is in which table, i.e., the relational schema of the data is hard-coded into the application.</p>
<p>The disadvantage of this approach is that if this schema is changed the application is not shielded from the change. Also, the application has to perform SQL joins to traverse the relationships of the data elements in order to find related data. For example, to find the opening of a certain candidate, the candidate needs to be selected from the Candidates table, the Candidates table needs to be joined with the Opening table, and the joined tables need to be queried for the opening that are linked to the candidate.</p>
<p>This model of traversing relationships between items is very different from the model used in object-oriented programming languages, where the relationships of an object&#8217;s features are exposed as Properties of the object and accessing the property traverses the relationship. Also, using SQL queries expressed as strings, only to have it processed by the database, keeps the programming language from making any guarantees about the operation and from providing compile time type information.</p>
<p>The mapping of logical schema into the physical schema that defines how the data is structured and stored on the disk is the job of the database system and client side data access mechanisms are shielded from it as the database exposes the data in the way specified by its logical schema.</p>
<p><strong>Why we should use Custom Entities instead of Dataset?</strong><br />
In order to use a Dataset inside the presentation layer, we need to have knowledge about data structures (i.e. tables, columns and rows hosted by the Dataset), so we don’t have real abstraction from the data layer. Anyway a Dataset makes easier to develop data binding code.<br />
Custom Entities are usually slim, from an XmlSerialization point of view, and there are also tools, like System.Xml.Serialization attributes, to make it even slimmer.<br />
We’ve to pay the due to fill the entities with our data, being careful of not building monster with multiple heads, with GB and GB of RAM filled with data that should be kept inside the DBMS engine. Remember that custom entities are the containers of small instance data and not a replacement for your DBMS, like Dataset.<br />
Custom entities provide the means to expose real data in easy-to-access APIs without forcing every data model to fit in the relational model. Like it or not, in the real world all data is rarely entirely relational. By using Datasets, you render data with some approximation, albeit without loss of information.<br />
Custom entities supply strong typing and more compact, faster objects. At the same time, they are abstract enough to require no changes to the DAL if the underlying database schema changes. Being custom classes, they enable you to incorporate information aggregated from multiple sources and represent free-form and hierarchical data. A custom class can be marked as serializable and serialized through any super-optimized algorithm.</p>
<p> 	Dataset	Custom Entities<br />
Built-in support for concurrency	Yes	To be added<br />
Data Relationship	Yes	No<br />
Serialization	Inefficient in .NET Framework 1.x	To be added<br />
NULL values	No	To be added<br />
Schema abstraction	Yes	Yes<br />
Strong typing	No	Yes<br />
Support for hierarchical data	Yes, but through a relational API	Yes<br />
Free-form data	No	Yes<br />
Custom behavior	No	Yes<br />
Ease of development	Yes	No, but can be improved through code generation<br />
.NET data binding	Yes	To be added; requires the implementation of several additional interfaces<br />
Interfacing with Web services	Costly, unless knowledge of the object is assumed on the client	Yes<br />
XML integration	Yes	To be added<br />
Expression language	Yes	To be added<br />
Data aggregation	Yes	To be added<br />
Why do we need interfaces?<br />
Interfaces are a very logical way of grouping objects in terms of behavior. When multiple developers start building a large scale ASP.NET application, the site&#8217;s design often suffers from two common problems:<br />
1.	Quality control<br />
2.	Flexibility<br />
One reason quality control suffers is because it is natural for developers to give the functionality of their components different method names. For example three developers creating similar components may opt to name related functions with different names. Second, flexibility will suffer unless there is a convenient way to reference dynamically called components. For example, imagine a particular ASP.NET page loads a set of User Controls specified through querystring values. Once these controls have been loaded, they each might have differently named methods or properties that need to be called / set. With a gaggle of different User Controls that could be loaded, and each with different method and property names, the page&#8217;s source code will quickly become unreadable.<br />
It is possible, though, to solve these quality control and flexibility issues through the use of .NET interfaces.<br />
During the process of designing an application using OOP Paradigm, the application will be designed as a set of classes indicating how objects will be created each with specific status and behavior, as well as defining the ways of interaction between those objects. By this way, almost every class indicates a type (an abstracted data type in a more specific manner).<br />
Interfaces also enhance abstraction which is a core principal of OOP; design patterns like the factory pattern make a perfect use of interfaces through abstracting objects to know which implementation of a certain object type is provided. Interfaces make it very flexible to change implementations of services especially in multilayer applications.<br />
Another benefit of interfaces shows up during the development of large projects by large teams, at which the interface acts as a specification for developers with the set of methods they need to implement in classes of a certain type.<br />
Why “Microsoft Data Access Application Block”?<br />
The Data Access Application Block is a Microsoft .NET Framework component that contains optimized data access code that can help you do the following:</p>
<p>•	Call stored procedures.</p>
<p>•	Issue SQL text commands against a SQL Server database.<br />
The Enterprise Library Data Access Application Block simplifies development tasks that implement common data access functionality. Applications can use the application block in a variety of situations, such as reading data for display, obtaining data to pass through application layers, and submitting changed data back to the database system. The application block includes support for both stored procedures and in-line SQL, and common housekeeping tasks such as managing connections and creating and caching parameters are encapsulated in the application block&#8217;s methods. In other words, the Data Access Application Block provides access to the most frequently used features of ADO.NET.<br />
The application block also facilitates the development of portable application code, allowing the code to remain uniform across multiple database servers, including Microsoft SQL Server, Oracle, and DB2. It does so by using an abstract base class that defines a common interface and provides much of the implementation for the data access methods, Applications written for one type of database such as SQL Server look the same as applications written for another type of database, such as Oracle. By using the Data Access Application Block and by following the guidelines in this document, your code remains mostly portable.</p>
<p>The Data Access Application Block has the following features: </p>
<p>•	It reduces the need to write boilerplate code to perform standard tasks. </p>
<p>•	It helps maintain consistent data access practices, both in an application and across the enterprise. </p>
<p>•	It reduces difficulties in changing the physical database target. </p>
<p>•	It relieves developers from learning different programming models for different types of databases. </p>
<p>•	It reduces the amount of code that needs to be rewritten when porting applications to different types of databases.</p>
<br />Filed under: <a href='http://tspawan.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tspawan.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tspawan.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tspawan.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tspawan.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tspawan.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tspawan.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tspawan.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tspawan.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tspawan.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tspawan.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tspawan.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tspawan.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tspawan.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tspawan.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=46&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tspawan.wordpress.com/2010/11/29/entity-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e26ef78e45c0bf4b762ff354e66364b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Pawan</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET Page Life Cycle</title>
		<link>http://tspawan.wordpress.com/2009/07/15/asp-net-page-life-cycle/</link>
		<comments>http://tspawan.wordpress.com/2009/07/15/asp-net-page-life-cycle/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 19:23:53 +0000</pubDate>
		<dc:creator>T.S. Pawan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[CreateHtmlTextWriter]]></category>
		<category><![CDATA[Creating HTML]]></category>
		<category><![CDATA[LoadComplete]]></category>
		<category><![CDATA[Loading the postback data]]></category>
		<category><![CDATA[LoadPostData]]></category>
		<category><![CDATA[LoadViewState]]></category>
		<category><![CDATA[OnLoad]]></category>
		<category><![CDATA[OnPreLoad]]></category>
		<category><![CDATA[OnPreRenderComplete]]></category>
		<category><![CDATA[OnSaveStateComplete]]></category>
		<category><![CDATA[OnUnload]]></category>
		<category><![CDATA[Page before Load]]></category>
		<category><![CDATA[Page Initialization]]></category>
		<category><![CDATA[Page Initialization Completed]]></category>
		<category><![CDATA[Page Load]]></category>
		<category><![CDATA[Page Load Completed]]></category>
		<category><![CDATA[Page Loading]]></category>
		<category><![CDATA[Page Pre Initializing]]></category>
		<category><![CDATA[Page Unload]]></category>
		<category><![CDATA[Page_Init]]></category>
		<category><![CDATA[Page_InitComplete]]></category>
		<category><![CDATA[Page_Load]]></category>
		<category><![CDATA[Page_PreInit]]></category>
		<category><![CDATA[Page_PreRender]]></category>
		<category><![CDATA[Page_Render]]></category>
		<category><![CDATA[Page_UnLoad]]></category>
		<category><![CDATA[PostBack Event Handling]]></category>
		<category><![CDATA[PreRendering]]></category>
		<category><![CDATA[PreRendering Completed]]></category>
		<category><![CDATA[RaisePostBackEvent]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[SaveViewState]]></category>
		<category><![CDATA[Saving ViewState]]></category>
		<category><![CDATA[Saving ViewState Completed]]></category>
		<category><![CDATA[Unloading]]></category>
		<category><![CDATA[View State Loading]]></category>

		<guid isPermaLink="false">http://tspawan.wordpress.com/?p=36</guid>
		<description><![CDATA[Page Pre Initializing Page_PreInit Check the IsPostBack property to determine whether this is the first time the page is being processed. Create or re-create dynamic controls. Set a master page dynamically. Set the Theme property dynamically. Page Initialization Page_Init Raised after all controls have been initialized. Use this event to read or initialize control properties. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=36&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="217" valign="top">
<p>Page Pre Initializing</p>
</td>
<td width="204" valign="top">
<p>Page_PreInit</p>
</td>
<td width="211" valign="top">
<p>Check the IsPostBack property to determine whether this is    the first time the page is being processed. Create or re-create dynamic    controls. Set a master page dynamically. Set the Theme property dynamically.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Page Initialization</p>
</td>
<td width="204" valign="top">
<p>Page_Init</p>
</td>
<td width="211" valign="top">
<p>Raised after all controls have been initialized. Use this    event to read or initialize control properties.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Page Initialization Completed </p>
</td>
<td width="204" valign="top">
<p>Page_InitComplete</p>
</td>
<td width="211" valign="top">
<p>Use this event for processing tasks that require all    initialization be complete.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>View State    Loading</p>
</td>
<td width="204" valign="top">
<p>LoadViewState</p>
</td>
<td width="211" valign="top">
<p>The view state of the control posted by the client is    reloaded into the new instance of the control.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Page before Load</p>
</td>
<td width="204" valign="top">
<p>OnPreLoad</p>
</td>
<td width="211" valign="top">
<p>Use this event if you need to perform processing on your    page or control before the Load event.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Page Loading</p>
</td>
<td width="204" valign="top">
<p>OnLoad</p>
</td>
<td width="211" valign="top">
<p>The Page calls the OnLoad event method on the Page, then    recursively does the same for each child control, which does the same for    each of its child controls until the page and all controls are loaded.<br />
      Use the OnLoad event method to set properties in controls    and establish database connections.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Page Load </p>
</td>
<td width="204" valign="top">
<p>Page_Load</p>
</td>
<td width="211" valign="top">
<p>This is not an event instead, at this stage of processing,    the OnLoad event calls the Page_Load method.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Loading the postback data</p>
</td>
<td width="204" valign="top">
<p>LoadPostData</p>
</td>
<td width="211" valign="top">
<p>The server searches any data corresponding to the control    that is loaded in the data posted by the client.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>PostBack Event Handling</p>
</td>
<td width="204" valign="top">
<p>RaisePostBackEvent</p>
</td>
<td width="211" valign="top">
<p>Notifies the server control that caused the postback that    it should handle an incoming postback event.</p>
</td>
</tr>
<tr>
<td width="632" colspan="3" valign="top">
<p align="center">Control Event</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Page Load Completed</p>
</td>
<td width="204" valign="top">
<p>LoadComplete</p>
</td>
<td width="211" valign="top">
<p>Use this event for tasks that require that all other    controls on the page be loaded.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>PreRendering</p>
</td>
<td width="204" valign="top">
<p>Page_PreRender </p>
</td>
<td width="211" valign="top">
<p>The PreRender event occurs for each control on the page.    Use the event to make final changes to the contents of the page or its    controls.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>PreRendering Completed</p>
</td>
<td width="204" valign="top">
<p>OnPreRenderComplete</p>
</td>
<td width="211" valign="top">
<p>The OnPreRenderComplete method is called when the    prerendering stage of the page life cycle is complete. At this stage of the    page life cycle, all controls are created and the page is ready to render the    output.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Saving ViewState</p>
</td>
<td width="204" valign="top">
<p>SaveViewState</p>
</td>
<td width="211" valign="top">
<p>Before this event occurs, ViewState has been saved for the    page and for all controls. Any changes to the page or controls at this point    will be ignored.<br />
      Use this event perform tasks that require view state to be    saved, but that do not make any changes to controls.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Saving ViewState Completed</p>
</td>
<td width="204" valign="top">
<p>OnSaveStateComplete</p>
</td>
<td width="211" valign="top">
<p>The OnSaveStateComplete method is called when the state    information for the control has been written to the persistence medium for    the page.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Creating HTML </p>
</td>
<td width="204" valign="top">
<p>CreateHtmlTextWriter</p>
</td>
<td width="211" valign="top">
<p>The CreateHtmlTextWriter method creates a TextWriter through    the browser property of the request object associated with the page request.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Rendering</p>
</td>
<td width="204" valign="top">
<p>Page_Render</p>
</td>
<td width="211" valign="top">
<p>This is not an event instead, at this stage of processing,    the Page object calls this method on each control. All ASP.NET Web server    controls have a Render method that writes out the control&#8217;s markup that is    sent to the browser.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Page Unload</p>
</td>
<td width="204" valign="top">
<p>OnUnload</p>
</td>
<td width="211" valign="top">
<p>Fires immediately before the object is unloaded from the    servers memory.</p>
</td>
</tr>
<tr>
<td width="217" valign="top">
<p>Unloading</p>
</td>
<td width="204" valign="top">
<p>Page_UnLoad</p>
</td>
<td width="211" valign="top">
<p>This event occurs for each control and then for the page.    In controls, use this event to do final cleanup for specific controls, such    as closing control-specific database connections.<br />
      For the page itself, use this event to do final cleanup    work, such as closing open files and database connections, or finishing up    logging or other request-specific tasks.</p>
</td>
</tr>
</table>
<br />Posted in ASP.NET Tagged: CreateHtmlTextWriter, Creating HTML, LoadComplete, Loading the postback data, LoadPostData, LoadViewState, OnLoad, OnPreLoad, OnPreRenderComplete, OnSaveStateComplete, OnUnload, Page before Load, Page Initialization, Page Initialization Completed, Page Load, Page Load Completed, Page Loading, Page Pre Initializing, Page Unload, Page_Init, Page_InitComplete, Page_Load, Page_PreInit, Page_PreRender, Page_Render, Page_UnLoad, PostBack Event Handling, PreRendering, PreRendering Completed, RaisePostBackEvent, Rendering, SaveViewState, Saving ViewState, Saving ViewState Completed, Unloading, View State Loading <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tspawan.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tspawan.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tspawan.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tspawan.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tspawan.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tspawan.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tspawan.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tspawan.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tspawan.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tspawan.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tspawan.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tspawan.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tspawan.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tspawan.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=36&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tspawan.wordpress.com/2009/07/15/asp-net-page-life-cycle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e26ef78e45c0bf4b762ff354e66364b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Pawan</media:title>
		</media:content>
	</item>
		<item>
		<title>.Net Code Execution</title>
		<link>http://tspawan.wordpress.com/2009/07/05/net-code-execution/</link>
		<comments>http://tspawan.wordpress.com/2009/07/05/net-code-execution/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 06:54:41 +0000</pubDate>
		<dc:creator>T.S. Pawan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[CIL]]></category>
		<category><![CDATA[Common Intermediate Language]]></category>
		<category><![CDATA[Econo-JIT]]></category>
		<category><![CDATA[IL]]></category>
		<category><![CDATA[JIT]]></category>
		<category><![CDATA[Just In Time]]></category>
		<category><![CDATA[MSIL]]></category>
		<category><![CDATA[Normal-JIT]]></category>
		<category><![CDATA[Pre-JIT]]></category>

		<guid isPermaLink="false">http://tspawan.wordpress.com/?p=21</guid>
		<description><![CDATA[How the .Net code is Executes. The program written in .net environment is compiled twice. The first compilation is done from the original language to a &#34;common intermediate language&#38;quo (CIL). This is what actually goes &#34;in&#34; an assembly. When a compiler produces MSIL, it also produces metadata. Metadata describes the types in your code, including [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=21&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>How the .Net code is Executes. </strong></p>
<p>The program written in .net environment  is compiled twice.</p>
<p>The first compilation is done  from the original language to a &quot;common intermediate language&amp;quo (CIL).  This is what actually goes &quot;in&quot; an assembly.</p>
<p>When a compiler produces MSIL, it  also produces metadata. Metadata describes the types in your code, including  the definition of each type, the signatures of each type&#8217;s members, the members  that your code references, and other data that the runtime uses at execution  time. The MSIL and metadata are contained in a portable executable (PE) file  that is based on and extends the published Microsoft PE and common object file  format (COFF) used historically for executable content. The presence of  metadata in the file along with the MSIL enables your code to describe itself,  which means that there is no need for type libraries or Interface Definition  Language (IDL). The runtime locates and extracts the metadata from the file as  needed during execution.</p>
<p>The second compilation is done  from the CIL to machine code. This compilation is usually performed  automatically by the &quot;just-in-time&quot; (JIT) compiler. It is also  possible to use the Native Image Generator (ngen) utility to create the machine  code in advance of runtime.</p>
<p>As part of compiling MSIL to  native code, the MSIL code must pass a verification process unless an  administrator has established a security policy that allows the code to bypass  verification. Verification examines MSIL and metadata to find out whether the  code is type safe, which means that it only accesses the memory locations it is  authorized to access. Type safety helps isolate objects from each other and  therefore helps protect them from inadvertent or malicious corruption. It also  provides assurance that security restrictions on code can be reliably enforced.</p>
<p><img src="http://tspawan.files.wordpress.com/2009/07/net_framework1.jpg?w=467&#038;h=245" alt="Executes" width="467" height="245" /></p>
<p>&nbsp;</p>
<p>The whole step is elaborated  below and explains this process in a diagrammatic manner:</p>
<ol start="1" type="1">
<li>The programmer writes the source code using C#       language conventions.</li>
<li>The source code is then compiled using a C# Compiler       (csc.exe).</li>
<li>The compiler then converts the source code into an       Intermediate Language. The Intermediate Language can be either an       executable (exe) or a Dynamic Link Library (DLL). Since the Intermediate       Language is generated by the C# compiler, it is called as Managed Code.       Managed Code can be executed only on a .NET aware Platform. (Where the       .Net Framework is already install.)</li>
<li>The compiled file unit is then executed using the C#       Interpreter. Upon execution, the code is checked for type safety.       Moreover, the Just In Time (JIT) compiler compiles the unit into Managed       Native Code and finally Common Language Runtime (CLR) produces the final       output.</li>
<li>The final unit can be executed on any system having       Common Language Runtime installed on it. The C# Compiler and Interpreter       will be installed at the time of installing the .NET Framework Software       Development Kit (SDK). </li>
</ol>
<p>In Microsoft .NET there are three  types of JIT compilers:</p>
<p><strong>Pre-JIT:</strong> Pre-JIT compiles complete source code into native code in  a single compilation cycle. This is done at the time of deployment of the  application.</p>
<p><strong>Econo-JIT:</strong> Econo-JIT compiles only those methods that are called at  runtime.However, these compiled methods are removed when they are not required.</p>
<p><strong>Normal-JIT:</strong> Normal-JIT compiles only those methods that are called  at runtime. These methods are compiled the first time they are called, and they  are stored in the cache. When the same methods are called again, the compiled  code from cache is used for execution.</p>
<br />Posted in ASP.NET Tagged: CIL, Common Intermediate Language, Econo-JIT, IL, JIT, Just In Time, MSIL, Normal-JIT, Pre-JIT <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tspawan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tspawan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tspawan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tspawan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tspawan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tspawan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tspawan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tspawan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tspawan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tspawan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tspawan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tspawan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tspawan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tspawan.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=21&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tspawan.wordpress.com/2009/07/05/net-code-execution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e26ef78e45c0bf4b762ff354e66364b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Pawan</media:title>
		</media:content>

		<media:content url="http://tspawan.files.wordpress.com/2009/07/net_framework1.jpg" medium="image">
			<media:title type="html">Executes</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of Object Oriented Programming System</title>
		<link>http://tspawan.wordpress.com/2009/07/03/basics-of-object-oriented-programming-system/</link>
		<comments>http://tspawan.wordpress.com/2009/07/03/basics-of-object-oriented-programming-system/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 01:28:54 +0000</pubDate>
		<dc:creator>T.S. Pawan</dc:creator>
				<category><![CDATA[OOPS]]></category>
		<category><![CDATA[Abstract]]></category>
		<category><![CDATA[Access Modifiers]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Constructor]]></category>
		<category><![CDATA[Delegate]]></category>
		<category><![CDATA[Destructor]]></category>
		<category><![CDATA[Encapsulation]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Generic]]></category>
		<category><![CDATA[Inheritance]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[Internal]]></category>
		<category><![CDATA[Object]]></category>
		<category><![CDATA[Object Oriented Programming System]]></category>
		<category><![CDATA[Opps]]></category>
		<category><![CDATA[Overloading]]></category>
		<category><![CDATA[Polymorphism]]></category>
		<category><![CDATA[Private]]></category>
		<category><![CDATA[Properties]]></category>
		<category><![CDATA[Protected]]></category>
		<category><![CDATA[Public]]></category>
		<category><![CDATA[Sealed]]></category>
		<category><![CDATA[Virtual]]></category>

		<guid isPermaLink="false">http://tspawan.wordpress.com/?p=15</guid>
		<description><![CDATA[This is my first post. This article won&#8217;t be the definitive guide of Object oriented Programming System an entire book could easily be devoted to that. Instead, think of this as a good place to start. Good for those how had already know about OOPS. If you get sometime wrong / new please comment me. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=15&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="left">This is my first post. This article won&#8217;t be the definitive  guide of Object oriented Programming System an entire book could easily be  devoted to that. Instead, think of this as a good place to start. Good for  those how had already know about OOPS. If you get sometime wrong / new please  comment me.</p>
<p align="center"><strong>Basics of Object Oriented Programming System</strong></p>
<p><strong>What is Opps?</strong><br />
  Oops is a problem solving technique.</p>
<p><strong>What is Class?</strong><br />
  Class is a description of an Object. </p>
<p><strong>What is an Object?</strong><br />
  An Object is an entity that has attribute, behavior and  identity of a class.</p>
<p><strong>What is the relation  between Class and Object?</strong><br />
  Class is the defection, while Object is an instance of the  Class created.</p>
<p><strong>What is  Encapsulation?</strong><br />
  Encapsulation is the localization or hiding of information  and processes within an object. Because objects encapsulate both data and  processes, the user of an object can view the object as a black box that  provides services. Instance variables and methods can be added, deleted, or  changed, but as long as the services provided by the object remain the same,  code that uses the object can continue to use it without being rewritten.</p>
<p>public class TestMain<br />
  {<br />
  &nbsp;&nbsp;&nbsp; private string _Name  = string.Empty;</p>
<p>&nbsp;&nbsp;&nbsp; public string Name<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;return _Name;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  _Name = value;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp; }<br />
  }</p>
<p>Like the above way we can protect the private data from the  outside world. In the above example we can&#8217;t access the private data Name from an object instance. We manipulate the  data only using the property.</p>
<p><strong>What is Polymorphism?</strong><br />
  Through inheritance, a class can be used as more than one  type; it can be used as its own type, any base types, or any interface type if  it implements interfaces. This is called polymorphism. In C#, every type is  polymorphic. Types can be used as their own type or as an object instance,  because any type automatically treats Object as a base type.</p>
<pre>public class BaseClass</pre>
<pre>{</pre>
<pre>&nbsp;&nbsp;&nbsp; public virtual void DoWork() { }</pre>
<pre>&nbsp;&nbsp;&nbsp; public virtual int WorkProperty</pre>
<pre>&nbsp;&nbsp;&nbsp; {</pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return 0; }</pre>
<pre>&nbsp;&nbsp;&nbsp; }</pre>
<pre>}</pre>
<pre>public class DerivedClass : BaseClass</pre>
<pre>{</pre>
<pre>&nbsp;&nbsp;&nbsp; public override void DoWork() { }</pre>
<pre>&nbsp;&nbsp;&nbsp; public override int WorkProperty</pre>
<pre>&nbsp;&nbsp;&nbsp; {</pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return 0; }</pre>
<pre>&nbsp;&nbsp;&nbsp; }</pre>
<pre>}</pre>
<p>&nbsp;</p>
<pre>DerivedClass B = new DerivedClass();</pre>
<pre>B.DoWork();&nbsp; // Calls the new method.</pre>
<pre>&nbsp;</pre>
<pre>BaseClass A = (BaseClass)B;</pre>
<pre>A.DoWork();&nbsp; // Also calls the new method.</pre>
<p>&nbsp;</p>
<p><strong>What is Access  Modifiers?</strong><br />
  Access modifiers are keywords used to specify the declared  accessibility of a member or a type. They are &hellip;&hellip;.</p>
<ol start="1" type="1">
<li>Public</li>
<li>Private</li>
<li>Protected</li>
<li>Internal</li>
<li>Protected       Internal.</li>
</ol>
<p>&nbsp;</p>
<p><strong>Public</strong>: All  members have access in the classes.<br />
    <strong>Private</strong>: Only  members of class have access.<br />
    <strong>Protected</strong>: All  members in current class and in derived class can access the variables.<br />
    <strong>Internal</strong>: Only  members in current project have access to the element.<br />
    <strong>Protected Internal</strong>:  All members of the current project and all members in derived class can access  the variables.</p>
<p><strong>What is Properties?</strong><br />
  Properties are members that provide a flexible mechanism to  read, write, or compute the values of private fields.</p>
<p>Public Int32 ID<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return _ID;&nbsp; }<br />
  &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set { _ID = value; }<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>Read Only Property</p>
<p>Public Int32 ID<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return _ID;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp; }<br />
  Write Only Property</p>
<p>Public Int32 ID<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set { _ID = value; }<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;</p>
<p><strong>What is  Implementation Inheritance?</strong><br />
  When a class is derived from another class such that it  inherits all the members of the base type it is Implementation Inheritance.</p>
<p><strong>What is Interface  Inheritance? </strong><br />
  When a type (class or a structure) inherits only the  signatures of the functions from another type it is Interface Inheritance.</p>
<p><strong>What is Abstract  class?</strong><br />
  Abstract classes are classes that contain one or more  abstract methods. An abstract method is a method that is declared, but doesn&#8217;t  contain implementation. Abstract classes can&#8217;t be instantiated, and require  subclasses to provide implementations for the abstract methods. This class must  be inherited. This class is mostly used as a base class.</p>
<p><strong>Abstract  Class</strong></p>
<p>public abstract class  TestAbstract<br />
  {<br />
  &nbsp;&nbsp;&nbsp; public abstract int AddNumber(int  One, int two);</p>
<p>&nbsp;&nbsp;&nbsp; public virtual int AddTwoNumber(int  One, int two)<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int Result = One + two;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Result;<br />
  &nbsp;&nbsp;&nbsp; }<br />
  }</p>
<p><strong>Child Class</strong></p>
<p>public class TestMain:TestAbstract<br />
  {<br />
  &nbsp;&nbsp;&nbsp; public override int AddNumber(int  One, int two)<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int Result = One + two;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Result;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; public override int AddTwoNumber(int  One, int two)<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int Result = One +two;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Result;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>}</p>
<p><strong>What is Virtual  function?</strong><br />
  A virtual function is a function whose behavior can be  overridden within an inheriting class by a function with the same signature. A  base class must provide the virtual modifier for any virtual method, and  derived classes must provide the override modifier for any override method  inherited from a base class.<br />
  Virtual methods allow subclasses to provide their own  implementation of that method using the override keyword.</p>
<p><strong>What is Abstract&nbsp; function?</strong><br />
  Abstract functions in a class contain no method body, and  are implicitly virtual function. Abstract function-modifier exists only to  provide a uniform syntactical style.</p>
<p>Neither abstract nor virtual can be declared private, since  it would defeat the purpose, and subclasses must override them using the same  method signature. If a class has any abstract methods, then it must tag itself  as abstract, and no instances of it can be created.</p>
<p><strong>What is Interface?</strong><br />
  An interface is a reference type containing only abstract  members. These can be events, indexers, methods or properties, but only the  member declarations. A class implementing an interface must provide the  implementation of the interface members. An interface cannot contain constants,  constructors, data fields, destructors, static members or other interfaces.  Interface member declarations are implicitly public.</p>
<p>Interface<br />
  public interface TestInterface<br />
  {<br />
  &nbsp;&nbsp;&nbsp; Int32 ID<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; String Name<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; string Address<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; bool Add();</p>
<p>&nbsp;&nbsp;&nbsp; bool Update();</p>
<p>&nbsp;&nbsp;&nbsp; bool Delete();<br />
  }</p>
<p>Class<br />
  public class Employee  : TestInterface<br />
  {<br />
  &nbsp;&nbsp;&nbsp; public int ID<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; public string Name<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; public string Address<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp; &nbsp;public bool Add()<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; public bool Update()<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; public bool Delete()<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  &nbsp;&nbsp;&nbsp; }<br />
  }</p>
<p>&nbsp;</p>
<p>When a class or structure is said to inherit an interface,  it means that the class or structure provides an implementation for all of the  members defined by the interface. The interface itself provides no  functionality that a class or structure can inherit in the way that base class  functionality can be inherited. However, if a base class implements an  interface, the derived class inherits that implementation. A class or structure  can inherit more than one interface. When a class or structure inherits an  interface, it inherits only the method names and signatures, because the  interface itself contains no implementations.</p>
<p><strong>Interface versus  Abstract Class.</strong><br />
  &nbsp; <br />
  An Interface cannot implement methods. <br />
  An abstract class can implement methods. <br />
  An Interface can only inherit from another Interface. <br />
  An abstract class can inherit from a class and one or more  interfaces. <br />
  An Interface cannot contain fields. <br />
  An abstract class can contain fields. <br />
  An Interface can contain property definitions. <br />
  An abstract class can implement a property. <br />
  An Interface cannot contain constructors or destructors. <br />
  An abstract class can contain constructors or destructors. <br />
  An Interface can be inherited from by structures. <br />
  An abstract class cannot be inherited from by structures. <br />
  An Interface can support multiple inheritances. <br />
  An abstract class cannot support multiple inheritances.</p>
<p>&nbsp;</p>
<p><strong>What is Sealed Class?</strong><br />
  A sealed class cannot be used as a base class. For this  reason, it cannot also be an abstract class. Sealed classes prevent derivation. </p>
<p><strong>What is Sealed  Methods?</strong><br />
  A class member, method, field, property, or event, on a  derived class that is overriding a virtual member of the base class can declare  that member as sealed. This negates the virtual aspect of the member for any  further derived class. This is accomplished by putting the sealed keyword before  the override keyword in the class member declaration.</p>
<p>public sealed override  int AddTwoNumber(int  One, int two)<br />
  &nbsp;&nbsp;&nbsp; {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int Result = One +two;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Result;<br />
  &nbsp;&nbsp;&nbsp; }</p>
<p>What is Function Overloading?<br />
  Function overloading is the practice of declaring the same  function with different signatures. The same function name will be used with  different number of parameters and parameters of different type. But  overloading of functions with different return types is not allowed.</p>
<p>public Int32 AddTwoNumber(Int16  One, Int16 Two)</p>
<p>public Int32 AddTwoNumber(Int32  One, Int32 Two)</p>
<p>&nbsp;</p>
<p>What is function overriding?<br />
  If a base class is declared as virtual and derived class is  declared as virtual. This redefinition of virtual in derived class is known as  Function overriding. Both functions have same parameters.</p>
<p>public virtual int AddNumber(int  One, int two)</p>
<p>public override int AddNumber(int  One, int two)</p>
<p><strong>What is Class  Constructor?</strong><br />
  A constructor is a special function which can be included in  a class. It is unusual as a function because it is never specifically called,  the same way that other functions are. A constructor function is called  automatically when the class variable is declared. It is used to set up the  class variable with sensible values in the member variables. There is more then  one Constructor in a class within a class with different parameters.</p>
<p>public Class ABC<br />
  {<br />
  public ABC()<br />
  {<br />
  //Implement&#8230;&#8230;&#8230;</p>
<p>}<br />
  public ABC(string xyz)<br />
  {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  }<br />
  }</p>
<p><strong>What is Class  Destructor?</strong><br />
  Destructor is a special function that is called whenever a  class variable is destroyed. A destructor is declared as having the same name  as the function, except that the name is preceded by the ~ symbol before it.  Apart from that symbol, the declaration of a destructor would be  indistinguishable from a constructor. There is always one destructor in a  class.</p>
<p>public Class ABC<br />
  {<br />
  public ABC()<br />
  {<br />
  //Implement&#8230;&#8230;&#8230;</p>
<p>}<br />
  public ~ABC()<br />
  {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Implement&#8230;&#8230;&#8230;<br />
  }<br />
  }</p>
<p><strong>What is Delegate?</strong><br />
  A delegate is a function pointer. A delegate allows encapsulating  a reference to a method inside a delegate object. The delegate object can then  be passed to code which can call the referenced method, without having to know  at compile time which method will be invoked. Delegates are multicasting which  means that they can point to more than one function at a time.</p>
<p><strong>What is Event?</strong><br />
  An event is a mechanism via which a class can notify its  clients when something happens. For example when you click a button, a  button-click-event notification is sent to the hosting the button. Events are  declared using delegates.</p>
<p><strong>What is Generic  Class?</strong><br />
Generic classes encapsulate operations that are not specific  to a particular data type. The most common use for generic classes is with  collections like linked lists, hash tables, stacks, queues, trees, and so on.  Operations such as adding and removing items from the collection are performed  in basically the same way regardless of the type of data being stored.</p>
<p>&nbsp;</p>
<br />Posted in OOPS Tagged: Abstract, Access Modifiers, Class, Constructor, Delegate, Destructor, Encapsulation, Event, Function, Generic, Inheritance, Interface, Internal, Object, Object Oriented Programming System, Opps, Overloading, Polymorphism, Private, Properties, Protected, Public, Sealed, Virtual <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tspawan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tspawan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tspawan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tspawan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tspawan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tspawan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tspawan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tspawan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tspawan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tspawan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tspawan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tspawan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tspawan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tspawan.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tspawan.wordpress.com&amp;blog=7669230&amp;post=15&amp;subd=tspawan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tspawan.wordpress.com/2009/07/03/basics-of-object-oriented-programming-system/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e26ef78e45c0bf4b762ff354e66364b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Pawan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
