tag:blogger.com,1999:blog-81673419733126307462024-02-18T23:20:40.021-08:00.Net and Sql Server Technical StuffThis blog to all my techie friends who wants to explore my learning on relative area.Unknownnoreply@blogger.comBlogger25125tag:blogger.com,1999:blog-8167341973312630746.post-71964758542848454532012-12-23T22:24:00.000-08:002012-12-23T22:24:03.275-08:003 Layer vs 3 Tier Architecture | Difference Between 3 Layer and 3 Tier Architecture<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="background-color: white; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
Before moving to understand what is difference between <strong>3 Tier Architecture</strong> and <strong>3 Layer architecture</strong> lets have an overview about what is <strong>Tier</strong> and What is <strong>Layer</strong> ???</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
The layers reside on the same machine where the tiers can reside on different machines.</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
Layer communicates with each other either by Value or by Reference. However the Tiers could be on different machines, so they communicate by Value only – as serialized objects.</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
Layer is l<strong>ogical separation of code</strong> and Tier <strong>is physical separation of code</strong>, In other words we can say Tiers are the physical deployment of layers. Or a Tier becomes a Layer if it could be physically separated from the Layers it consumes.</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
<strong>N-Tier Architecture</strong> is a physical structuring, while <strong>a N-Layer Architecture</strong> is a logical structuring.</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
Now coming to <strong><span style="text-decoration: underline;">3 Layer Architecture</span></strong> and <strong><span style="text-decoration: underline;">3 Tier Architecture</span></strong> after getting an idea about Layer and Tier.</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
In 3 layer architecture, the <strong>Database Access Layer (DAL)</strong>, <strong>Business Logic Layer (BLL)</strong> and <strong>User Interface Layer (UIL)</strong> resides as 3 different project and the output of these 3 projects (.dll file) must be together in the <strong>same server</strong> or on <strong>same machine</strong>in order for the system to run.However in 3 tier architecture, the <strong>Database Access Layer (DAL)</strong>, <strong>Business Logic Layer (BLL)</strong> <strong>and User Interface Layer (UIL)</strong> reside as 3 different projects. But each of the projects can be deployed at the <strong>different server</strong> or at <strong>the different machines</strong> and distributed functionality is explored.</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
In 3 layer architecture <strong>DAL, BLL and UIL</strong> can work on same machine where as in a 3 Tier architecture a client in on one machine, the application Server is hosted in another machine and the database server resides in another machine i.e.<strong> Three-tier</strong>is a <a href="http://en.wikipedia.org/wiki/Client%E2%80%93server_architecture" style="color: #313428; text-decoration: initial;" title="Client–server architecture">client–server architecture</a> in which the <a href="http://en.wikipedia.org/wiki/User_interface" style="color: #313428; text-decoration: initial;" title="User interface">User Interface</a>, <a href="http://en.wikipedia.org/wiki/Business_logic_layer" style="color: #313428; text-decoration: initial;" title="Business logic layer">Business Logic </a>,<a href="http://en.wikipedia.org/wiki/Computer_data_storage" style="color: #313428; text-decoration: initial;" title="Computer data storage"> Data Storage</a> and <a href="http://en.wikipedia.org/wiki/Data_access" style="color: #313428; text-decoration: initial;" title="Data access">Data Access</a> are developed and maintained as independent <a href="http://en.wikipedia.org/wiki/Module_(computing)" style="color: #313428; text-decoration: initial;" title="Module (computing)">modules</a> on separate <a href="http://en.wikipedia.org/wiki/Platform_(computing)" style="color: #313428; text-decoration: initial;" title="Platform (computing)">platforms</a>.</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
In 3 Layer we have distinct namespaces and classes for the various layes i.e. we’re only talking about <strong>logical organization of code</strong> and <strong>passing objects</strong> between layers is easy as all assemblies will run under same application in single machine.But 3 tier applications are not straight as 3 layers, because each layer will be deployed in different machines. So here, we need a mechanism to send the objects between different machines over the network hence we use technologies called <strong>Web Services</strong>, <strong>Remoting</strong> or <strong>WCF, </strong>etc.<strong> </strong>in order to implement 3 tier applications</div>
<div style="color: #333333; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 1.25em; padding: 0px;">
3 Layer Architecture will improve <strong>readability</strong> and <strong>reusability, </strong>Minimizes the application changes due to impact of the changes in other layers. While 3 Tier Architecture has all advantages of 3 layer + <strong>scalability a</strong>s application will be deployed in different machines so load will be shared among the tiers and scalability will increase</div>
<br />
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-85545833127215975612012-05-23T04:06:00.001-07:002012-05-23T04:06:48.765-07:00ASP.NET MVC 3 Interview Questions<a href="http://jinaldesai.net/2011/asp-net-mvc-3-interview-questions/">ASP.NET MVC 3 Interview Questions</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-49312041031672033062012-02-09T11:48:00.000-08:002012-02-09T11:51:11.506-08:00Real time Examples of oops fundamental<p class="MsoListParagraphCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; text-align: justify; "><span style="font-family: 'Times New Roman', serif; "><br /></span></p><p class="MsoNormal" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0in; "><span style="font-family: 'Times New Roman', serif; "><span ><strong>Oops!</strong> What an excellent concept. Nowadays in software filed any latest language has implemented, it should be partially are fully supported this oops concept. OOPs, let c with real time examples.Six important factors are using this concept are,<o:p></o:p></span></span></p><ol type="1" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: -webkit-auto; margin-top: 0in; "><li class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0in; text-align: justify; "><span style="font-family: 'Times New Roman', serif; "><span >Class, 2.Objects, 3.Abstractions, 4.Encapsulation, 5.Polymorphism, and 6.Inheritance.<o:p></o:p></span></span></li></ol><p class="MsoListParagraphCxSpFirst" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; text-indent: -0.25in; "><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">1.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal; "> </span></span></b><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Car Vs Class<o:p></o:p></span></b></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Car:</span></b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; "> </span><span style="font-family: 'Times New Roman', serif; "><span >Collection of several properties like staring, break, clutch, etc each things are used for particular purpose, all these properties are differ from each car like some car have power staring ,however we have called it’s a car.<o:p></o:p></span></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span style="font-family: 'Times New Roman', serif; "><o:p><span ></span></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Class:</span></b><span style="font-family: 'Times New Roman', serif; "><span > it’s a collection of functions and variables. The functions and variables are differing from each class. Each function is used for particular purpose however we have called it’s a class<o:p></o:p></span></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span style="font-family: 'Times New Roman', serif; "><o:p><span ></span></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; text-indent: -0.25in; "><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">2.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal; "> </span></span></b><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Car Key Vs Object<o:p></o:p></span></b></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span ><b><span style="font-family: 'Times New Roman', serif; ">Car Key:</span></b><span style="font-family: 'Times New Roman', serif; "> key is used for run the car. So many dummy keys can use for run a car.<o:p></o:p></span></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span style="font-family: 'Times New Roman', serif; "><o:p><span ></span></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span ><b><span style="font-family: 'Times New Roman', serif; ">Object:</span></b><span style="font-family: 'Times New Roman', serif; "> Object is used for run the class or invokes the class. So many objects can create for a single class.<o:p></o:p></span></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span style="font-family: 'Times New Roman', serif; "><o:p><span ></span></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; text-indent: -0.25in; "><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">3.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal; "> </span></span></b><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Birds Vs Abstractions<o:p></o:p></span></b></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span ><b><span style="font-family: 'Times New Roman', serif; ">Birds</span></b><span style="font-family: 'Times New Roman', serif; ">: we invented flight based on the mechanism of Birds. So flight is derived form the base of birds.<o:p></o:p></span></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span style="font-family: 'Times New Roman', serif; "><o:p><span ></span></o:p></span></p><p class="MsoListParagraphCxSpLast" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0.5in; "><span ><b><span style="font-family: 'Times New Roman', serif; ">Abstraction:</span></b><span style="font-family: 'Times New Roman', serif; "> Abstraction is a way to remove the association of the behavior of an object with the actual details behind the scenes which implement that object's behavior. This 'abstraction' is usually accomplished through the use of base classes with virtual functions; each derived function provides the details that implement the behavior behind that abstraction.</span></span><span style="font-family: 'Times New Roman', serif; "><span ><o:p></o:p></span></span></p><p class="MsoListParagraphCxSpFirst" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; text-indent: -0.25in; "><b><span style="font-family: 'Times New Roman', serif; "><span >4.</span><span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal; "> </span></span></b><span ><span style="font-family: 'Times New Roman', serif; "></span><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Pen Vs Encapsulation</span></b></span><b><span style="font-family: 'Times New Roman', serif; "><o:p></o:p></span></b></p><p class="MsoListParagraphCxSpLast" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0.5in; "><span ><b><span style="font-family: 'Times New Roman', serif; ">Pen:</span></b><span style="font-family: 'Times New Roman', serif; "> Ink is the important component in pen but it is hiding by some other material<o:p></o:p></span></span></p><p class="MsoNormal" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0.5in; "><span class="tdvamseel"><b><span style="font-size: 10pt; line-height: 14px; font-family: 'Times New Roman', serif; ">Encapsulation:</span></b></span><span class="tdvamseel"><span style="font-size: 10pt; line-height: 14px; font-family: 'Times New Roman', serif; "> is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.</span></span><span style="font-family: 'Times New Roman', serif; "><o:p></o:p></span></p><p class="MsoListParagraphCxSpFirst" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; text-indent: -0.25in; "><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">5.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal; "> </span></span></b><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Crocodile Vs Polymorphism<o:p></o:p></span></b></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><span ><b><span style="font-family: 'Times New Roman', serif; ">Crocodile:</span></b><span style="font-family: 'Times New Roman', serif; "> </span></span><span style="font-size: 10.5pt; line-height: 16px; font-family: 'Times New Roman', serif; ">live indifferently on land or in the water. In water it’s Moment very fast compare to land. An animal lives in different character in different place.<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0.5in; "><b><span style="font-size: 10.5pt; line-height: 16px; font-family: 'Times New Roman', serif; ">Polymorphism:</span></b><span style="font-size: 10.5pt; line-height: 16px; font-family: 'Times New Roman', serif; "> a single function or single operator has different character in different place.<o:p></o:p></span></p><p class="MsoListParagraphCxSpMiddle" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 1in; "><span style="font-family: 'Times New Roman', serif; "><o:p><span ></span></o:p></span></p><p class="MsoListParagraphCxSpLast" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0.5in; text-indent: -0.25in; "><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">6.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal; "> </span></span></b><b><span style="font-size: 12pt; line-height: 18px; font-family: 'Times New Roman', serif; ">Human heredity Vs Inheritance<o:p></o:p></span></b></p><p class="MsoNormal" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0.5in; "><span ><b><span style="font-family: 'Times New Roman', serif; ">Human heredity:</span></b></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; ">The genetic transmission of characteristics from parent to offspring. The sum of characteristics and associated potentialities transmitted genetically to an individual organism</span></p><p style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(248, 252, 255); margin-left: 0.5in; "><span ><span ><b>Inheritance:</b><span lang="EN"> The new classes, known as <b>derived classes</b>, take over (or <b>inherit</b>) attribute and behavior of the pre-existing classes, which are referred to as <b>base classes</b>(or Parent classes). It is intended to help reuse existing code with little or no modification.</span></span></span></p><p></p>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8167341973312630746.post-86387286502616573412010-02-13T07:14:00.001-08:002010-02-13T07:14:55.838-08:00Global.asx<span class="Apple-style-span" style="font-family: Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; "><span style="font-family: arial; ">The Global.asx file is an <span id="IL_AD1" class="IL_AD" style="border-bottom-width: 1px !important; border-bottom-style: dotted !important; border-bottom-color: rgb(0, 51, 255) !important; color: rgb(0, 51, 255) !important; background-image: none !important; background-attachment: scroll !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; cursor: pointer !important; position: static; display: inline !important; padding-bottom: 1px; font-family: arial !important; font-weight: normal !important; font-style: normal !important; font-size: 13px !important; background-position: 0% 50%; background-repeat: repeat repeat !important; ">optional file</span> that contains code for responding to <span id="IL_AD3" class="IL_AD" style="border-bottom-width: 1px !important; border-bottom-style: dotted !important; border-bottom-color: rgb(0, 51, 255) !important; color: rgb(0, 51, 255) !important; background-image: none !important; background-attachment: scroll !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; cursor: pointer !important; position: static; display: inline !important; padding-bottom: 1px; font-family: arial !important; font-weight: normal !important; font-style: normal !important; font-size: 13px !important; background-position: 0% 50%; background-repeat: repeat repeat !important; ">application</span> level events raised by ASP.NET. This file is also called as ASP.NET application file. This file resides in the root directory of anapplication. If we are not defining this file in application, the ASP.NET page framework assumes that you have not defined any applicationa/Session events in the application.</span><br /><br /><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJUBOILBNiZppkNWtTf7wzFyStl2oasg1vlojtfMQkdg5Sa_NOvGptgs5uNA7qSd4E_muRNc503XKDLFaQTiUrYDJPNMz6VaTa302NNH2wCIsyli9-Zd8qbqupUaofn8P-1q2qX1Rauutz/s320/articles_Global.jpg" alt="" id="BLOGGER_PHOTO_ID_5330037448746924098" border="0" style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); cursor: pointer; width: 320px; height: 134px; font-family: arial; " /><br /><br /><span style="font-family: arial; ">Followign are the list of events handled in the global.asax file.</span><br /><br /><span style="font-family: arial; ">Event: Application_Start</span><br /><br /><span style="font-family: arial; ">When an application starts. This event occurs only one time in an application’s life cycle. It occurs again when you restart the application. It’s the best place to count number of visitors.</span><br /><br /><span style="font-family: arial; ">Event: Application_End</span><br /><br /><span style="font-family: arial; ">This event occurs when application ends.</span><br /><br /><span style="font-family: arial; ">Event: Session_Start</span><br /><br /><span style="font-family: arial; ">This event occurs whenever a new session starts. This is the best place to count user sessions for anapplication</span><br /><br /><span style="font-family: arial; ">Practical Usage: Setting user specific values, caching items based upon user context.</span><br /><br /><span style="font-family: arial; ">Event: Session_End</span><br /><br /><span style="font-family: arial; ">This event Opposite of the previous event.</span><br /><br /><span style="font-family: arial; ">Event: Application_Error</span><br /><br /><span style="font-family: arial; ">This event occurs when an unhandled error or exception occurs in an application.</span><br /><br /><span style="font-family: arial; ">Event: Application_BeginRequest</span><br /><br /><span style="font-family: arial; ">This event occurs every time when server makes a request. This event may occur multiple times in an applications life cycle.</span><br /><br /><span style="font-family: arial; ">Event: Application_End</span><br /><br /><span style="font-family: arial; ">This event occurs when an application closes</span></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-12613714054930966202009-11-20T21:29:00.000-08:002009-11-20T21:33:34.992-08:00Change the Background Row Color of the GridView control using MouseEvents<span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size: small;">By using this Article you can learn how to change BackGround Color of a Row in Gridview when user moves mouse on a particular selecting Row.</span></span><div><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 13px; "><p><span class="Apple-style-span" style="font-size: small;">First Drag and Drop one Gridview Control on a webpage.After Retriving the data in a gridvew select your gridview and choose Events.In Events DoubleClik on </span><span style="color:#ff0000;"><span class="Apple-style-span" style="font-size: small;">RowDataBound.</span></span></p><p><span class="Apple-style-span" style="font-size: small;">after DoubleCliking on </span><span style="color:#ff0000;"><span class="Apple-style-span" style="font-size: small;">RowDataBound </span></span><span class="Apple-style-span" style="font-size: small;">Event you will get a code in .aspx.cs as Below:</span></p><p><span class="Apple-style-span" style="font-size: small;"><br /></span></p><p><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-size: 13px; "></span></span></p><pre style="font: normal normal normal 10pt/normal 'courier new', courier; overflow-x: auto; overflow-y: auto; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(252, 252, 252); width: 730px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(218, 218, 218); border-right-color: rgb(218, 218, 218); border-bottom-color: rgb(218, 218, 218); border-left-color: rgb(218, 218, 218); word-wrap: break-word; white-space: pre-wrap; color: rgb(0, 0, 0); padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-position: initial initial; "><p align="left"><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">protected</span></span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">void</span></span><span style="font-size:85%;"> GridView2_RowDataBound(</span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">object</span></span><span style="font-size:85%;"> sender, </span><span style="font-size:85%;color:#008080;"><span style="font-size:85%;color:#008080;">GridViewRowEventArgs</span></span><span style="font-size:85%;"> e)</span></p><span style="font-size:85%;"><p align="left">{</p></span><p align="left"><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;"> if</span></span><span style="font-size:85%;"> (e.Row.RowType == </span><span style="font-size:85%;color:#008080;"><span style="font-size:85%;color:#008080;">DataControlRowType</span></span><span style="font-size:85%;">.DataRow)</span></p><span style="font-size:85%;"><p align="left"> {</p></span><p align="left"><span style="font-size:85%;"> e.Row.Attributes.Add(</span><span style="font-size:85%;color:#800000;"><span style="font-size:85%;color:#800000;">"onmouseover"</span></span><span style="font-size:85%;">, </span><span style="font-size:85%;color:#800000;"><span style="font-size:85%;color:#800000;">"this.style.backgroundColor='Silver'"</span></span><span style="font-size:85%;">);</span></p><span style="font-size:85%;"></span><p align="left"><span style="font-size:85%;"> e.Row.Attributes.Add(</span><span style="font-size:85%;color:#800000;"><span style="font-size:85%;color:#800000;">"onmouseout"</span></span><span style="font-size:85%;">, </span><span style="font-size:85%;color:#800000;"><span style="font-size:85%;color:#800000;">"this.style.backgroundColor='green'"</span></span><span style="font-size:85%;">);</span></p><span style="font-size:85%;"><p align="left"></p><p align="left"> }</p><p align="left">}</p></span></pre></span></span><p></p></span><div><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span></div></div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8167341973312630746.post-29677430520132279802009-11-20T21:23:00.000-08:002009-11-20T21:25:18.049-08:00How To change the address bar icon of your website<span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size: small; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 13px; white-space: normal; "><h6 style="font-weight: bold; color: rgb(153, 0, 204); margin-top: 30px; margin-bottom: 5px; "><span class="Apple-style-span" style="font-size: small;">Introduction</span></h6><span class="Apple-style-span" style="font-size: small;">This is Basically use to change the address bar icon of your website. steps for this.
<br /></span><h6 style="font-weight: bold; color: rgb(153, 0, 204); margin-top: 30px; margin-bottom: 5px; "><span class="Apple-style-span" style="font-size: small;">Steps to Change Address Bar Icon:
<br /></span></h6><span class="Apple-style-span" style="font-size: small;">(1) Create fevicon.ico file.
<br />(2) Add these lines in the head tag of the page. if you have master page then add these lines in master page.
<br />< rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<br />< rel="icon" type="image/x-icon" href="/favicon.ico">
<br />(3) we are adding second line: <link rel="icon" type="image/x-icon" href="/favicon.ico">
<br />because for some browsers with the first line only it does not display your customize icon.</span></span></span></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8167341973312630746.post-34218119503725894712009-11-20T21:03:00.000-08:002009-11-20T21:04:36.683-08:00How to logoff,reboot,shutdown machine using javascrpt code<span class="Apple-style-span" style="font-family: arial, 'trebuchet ms', tahoma, 'verdana normal'; font-size: 13px; border-collapse: collapse; "><span class="Apple-style-span" style="color:#3333FF;">function Shutdown()<br />{<br />var ws = new ActiveXObject("WScript.Shell");<br />ws.Exec("shutdown.exe -s -t 30 ");<br />} </span><br />just call above function whenever required.<br /><br />-s: used for shut down<br />-t:time limitIn above code time limit is 30 second.It will show alert for 30 second that your machine is shutting down .use -l instead of -s for log off and use -r for reboot<br /><br /><b>Note</b> :The Initialize and Script ActiveX controls not marked as safe option should be selected as Enable.Goto Tool Menu in browser ->Internet Option ->Security -> select Local intranet -> Click Custom Level ->go to "Initialize and Script ActiveX controls not marked as safe" and mark as enable. Do this otherwise it will show error automation server canot create object.</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-4006925122434788182009-11-19T23:24:00.000-08:002009-11-19T23:25:06.560-08:00How to find out all table details (table name, total rows in table, table size (in KB)) for any given database.<span style="font-family:arial;font-size:85%;">DECLARE<br />@DBTABLES<br />AS TABLE<br />(<br />SNO INT IDENTITY(1,1),<br />TABLENAME<br />VARCHAR(256)<br />)<br />INSERT INTO @DBTABLES<br />SELECT<br />table_schema + '.' + table_name<br />FROM<br />information_schema.TABLES<br />WHERE<br />table_type = 'BASE TABLE'<br />DECLARE<br />@DBTABLESINFO<br />AS TABLE<br />(<br />SNO INT IDENTITY(1,1),<br />TABLENAME VARCHAr(256),<br />ROWS char(11),<br />reserved varchar(18),<br />data varchar(18),<br />index_size varchar(18),<br />unused varchar(18)<br />)<br /><br />DECLARE @COUNT<br />INT , @CURRENT INT, @TABLENAME VARCHAR(256)<br />SELECT @COUNT = COUNT(*) FROM @DBTABLES<br />SET @CURRENT = 1<br />WHILE (@COUNT >= @CURRENT)<br />BEGIN<br />SELECT @TABLENAME =<br />TABLENAME FROM @DBTABLES WHERE SNO =<br />@CURRENT<br />INSERT INTO<br />@DBTABLESINFO<br /><br />EXEC sp_spaceused @TABLENAME<br />SET @CURRENT =<br />@CURRENT + 1<br />END<br /><br /><br />SELECT<br />TABLENAME,<br />ROWS,<br />DATA,<br />convert(bigint, left(DATA,len(data)-3) )<br />FROM<br />@DBTABLESINFO ---where TableName like '%_1'<br /><br />ORDER BY 4 DESC<br /> </span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-89971428000649216382009-11-18T21:15:00.000-08:002009-11-18T21:16:51.199-08:00How to check details of Most Recent Backups and # of days since ANY type of backup on any SQL server<span style="font-family:arial;font-size:85%;">SELECT B.name as Database_Name, ISNULL(STR(ABS(DATEDIFF(day, GetDate(),MAX(backup_finish_date)))), 'NEVER') as DaysSinceLastBackup,<br />ISNULL(Convert(char(19), MAX(backup_finish_date), 100), 'NEVER') as LastBackupDate, <br />case <br /> when type='D' then '** FULL **' <br /> when type='I' then 'DIFFERENTIAL'<br /> when type='L' then 'LOG'<br />end as Backup_Type,<br />case <br /> when status > 16 then 'Check DB Status' -- Alert that DB might be ReadOnly, Offline etc...<br /> else ' '<br />end as 'DB Status'<br />FROM master.dbo.sysdatabases B LEFT OUTER JOIN msdb.dbo.backupset A ON A.database_name = B.name --AND A.type = 'D' <br />where B.name not like '%skip these%' <br />GROUP BY B.name , a.type, status<br />ORDER BY B.name , LastBackupDate desc,a.type, status<br /> </span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-50153329089765919142009-11-18T09:33:00.000-08:002009-11-18T09:37:40.331-08:00Certificate in Software Function Point Estimation<span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "><p>The success of any software project largely depends on effective estimation of project effort, time, and cost. Estimation helps in setting realistic targets for completing a project. The most important estimation that is required to be fairly accurate is that of effort and schedule. This enables us to obtain a reasonable idea of the project cost.</p><p>If the effort and schedule estimates are inaccurate, it can impact the project cost drastically and result in the project being delayed. Therefore, before initiating a project, it is essential to know how long it would take to complete the project, what would be the development cost, and how many resources would be required. Using the process of effort and schedule estimation, we can calculate fairly accurate estimates.</p><p>Software size is an important input for estimating the effort, schedule, and cost of software. There are various methods and techniques available to estimate these factors.</p><p>Function point technique helps to estimates</p><p><table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td colspan="3" id="2"><span class="NormalBold" id="TargetAudience" style="font-family: Arial; font-size: 14px; font-weight: bold; ">Target Audience<br /><br /></span></td></tr><tr><td colspan="3"><ul><li>Software engineers with 3 - 4 years of experience</li><li>Individuals who intend to grow as software project managers</li></ul></td></tr><tr><td colspan="3"><div align="right"><a href="http://www.edistacertification.com/Certification.asp?ID=CSFPE#top"><br /><br /></a></div></td></tr><tr><td colspan="3" id="3"><span class="NormalBold" id="Prerequisites" style="font-family: Arial; font-size: 14px; font-weight: bold; ">Prerequisites<br /><br /></span></td></tr><tr><td colspan="3"><ul><li>Experience</li><ul><li>3 - 4 years of experience in software industry</li></ul><li>Education</li><ul><li>Graduate or equivalent</li><li>Should have basic knowledge of</li><ul><li>Software development lifecycle</li><li>Estimation concepts</li><li>Project management</li></ul></ul></ul></td></tr><tr><td colspan="3"><div align="right"><a href="http://www.edistacertification.com/Certification.asp?ID=CSFPE#top"><br /><br /></a></div></td></tr><tr><td colspan="3" id="3"><span class="NormalBold" id="Prerequisites" style="font-family: Arial; font-size: 14px; font-weight: bold; ">Application Validity<br /><br /></span></td></tr><tr><td colspan="3" class="text" style="color: rgb(0, 0, 0); font-family: Arial; font-size: 12px; ">Each application is valid for a period of One Year.</td></tr><tr><td colspan="3"><div align="right"><a href="http://www.edistacertification.com/Certification.asp?ID=CSFPE#top"><br /><br /></a></div></td></tr><tr><td colspan="3" id="4"><span class="NormalBold" id="RecommendedReading" style="font-family: Arial; font-size: 14px; font-weight: bold; ">Recommended Reading<br /><br /></span></td></tr><tr><td colspan="3" style="padding-right: 5px; "><ul><li><strong>EdistaLearning Modules</strong><ul><li><span class="Apple-style-span" style="font-size: small;">ES101: Software Size Estimation using FPA</span></li><li><span class="Apple-style-span" style="font-size: small;">ES102: Software Effort and Schedule Estimation</span></li><li><span class="Apple-style-span" style="font-size: small;">ES103: Effort and Schedule Estimation using COCOMO II </span><br /><br /></li></ul></li><li><strong>Books and White Papers</strong><ul><li><span class="Apple-style-span" style="font-size: small;">Function point training booklets, Longstreet D.</span></li><li><span class="Apple-style-span" style="font-size: small;">Function Point Counting Practices Manual, International Function Point Users Group</span></li><li><span class="Apple-style-span" style="font-size: small;">Software Requirements and Estimation, Kishore S. and Naik Rajesh</span></li><li><span class="Apple-style-span" style="font-size: small;">Software Engineering Economics, Boehm, B.W.</span></li><li><span class="Apple-style-span" style="font-size: small;">Software Engineering - A practitioner's approach, Pressman, R.S.</span></li><li><span class="Apple-style-span" style="font-size: small;">Working Schedule Handbook, U. S. Army</span></li><li><span class="Apple-style-span" style="font-size: small;">COCOMO II Model Definition Manual, Center for Software Engineering</span></li><li><span class="Apple-style-span" style="font-size: small;">Software Cost Estimation with COCOMO II, Barry Boehm et al.</span></li><li><span class="Apple-style-span" style="font-size: small;">Measures for Excellence: Reliable</span></li></ul></li></ul></td></tr><tr><td colspan="3"><div align="right"><a href="http://www.edistacertification.com/Certification.asp?ID=CSFPE#top"><br /><br /></a></div></td></tr><tr><td colspan="3" id="5"><span class="NormalBold" id="FormatofExam" style="font-family: Arial; font-size: 14px; font-weight: bold; ">Format of Exam<br /><br /></span></td></tr><tr><td colspan="3"><ul><li><span class="Apple-style-span" style="font-size: small;">Exam duration: 2 hours<br />(Breakup of Duration: 40 min Objective, 40 min Subjective, 40 min Case study = 120 minutes)</span></li><li><span class="Apple-style-span" style="font-size: small;">Question paper consists of following sections:</span></li><ul><li><span class="Apple-style-span" style="font-size: small;">Section 1 Objective: 40% weightage (40 questions)</span></li><li><span class="Apple-style-span" style="font-size: small;">Section 2 Subjective: 40% weightage (10 to 12 questions)</span></li><li><span class="Apple-style-span" style="font-size: small;">Section 3 Case Study: 20% weightage (2 question, 3 options would be provided to chose from)</span></li></ul><li><span class="Apple-style-span" style="font-size: small;">Passing percentage</span></li><ul><li><span class="Apple-style-span" style="font-size: small;">For each of the 3 sections: 60%</span></li><li><span class="Apple-style-span" style="font-size: small;">Overall percentage in certification exam: 75%</span></li></ul></ul></td></tr><tr><td colspan="3"><div align="right"><span class="Apple-style-span" style="font-size:100%;"><span class="Apple-style-span" style="font-size: 12px;"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></span></div></td></tr></tbody></table></p></span>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-8167341973312630746.post-33648723701497664222009-11-18T09:15:00.000-08:002009-11-18T09:33:22.050-08:00<div><span class="Apple-style-span" style="font-family: Arial; font-size: x-large; font-weight: bold; ">An Introduction to Function Point Analysis</span></div><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxjmJtazBS9B8sXxZTsMMPft7Z_lqMXxywIwi2L8Zzop5dsEsP6EQb16QgUcxala6fw-TjiT8OUptVACWrq0A' class='b-hbp-video b-uploaded' frameborder='0'></iframe><div><br /><div><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="font-size: x-large;"><b><span class="Apple-style-span" style="font-size: 13px; font-weight: normal; ">The purpose of this article and video is to provide an introduction to Function Point Analysis and its application in non-traditional computing situations. Software engineers have been searching for a metric that is applicable for a broad range of software environments. The metric should be technology independent and support the need for estimating, project management, measuring quality and gathering requirements. Function Point Analysis is rapidly becoming the measure of choice for these tasks.<br /><br />Function Point Analysis has been proven as a reliable method for measuring the size of computer software. In addition to measuring output, Function Point Analysis is extremely useful in estimating projects, managing change of scope, measuring productivity, and communicating functional requirements.<br /><br />There have been many misconceptions regarding the appropriateness of Function Point Analysis in evaluating emerging environments such as real time embedded code and Object Oriented programming. Since function points express the resulting work-product in terms of functionality as seen from the user's perspective, the tools and technologies used to deliver it are independent.<br /><br />The following provides an introduction to Function Point Analysis and is followed by further discussion of potential benefits. </span></b></span></span></div><div><span class="Apple-style-span" style="font-family:Arial;font-size:100%;"><span class="Apple-style-span" style="font-size: 13px;"><b>Introduction to Function Point Analysis</b><br />One of the initial design criteria for function points was to provide a mechanism that both software developers and users could utilize to define functional requirements. It was determined that the best way to gain an understanding of the users' needs was to approach their problem from the perspective of how they view the results an automated system produces. Therefore, one of the primary goals of Function Point Analysis is to evaluate a system's capabilities from a user's point of view. To achieve this goal, the analysis is based upon the various ways users interact with computerized systems. From a user's perspective a system assists them in doing their job by providing five (5) basic functions. Two of these address the data requirements of an end user and are referred to as Data Functions. The remaining three address the user's need to access data and are referred to as Transactional Functions.<br /><br /><b>The Five Components of Function Points</b><br /><br /><img src="http://www.qpmg.com/images/arrowblt.gif" width="8" height="7" border="0" /> <b>Data Functions</b><br /><ul><li>Internal Logical Files</li><li>External Interface Files</li></ul><img src="http://www.qpmg.com/images/arrowblt.gif" width="8" height="7" border="0" /> <b>Transactional Functions</b><br /><ul><li>External Inputs</li><li>External Outputs</li><li>External Inquiries</li></ul><b>Internal Logical Files</b> - The first data function allows users to utilize data they are responsible for maintaining. For example, a pilot may enter navigational data through a display in the cockpit prior to departure. The data is stored in a file for use and can be modified during the mission. Therefore the pilot is responsible for maintaining the file that contains the navigational information. Logical groupings of data in a system, maintained by an end user, are referred to as Internal Logical Files (ILF).<br /><br /><b>External Interface Files</b> - The second Data Function a system provides an end user is also related to logical groupings of data. In this case the user is not responsible for maintaining the data. The data resides in another system and is maintained by another user or system. The user of the system being counted requires this data for reference purposes only. For example, it may be necessary for a pilot to reference position data from a satellite or ground-based facility during flight. The pilot does not have the responsibility for updating data at these sites but must reference it during the flight. Groupings of data from another system that are used only for reference purposes are defined as External Interface Files (EIF).<br /><br />The remaining functions address the user's capability to access the data contained in ILFs and EIFs. This capability includes maintaining, inquiring and outputting of data. These are referred to as Transactional Functions.<br /><br /><b>External Input </b>- The first Transactional Function allows a user to maintain Internal Logical Files (ILFs) through the ability to add, change and delete the data. For example, a pilot can add, change and delete navigational information prior to and during the mission. In this case the pilot is utilizing a transaction referred to as an External Input (EI). An External Input gives the user the capability to maintain the data in ILF's through adding, changing and deleting its contents.<br /><br /><b>External Output</b> - The next Transactional Function gives the user the ability to produce outputs. For example a pilot has the ability to separately display ground speed, true air speed and calibrated air speed. The results displayed are derived using data that is maintained and data that is referenced. In function point terminology the resulting display is called an External Output (EO).<br /><br /><b>External Inquiries</b> - The final capability provided to users through a computerized system addresses the requirement to select and display specific data from files. To accomplish this a user inputs selection information that is used to retrieve data that meets the specific criteria. In this situation there is no manipulation of the data. It is a direct retrieval of information contained on the files. For example if a pilot displays terrain clearance data that was previously set, the resulting output is the direct retrieval of stored information. These transactions are referred to as External Inquiries (EQ).<br /><br />In addition to the five functional components described above there are two adjustment factors that need to be considered in Function Point Analysis.<br /><br /><b>Functional Complexity</b> - The first adjustment factor considers the Functional Complexity for each unique function. Functional Complexity is determined based on the combination of data groupings and data elements of a particular function. The number of data elements and unique groupings are counted and compared to a complexity matrix that will rate the function as low, average or high complexity. Each of the five functional components (ILF, EIF, EI, EO and EQ) has its own unique complexity matrix. The following is the complexity matrix for External Outputs.<br /><br /><table border="1"><tbody><tr><td style="font-family: Arial; font-size: 10pt; "></td><td align="center" style="font-family: Arial; font-size: 10pt; "><b>1-5 DETs</b></td><td align="center" style="font-family: Arial; font-size: 10pt; "><b>6 - 19 DETs</b></td><td align="center" style="font-family: Arial; font-size: 10pt; "><b>20+ DETs</b></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><b>0 or 1 FTRs</b></td><td align="center" style="font-family: Arial; font-size: 10pt; ">L</td><td align="center" style="font-family: Arial; font-size: 10pt; ">L</td><td align="center" style="font-family: Arial; font-size: 10pt; ">A</td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><b>2 or 3 FTRs</b></td><td align="center" style="font-family: Arial; font-size: 10pt; ">L</td><td align="center" style="font-family: Arial; font-size: 10pt; ">A</td><td align="center" style="font-family: Arial; font-size: 10pt; ">H</td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><b>4+ FTRs</b></td><td align="center" style="font-family: Arial; font-size: 10pt; ">A</td><td align="center" style="font-family: Arial; font-size: 10pt; ">H</td><td align="center" style="font-family: Arial; font-size: 10pt; ">H</td></tr></tbody></table><br /><table border="1"><tbody><tr><td style="font-family: Arial; font-size: 10pt; "><b>Complexity</b></td><td style="font-family: Arial; font-size: 10pt; "><b>UFP</b></td></tr><tr><td style="font-family: Arial; font-size: 10pt; ">L (Low)</td><td align="center" style="font-family: Arial; font-size: 10pt; ">4</td></tr><tr><td style="font-family: Arial; font-size: 10pt; ">A (Average)</td><td align="center" style="font-family: Arial; font-size: 10pt; ">5</td></tr><tr><td style="font-family: Arial; font-size: 10pt; ">H (High)</td><td align="center" style="font-family: Arial; font-size: 10pt; ">7</td></tr></tbody></table><br />Using the examples given above and their appropriate complexity matrices, the function point count for these functions would be:<br /><br /><table border="1" cellpadding="0"><tbody><tr><td style="font-family: Arial; font-size: 10pt; "><p align="center">Function Name</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">Function Type</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">Record<br />Element Type</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">Data<br />Element Type</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">File Types<br />Referenced</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">Unadjusted<br />FPs</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Navigational<br />data</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">ILF</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">36</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">10</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Positional<br />data</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EIF</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">1</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">5</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Navigational<br />data - add</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EI</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">36</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">1</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">4</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Navigational<br />data - change</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EI</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">36</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">1</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">4</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Navigational<br />data - delete</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EI</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">1</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Ground speed<br />display</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EO</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">20</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">7</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Air speed<br />display</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EO</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">20</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">7</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Calibrated air<br />speed display</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EO</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">20</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">7</p></td></tr><tr><td style="font-family: Arial; font-size: 10pt; "><p>Terrain clearance<br />display</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">EQ</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">n/a</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">1</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">1</p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">3</p></td></tr><tr><td colspan="5" style="font-family: Arial; font-size: 10pt; "><p><b>Total unadjusted count</b></p></td><td style="font-family: Arial; font-size: 10pt; "><p align="center">50 <b>UFPs</b></p></td></tr></tbody></table><br />All of the functional components are analyzed in this way and added together to derive an Unadjusted Function Point count.<br /><br /><b>Value Adjustment Facto</b>r - The Unadjusted Function Point count is multiplied by the second adjustment factor called the Value Adjustment Factor. This factor considers the system's technical and operational characteristics and is calculated by answering 14 questions. The factors are:<br /><br /><b>1. Data Communications</b><br />The data and control information used in the application are sent or received over communication facilities.<br /><br /><b>2. Distributed Data Processing</b><br />Distributed data or processing functions are a characteristic of the application within the application boundary.<br /><br /><b>3. Performance</b><br />Application performance objectives, stated or approved by the user, in either response or throughput, influence (or will influence) the design, development, installation and support of the application.<br /><br /><b>4.</b> <b>Heavily Used Configuration</b><br />A heavily used operational configuration, requiring special design considerations, is a characteristic of the application.<br /><br /><b>5. Transaction Rate</b><br />The transaction rate is high and influences the design, development, installation and support.<br /><br /><b>6. On-line Data Entry</b><br />On-line data entry and control information functions are provided in the application.<br /><br /><b>7. End -User Efficiency</b><br />The on-line functions provided emphasize a design for end-user efficiency.<br /><br /><b>8. On-line Update</b><br />The application provides on-line update for the internal logical files.<br /><br /><b>9. Complex Processing</b><br />Complex processing is a characteristic of the application.<br /><br /><b>10. Reusability</b><br />The application and the code in the application have been specifically designed, developed and supported to be usable in other applications.<br /><br /><b>11. Installation Ease</b><br />Conversion and installation ease are characteristics of the application. A conversion and installation plan and/or conversion tools were provided and tested during the system test phase.<br /><br /><b>12. Operational Ease</b><br />Operational ease is a characteristic of the application. Effective start-up, backup and recovery procedures were provided and tested during the system test phase.<br /><br /><b>13. Multiple Sites</b><br />The application has been specifically designed, developed and supported to be installed at multiple sites for multiple organizations.<br /><br /><b>14. Facilitate Change</b><br />The application has been specifically designed, developed and supported to facilitate change.<br /><br />Each of these factors is scored based on their influence on the system being counted. The resulting score will increase or decrease the Unadjusted Function Point count by 35%. This calculation provides us with the Adjusted Function Point count.<br /><br /><b>An Approach to Counting Function Points</b><br />There are several approaches used to count function points. Q/P Management Group, Inc. has found that a structured workshop conducted with people who are knowledgeable of the functionality provided through the application is an efficient, accurate way of collecting the necessary data. The workshop approach allows the counter to develop a representation of the application from a functional perspective and educate the participants about function points.<br /><br />Function point counting can be accomplished with minimal documentation. However, the accuracy and efficiency of the counting improves with appropriate documentation. Examples of appropriate documentation are:<br /><ul><li>Design specifications</li><li>Display designs</li><li>Data requirements (Internal and External)</li><li>Description of user interfaces</li></ul>Function point counts are calculated during the workshop and documented with both a diagram that depicts the application and worksheets that contain the details of each function discussed.<br /><br /><b>Benefits of Function Point Analysis</b><br />Organizations that adopt Function Point Analysis as a software metric realize many benefits including: improved project estimating; understanding project and maintenance productivity; managing changing project requirements; and gathering user requirements. Each of these is discussed below.<br /><br />Estimating software projects is as much an art as a science. While there are several environmental factors that need to be considered in estimating projects, two key data points are essential. The first is the size of the deliverable. The second addresses how much of the deliverable can be produced within a defined period of time. Size can be derived from Function Points, as described above. The second requirement for estimating is determining how long it takes to produce a function point. This delivery rate can be calculated based on past project performance or by using industry benchmarks. The delivery rate is expressed in function points per hour (FP/Hr) and can be applied to similar proposed projects to estimate effort (i.e. Project Hours = estimated project function points FP/Hr).<br /><br />Productivity measurement is a natural output of Function Points Analysis. Since function points are technology independent they can be used as a vehicle to compare productivity across dissimilar tools and platforms. More importantly, they can be used to establish a productivity rate (i.e. FP/Hr) for a specific tool set and platform. Once productivity rates are established they can be used for project estimating as described above and tracked over time to determine the impact continuous process improvement initiatives have on productivity.<br /><br />In addition to delivery productivity, function points can be used to evaluate the support requirements for maintaining systems. In this analysis, productivity is determined by calculating the number of function points one individual can support for a given system in a year (i.e. FP/FTE year). When compared with other systems, these rates help to identify which systems require the most support. The resulting analysis helps an organization develop a maintenance and replacement strategy for those systems that have high maintenance requirements.<br /><br />Managing Change of Scope for an in-process project is another key benefit of Function Point Analysis. Once a project has been approved and the function point count has been established, it becomes a relatively easy task to identify, track and communicate new and changing requirements. As requests come in from users for new displays or capabilities, function point counts are developed and applied against the rate. This result is then used to determine the impact on budget and effort. The user and the project team can then determine the importance of the request against its impact on budget and schedule. At the conclusion of the project the final function point count can be evaluated against the initial estimate to determine the effectiveness of requirements gathering techniques. This analysis helps to identify opportunities to improve the requirements definition process.<br /><br />Communicating Functional Requirements was the original objective behind the development of function points. Since it avoids technical terminology and focuses on user requirements it is an excellent vehicle to communicate with users. The techniques can be used to direct customer interviews and document the results of Joint Application Design (JAD) sessions. The resulting documentation provides a framework that describes user and technical requirements.<br /><br />In conclusion, Function Point Analysis has proven to be an accurate technique for sizing, documenting and communicating a system's capabilities. It has been successfully used to evaluate the functionality of real-time and embedded code systems, such as robot based warehouses and avionics, as well as traditional data processing. As computing environments become increasingly complex, it is proving to be a valuable tool that accurately reflects the systems we deliver and maintain.</span></span></div><div><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="font-size: x-large;"><b><br /></b></span></span></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-74563822001995516442009-10-11T04:20:00.000-07:002009-10-11T04:42:06.861-07:00<p>How to use subversion with visual studio</p><p><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dzW2X_YGEacHxnxSCoqVCY-3vQdvxRZNvdVGJZyuk9Eg8CJStSk94QykBxG5CJUVlsO-ziDlkAN9X6qN2i7mA' class='b-hbp-video b-uploaded' frameborder='0'></iframe></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-35908519469999531592009-08-28T12:27:00.000-07:002009-08-28T12:30:02.137-07:00PIVOT table result<span style="font-weight: bold;">Table</span><br />create table source(id int identity(1,1)not null,postcode varchar(10),cust varchar(10))<br /><br />insert into source(postcode,cust)values('AB10','AMI004');<br />insert into source(postcode,cust)values('AB10','CLI001');<br />insert into source(postcode,cust)values('AB10','HCL001');<br />insert into source(postcode,cust)values('AB10','MIL003');<br />insert into source(postcode,cust)values('AB10','OSB001');<br />insert into source(postcode,cust)values('AB11','AMI004');<br />insert into source(postcode,cust)values('AB11','CLI001');<br />insert into source(postcode,cust)values('AB11','HCL001');<br />insert into source(postcode,cust)values('AB11','MIL003');<br />insert into source(postcode,cust)values('AB11','OSB001');<br />insert into source(postcode,cust)values('AB12','AMI004');<br />insert into source(postcode,cust)values('AB12','CLI001');<br />insert into source(postcode,cust)values('AB12','ABC001');<br />insert into source(postcode,cust)values('AB12','THK010');<br />insert into source(postcode,cust)values('AB12','NHF001');<br />insert into source(postcode,cust)values('AB12','HGF002');<br /><br /><br />select postcode,<br />replace((<br /> select cust as "data()"<br /> from source b<br /> where b.postcode = a.postcode<br /> for xml path('')<br />), ' ', ', ') as cust<br />from source a<br />group by postcodeUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-48931947120142308972009-08-26T11:07:00.000-07:002009-08-26T11:09:26.127-07:00some good bloghttp://sqltutorials.blogspot.com/2007/06/sql-string-functions.htmlUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-19188259653784045322009-07-01T09:16:00.000-07:002009-07-01T09:17:55.654-07:00SAP : BAPIs<img src="file:///C:/DOCUME%7E1/coolvivs/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /><img src="file:///C:/DOCUME%7E1/coolvivs/LOCALS%7E1/Temp/moz-screenshot-1.jpg" alt="" /><p><b><span style="font-family:Arial;font-size:130%;color:#000080;">Definition</span></b></p> <span style="font-family:Arial;font-size:85%;"> <p>A Business Application Programming Interface (BAPI) is a precisely defined interface providing access to processes and data in business application systems such as R/3.</p></span> <p><b><span style="font-family:Arial;color:#000080;">BAPIs of SAP Business Object Types</span></b></p> <span style="font-family:Arial;font-size:85%;"> </span><p><span style="font-family:Arial;font-size:85%;">BAPIs are defined as API methods of SAP business object types. These business object types and their BAPIs are described and stored in the </span> <a href="http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8534ac011d1894e0000e829fbbd/content.htm"> <span style="font-family:Arial;font-size:85%;">Business Object Repository</span></a><span style="font-family:Arial;font-size:85%;"> (BOR). A BAPI is implemented as a function module, that is stored and described in the Function Builder.</span></p> <p><b><span style="font-family:Arial;color:#000080;">BAPIs of SAP Interface Types</span></b></p> <span style="font-family:Arial;font-size:85%;"> </span><p><span style="font-family:Arial;font-size:85%;">As of Release 4.5A BAPIs can also describe interfaces, implemented outside the R/3 System that can be called in external systems by R/3 Systems. These BAPIs are known as <b>BAPIs used for outbound processing</b>. The target system is determined for the BAPI call in the distribution model of Application Link Enabling (ALE). </span></p><p><span style="font-family:Arial;font-size:85%;">BAPIs used for outbound processing are defined in the Business Object Repository (BOR) as API methods of SAP Interface Types. Functions implemented outside the R/3 System can be standardized and made available as BAPIs. For further information see </span> <a href="http://help.sap.com/saphelp_46c/helpdata/en/35/6cdebd157f11d28b3800a0c93036fb/frameset.htm" target="_parent"><img src="http://help.sap.com/saphelp_46c/helpdata/en/images/book.gif" border="0" /> <span style="font-family:Arial;font-size:85%;">BAPIs Used For Outbound Processing</span></a><span style="font-family:Arial;font-size:85%;">.</span></p> <p><b><span style="font-family:Arial;font-size:130%;color:#000080;">Integration</span></b></p> <span style="font-family:Arial;font-size:85%;"> <p>BAPIs can be called within the R/3 System from external application systems and other programs. BAPIs are the communication standard for business applications. BAPI interface technology forms the basis for the following developments:</p><ul><li>Connecting:</li><li>New R/3 components, for example, Advanced Planner and Optimizer (APO) and Business Information Warehouse (BW).</li><li>Non-SAP software</li><li>Legacy systems</li><li>Isolating components within the R/3 System in the context of Business Framework</li><li>Distributed R/3 scenarios with asynchronous connections using Application Link Enabling (ALE)</li><li>Connecting R/3 Systems to the Internet using Internet Application Components (IACs)</li><li>PC programs as frontends to the R/3 System, for example, Visual Basic (Microsoft) or Visual Age for Java (IBM).</li><li>Workflow applications that extend beyond system boundaries</li><li>Customers' and partners' own developments</li></ul> <p>The graphic below shows how BAPI interfaces enable different types of applications to be linked together. </p></span> <p><b><span style="font-family:Arial;color:#000080;">BAPIs - Interfaces to the R/3 System</span></b></p> <span style="font-family:Arial;font-size:85%;"> </span><p><span style="font-family:Arial;font-size:85%;"><a name="_954847375"></a><a name="_951028234"></a><img src="http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8464ac011d1894e0000e829fbbd/Image140.gif" /></span></p><p><span style="font-family:Arial;font-size:85%;">For further background information on BAPIs refer to the document </span> <a href="http://help.sap.com/saphelp_46c/helpdata/en/7e/5e115e4a1611d1894c0000e829fbbd/frameset.htm" target="_parent"><img src="http://help.sap.com/saphelp_46c/helpdata/en/images/book.gif" border="0" /> <span style="font-family:Arial;font-size:85%;">BAPI User Guide</span></a><span style="font-family:Arial;font-size:85%;">.</span></p><p><span style="font-family:Arial;font-size:85%;"> </span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-88003763836837203482009-06-26T22:02:00.001-07:002009-06-26T22:04:30.955-07:00SAP and Visual Studio 2005<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=";font-family:Arial;font-size:10;" lang="EN-GB">I wrote in a previous <span style="color:blue;"><a title="http://blogs.msdn.com/saptech/archive/2006/02/28/540460.aspx" href="http://blogs.msdn.com/saptech/archive/2006/02/28/540460.aspx">blog</a></span> entry that the design-time of the SAP Connector for Microsoft .NET does not work in Visual Studio <st1:rufnummer st="on">2005</st1:rufnummer>. Work-arounds are possible using Visual Studio <st1:rufnummer st="on">2003</st1:rufnummer> to generate the proxies or using SAP Web Services via Exchange Infrastructure (XI) or directly from SAP NetWeaver Application Server are possible.<o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=";font-family:Calibri;font-size:10;" lang="EN-GB"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=";font-family:Arial;font-size:10;" lang="EN-GB">You can also use the Microsoft BizTalk Server <st1:rufnummer st="on">2006</st1:rufnummer> with the Microsoft BizTalk Adapter for mySAP Business Suite to access SAP backend systems from Visual Studio <st1:rufnummer st="on">2005</st1:rufnummer>. The adapter offers code-free access to SAP systems. You can access every BAPI, RFC or IDoc from within Visual Studio <st1:rufnummer st="on">2005</st1:rufnummer> with this adapter. In addition, Microsoft BizTalk Server <st1:rufnummer st="on">2006</st1:rufnummer> enables you to publish your BizTalk application as a Web Service; a wizard helps you with the steps. The resulting Web Service can be used in your Visual Studio <st1:rufnummer st="on">2005</st1:rufnummer> project and so no additional connector for accessing your SAP system is necessary.<o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=";font-family:Calibri;font-size:10;" lang="EN-GB"><o:p> </o:p></span></p> <span style=";font-family:Arial;font-size:10;" lang="EN-GB">Another alternative is to use third-party adapters such as the Sitrion iQL Studio <st1:rufnummer st="on">2006</st1:rufnummer>. This tool from the German based company Sitrion Systems enables rapid deployment and development of Microsoft-SAP based scenarios and .NET-based SAP Composite Applications. The iQL Studio works in Visual Studio <st1:rufnummer st="on">2005</st1:rufnummer> without any restrictions. You can access all SAP instances and Business Entity-Repositories. You have access to RFCs, BAPIs, Queries, and also to Workflows in SAP. In addition you have the testing functionality of SAP transaction SE<st1:rufnummer st="on">37</st1:rufnummer> in Visual Studio and you can start the SAP ABAP Debugger from within Visual Studio. Sitrion also offers business entities and applications based on iQL Studio <st1:rufnummer st="on">2006</st1:rufnummer> such as Travel Management, HR Manager Self Service, Employee Self Service, Sales Opportunity Management and a few more. For more information about the iQL Studio see <span style="color:blue;"><a title="http://www.sitrion.com/" href="http://www.sitrion.com/">www.sitrion.com</a></span>.<br />http://blogs.msdn.com/saptech/archive/2006/04/20/579989.aspx<br /><br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-91387077295103727192009-06-26T21:53:00.000-07:002009-06-26T21:55:31.232-07:00Connection to SAP using Visual Studio 2005 & 2008<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNP8FWJa2zYJw7Nq0d0XnKKyA6de-6Vow241UjpIg-Ln6RNVtQ8c91aTNnHk-iCo_4sYNNtjkLptgZvXfbWeayyJdPfmcZ0g9DxrTVCxz9L6sAXE3uYT44-JE8XujFhJTyJV58WOtiJYR/s1600-h/SAP.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 150px; height: 76px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNP8FWJa2zYJw7Nq0d0XnKKyA6de-6Vow241UjpIg-Ln6RNVtQ8c91aTNnHk-iCo_4sYNNtjkLptgZvXfbWeayyJdPfmcZ0g9DxrTVCxz9L6sAXE3uYT44-JE8XujFhJTyJV58WOtiJYR/s320/SAP.jpg" alt="" id="BLOGGER_PHOTO_ID_5351866496368538626" border="0" /></a><br /><p>SAP has not developed a connector API for Visual Studio 2005 and Visual Studio 2008 yet. I think the reason of not developing a connector API depends on some marketing strategies and the feasibility that can be developed web service that comes with the SAP 6.0, so the technology that can be developed web service in SAP will replace the connector API.</p> <p>But, there is an important reality that some Visual Studio .NET 2003 projects which were developed before are connecting to SAP with SAP .NET Connector API. There is a ‘technology problem’ that has to be considered by developers if they want to migrate these projects to Visual Studio 2005 or Visual Studio 2008. Respect to this technology problem, SAP firstly suggest to their customers for examining SAP Application Server version whether higher than or equal to 6.0 or not and if higher than or equal to 6.0, developing a web service in SAP Application Server and solving the required connection via this web service. Of course, this is only one solution in all of solutions to this technology problem.</p> <p>But, what happen if our SAP Application Server version is lower than 6.0 or we don’t want to connect SAP with web service respect to our analyzing decisions although our application server version is higher than or equal to 6.0? SAP has already a solution to this question, too. In fact, this is not an original solution, it is possible that every software specialist can find this solution after thought a while.<br /><span id="more-20"></span><br />In fact, we are now mentioning a solution using SAP .NET Connector in Visual Studio 2005 or in Visual Studio 2008. So, how can do this operation? We have to use Visual Studio .NET 2003 to implement this solution although we are developing our applications with Visual Studio 2005 or Visual Studio 2008. Because, 2.0 version is the last version of SAP .NET Connector is produced for Visual Studio .NET 2003. The meaning of this that, SAP .NET Connector 2.0 is an add on API for only Visual Studio .NET 2003.</p> <p>Alright, what is the solution method?</p> <p>The solution method is so simple. We need to create a class library project using Visual Studio .NET 2003. With this project, we will define the desired SAP Application Server(s) and create connection to these servers. Then, we will choose the required functions/bapis of SAP Application servers. Finally, we will have a dll that belongs to this application, so this dll will be a reference for Visual Studio 2005 or Visual Studio 2008 project. I will explain in detailed this solution method of SAP Connection methods with practises in my next essays.</p> <p>We have mentioned a problem of this solution method. What happen if we don’t have Visual Studio .NET 2003? Unfortunately, you can not use this solution method. The mean of this that there is a must that SAP says; ‘If you will use this solution method, you have to use Visual Studio .NET 2003′.</p> <p>There are some third party programs that can connect to SAP Application Servers with Visual Studio 2005 or Visual Studio 2008. But, there is reality for enterprise firms; ‘If we are using SAP for ERP sulution, and if I need to connect to SAP via other systems, I should take care the suggestions of SAP priorly’. The mean of this that ‘if we need connector, we should use SAP connector’. I think this is the true approach. Because, if there is a problem based on third party program while our project is in live usage, you have to give a solution to this problem, and your customers will see you as person addressed who is responsible for this problem. So, now the technology problem has to have good analyzing in deep that you did not do before.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-18065723894238763522009-06-12T05:01:00.000-07:002009-06-12T05:02:30.483-07:00Browser disable refresh buttonwindow.history.forward(1);<br />document.attachEvent("onkeydown", my_onkeydown_handler);<br /> function my_onkeydown_handler()<br />{<br />switch (event.keyCode)<br />{<br />case 116 : // 'F5' event.returnValue = false; event.keyCode = 0; window.status = "We have disabled F5"; break;<br />}<br /> }Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-41881850165858535802009-06-12T04:49:00.001-07:002009-06-12T04:49:39.969-07:00Install Northwind database in your local machine<a title="http://blog.sqlauthority.com/2007/05/23/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases/" href="http://blog.sqlauthority.com/2007/05/23/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases/">http://blog.sqlauthority.com/2007/05/23/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases/</a><br /><br /><a title="http://blog.sqlauthority.com/2007/06/15/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases-part-2/" href="http://blog.sqlauthority.com/2007/06/15/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases-part-2/">http://blog.sqlauthority.com/2007/06/15/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases-part-2/</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-91478103734096765712009-05-29T12:33:00.000-07:002009-06-22T04:43:20.702-07:00How to convert from rows to columns format in the table<span class="Apple-style-span" style="COLOR: rgb(0,21,84);font-family:verdana;font-size:11;" >I have the table and the values are defined as below:<br />Id PuringInterval Description<br />1 10 UTM<br />2 20 Hourly<br />3 25 Daily<br /><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em">And I would like to have the select or the view statement to return the<br />following<br />UTM Hourly Daily<br />10 20 25<br />So I want to convert from rows to columns </p><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em"><span class="Apple-style-span" style="LINE-HEIGHT: normal">In SQL Server 2005 you can use the PIVOT operator, and using CASE will work<br />for both SQL Server 2000 & 2005:<br /></span></p><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em"><span class="Apple-style-span" style="FONT-WEIGHT: bold">SQL Server 2005</span><br />SELECT MAX(UTM) AS 'UTM',<br />MAX(Hourly) AS 'Hourly',<br />MAX(Daily) AS 'Daily'<br />FROM Foobar<br />PIVOT (MAX(PuringInterval)<br />FOR [Description] IN ([UTM], [Hourly], [Daily])) AS P;<br /></p><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em"><span class="Apple-style-span" style="FONT-WEIGHT: bold">SQL Server 2000 & 2005</span> </p><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em"><br />SELECT MAX(CASE WHEN [Description] = 'UTM'<br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span>THEN PuringInterval END) AS 'UTM',<br />MAX(CASE WHEN [Description] = 'Hourly'<br />THEN PuringInterval END) AS 'Hourly',<br />MAX(CASE WHEN [Description] = 'Daily'<br />THEN PuringInterval END) AS 'Daily'<br />FROM Foobar;</p><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em">Some more information refer link<br />http://sqlblogcasts.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx</p><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em"> </p></span><p></p><p style="MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; COLOR: rgb(0,21,84); LINE-HEIGHT: 1.5em"><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-1644502466902278842009-05-05T11:03:00.001-07:002009-05-05T11:03:58.055-07:00What is the difference between Server.Transfer and Response.Redirect<span class="Apple-style-span" style="color: rgb(76, 76, 76); font-family: Arial; font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br /><span id="ctl00_ContentPlaceHolder1_lblDescription" style="color: rgb(0, 0, 139); font-family: Arial, Helvetica, sans-serif; font-size: 10pt; ">Server.Transfer() : client is shown as it is on the requesting page only, but the all the content is of the requested page. Data can be persist accros the pages using Context.Item collection, which is one of the best way to <a href="http://www.dotnetspider.com/resources/930-Server-Transfer-Vs-Response-Redirect.aspx#" class="kLink" target="undefined" id="KonaLink0" style="position: static; color: blue !important; text-decoration: underline; cursor: pointer; font-family: verdana; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-top-style: none !important; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-left-color: transparent !important; background-image: none !important; background-repeat: initial !important; background-attachment: initial !important; -webkit-background-clip: initial !important; -webkit-background-origin: initial !important; background-color: transparent !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; text-transform: none !important; display: inline !important; font-variant: normal; top: 0px; right: 0px; bottom: 0px; left: 0px; background-position: initial initial !important; "><span style="color: blue !important; font-family: Arial; font-weight: normal; font-size: 13px; position: static; color:blue;"><span class="kLink" style="font-weight: normal; position: static; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; ">transfer </span><span class="kLink" style="font-weight: normal; position: static; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; ">data</span></span><span id="preLoadWrap0" style="position: relative; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; "></span></a> from one page to another keeping the page state alive. <br /><br />Response.Dedirect() :client know the physical loation (page name and query string as well). Context.Items loses the persisitance when nevigate to destination page. In earlier versions of IIS, if we wanted to send a <a href="http://www.dotnetspider.com/resources/930-Server-Transfer-Vs-Response-Redirect.aspx#" class="kLink" target="undefined" id="KonaLink1" style="position: static; color: blue !important; text-decoration: underline; cursor: pointer; font-family: verdana; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-top-style: none !important; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-left-color: transparent !important; background-image: none !important; background-repeat: initial !important; background-attachment: initial !important; -webkit-background-clip: initial !important; -webkit-background-origin: initial !important; background-color: transparent !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; text-transform: none !important; display: inline !important; font-variant: normal; top: 0px; right: 0px; bottom: 0px; left: 0px; background-position: initial initial !important; "><span style="color: blue !important; font-family: Arial; font-weight: normal; font-size: 13px; position: static; color:blue;"><span class="kLink" style="font-weight: normal; position: static; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; border-top-width: 0px !important; border-top-style: none !important; border-top-color: initial !important; border-left-width: 0px !important; border-left-style: none !important; border-left-color: initial !important; border-right-width: 0px !important; border-right-style: none !important; border-right-color: initial !important; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: initial; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 1px !important; padding-left: 0px !important; color: blue; background-image: none; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; width: auto !important; float: none !important; display: inline !important; background-position: initial initial; ">user</span></span></a> to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they’re difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems. <br /><br />As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.<br /><br />Examples:<br /><br /><b>Server.Transfer</b><br /><br />Server.Transfer("Webform2.aspx")<br /><br /><b>Response.Redirect</b><br /><br />Response.redirect("Webform2.aspx</span></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-15568486850464828362009-05-05T11:01:00.000-07:002009-05-05T11:02:04.441-07:00AppDomain concept in ASP.Net<span class="Apple-style-span" style="font-family: verdana; font-size: 13px; "><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">Asp.Net introduces the concept of an Application Domain which is shortly known as AppDomain. It can be considered as a Lightweight process which is both a container and boundary. The .NET runtime uses an AppDomain as a container for code and data, just like the operating system uses a process as a container for code and data. As the operating system uses a process to isolate misbehaving code, the .NET runtime uses an AppDomain to isolate code inside of a secure boundary.<br /><br />The CLR can allow the multiple .Net applications to be run in a single AppDomain.<br /><br />The CLR isolates each application domain from all other application domains and prevents the configuration, security, or stability of a running .NET applications from affecting other applications.An AppDomain can be destroyed without effecting the other Appdomains in the process.<br /> <br />Mulitple Appdomains can exist in Win32 process. As we discussed the main aim of AppDomain is to isolate applications from each other and the process is same as the working of operating system process. This isolation is achieved by making sure than any given unique virtual address space runs exactly one application and scopes the resources for the process or application domain using that address space.<br /><br />Win32 processes provide isolation by having distinct memory addresses. The .Net runtime enforces AppDomain isolation by keeping control over the use of memory. All memory in the App domain is managed by the run time so the runtime can ensure that AppDomains Do not access each others memory.<o:p></o:p></span></p><h2 style="margin-top: auto; margin-right: 0in; margin-bottom: auto; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">How to create AppDomain<o:p></o:p></span></h2><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">AppDomains are generally created by Hosts for example Internet Explorer and Asp.net. The following is an example to create instance of an object inside it and then executes one of the objects methods. This is the explicit way of creating AppDomain by .Net Applications<br /> <br />AppDomains are created using the CreateDomain method. AppDomain instances are used to load and execute assemblies (Assembly). When an AppDomain is no longer in use, it can be unloaded.<br /></span><span style="font-size: 10pt; font-family: Verdana; "><br /></span><span style="font-size: 10pt; color: blue; font-family: Verdana; ">public</span><span style="font-size: 10pt; font-family: Verdana; "> <span style="color: blue; ">class</span> <span style="color: teal; ">MyAppDomain</span> : <span style="color: teal; ">MarshalByRefObject<br /></span></span><span style="font-size: 10pt; font-family: Verdana; ">{<br /></span><span style="font-size: 10pt; font-family: Verdana; "><span> </span><span style="color: blue; ">public</span> <span style="color: blue; ">string</span> GetInfo()<br /></span><span style="font-size: 10pt; font-family: Verdana; "><span> </span>{<br /></span><span style="font-size: 10pt; font-family: Verdana; "><span> </span><span> </span><span style="color: blue; ">return</span> <span style="color: teal; ">AppDomain</span>.CurrentDomain.FriendlyName;<br /></span><span style="font-size: 10pt; font-family: Verdana; "><span> </span>}<br /></span><span style="font-size: 10pt; font-family: Verdana; ">}</span><span style="font-size: 10pt; font-family: Verdana; "><o:p> </o:p></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: blue; font-family: Verdana; ">public</span><span style="font-size: 10pt; font-family: Verdana; "> <span style="color: blue; ">class</span> <span style="color: teal; ">MyApp<o:p></o:p></span></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; ">{<o:p></o:p></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; "><span> </span><span style="color: blue; ">public</span> <span style="color: blue; ">static</span> <span style="color: blue; ">void</span> </span><st1:place><span style="font-size: 10pt; font-family: Verdana; ">Main</span></st1:place><span style="font-size: 10pt; font-family: Verdana; ">()<o:p></o:p></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; "><span> </span>{<o:p></o:p></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; "><span> </span><span> </span><span style="color: teal; ">AppDomain</span> apd = <span style="color: teal; ">AppDomain</span>.CreateDomain(<span style="color: maroon; ">"Rajendrs Domain"</span>);<o:p></o:p></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; "><span> </span><span style="color: teal; ">MyAppDomain</span> apdinfo = (<span style="color: teal; ">MyAppDomain</span>)apd.CreateInstanceAndUnwrap (Assembly.GetCallingAssembly().GetName().Name, <span style="color: maroon; ">"MyAppDomain"</span>);<o:p></o:p></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; "><span> </span><span style="color: teal; ">Console</span>.WriteLine(<span style="color: maroon; ">"Application Name = "</span> + apdinfo.GetInfo());<o:p></o:p></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; "><span> </span>}</span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; ">}</span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; "></span> </p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; font-family: Verdana; ">The AppDomain class implements a set of events that enable applications to respond when an assembly is loaded, when an application domain will be unloaded, or when an unhandled exception is thrown. <br /><br /></span><span style="font-size: 10pt; color: black; font-family: Verdana; "><strong>Advantages<br /><br /><o:p></o:p></strong></span></p><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">A single CLR operating system process can contain multiple application domains. There are advantages to having application domains within a single process.</span></p><ol><li><div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">Lower system cost - many application domains can be contained within a single system process.</span></div></li><li><div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">Each application domain can have different security access levels assigned to them, all within a single process.</span></div></li><li><div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">Code in one AppDomain cannot directly access code in another AppDomain.</span></div></li><li><div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">The application in an AppDomain can be stopped without affecting the state of another AppDomain running in the same process.</span></div></li><li><div class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: Verdana; ">An Exception in on AppDomain will not affect other AppDomains or crash the entire process that hosts the AppDomains.<o:p></o:p></span></div></li></ol><h2 style="margin-top: auto; margin-right: 0in; margin-bottom: auto; margin-left: 0in; "><span class="Apple-style-span" style="font-size: 13px;"><br /></span></h2></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-72271674545555797022009-05-01T12:27:00.001-07:002009-05-01T12:31:51.340-07:00Intermediate Language Disassembler(ILDASM)<span class="Apple-style-span" style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">You can get IL disassemble tool as ILDasm.exe in directory C:\Program Files\Microsoft.NET\FrameworkSDK\bin</span></span></span><div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family: Verdana; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">So what does this tool do?</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">The answer to this question is found in the tutorial supplied with .NET SDK as "The ILDSAM tool parses any .NET Framework EXE/DLL module and shows the information in a human-readable format. It allows user to see the pseudo assembly language for .NET". IL disassmeber tool shows not only namespace but also types including their interfaces. As its name suggests, it is an intermediate language, so it has its own specification. Users can also write programs using this intermediate language, its very similar to assembly language of the old days.</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">I will use a simple example and use ILDASM.exe</span></span></p></span><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;"><span></span></span></span></p><pre><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">//Hello World Program HelloWorld.cs using System; class HelloWorld { static void Main() { Console.WriteLine("Hello, world!"); } } </span></span></pre><span class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Complier it on command line by using csc HelloWorld.cs</span></span><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Helloworld.exe file will be generated</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Now use the command ildasm HelloWorld.exe</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">You will see a screen like this.</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;"><img src="http://www.csharphelp.com/archives/files/archive23/pic1.gif" /></span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Here you can see all of the Symbols. The table below explains what each graphic symbol means. Some of them you can find in HelloWorld's members.</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;"><img src="http://www.csharphelp.com/archives/files/archive23/pic2.gif" /></span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">The tree in this window shows that manifest information contained inside HelloWorld.exe. By double-clicking on any of the types in the tree, you can see more information about the type.</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Double-clicking the ".class public auto ansi" entry shows the following information:</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;"><img src="http://www.csharphelp.com/archives/files/archive23/pic3.gif" /></span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Users can see that the HelloWorld type is derived from the System.Object type.</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">The first method, .ctor, is a constructor. This particular type has just one constructor but other types may have several constructors each with a different signature. If you double-click on the constructor method, a new window appears showing the IL (intermediate language) contained within the method:</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;"><img src="http://www.csharphelp.com/archives/files/archive23/pic4.gif" /></span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">The Common Language Runtime is stack based. So, in order to perform any operations, the operands are first pushed onto a virtual stack and then the operator executes. The operator grabs the operands off the stack, performs the desired operation and places the result back on the stack. At any one time, this method will have no more than 8 operands pushed onto the virtual stack. We can see thby looking at the ".maxstack" attribute ( Maximum Stack size ) that appears just before the IL code. In the above code maxstack is shown as 8.</span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Lets examine the IL code :</span></span></p><p></p><pre><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">IL_0000: ldarg.0 : Load Object this pointer in stack IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: return the value loaded in stack </span></span></pre><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">If user make a double click on main: void()<br />It will look like this:</span></span><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;"><img src="http://www.csharphelp.com/archives/files/archive23/pic5.gif" /></span></span></p><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">If we will examine IL Code:</span></span></p><p></p><pre><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">IL_0000: ldstr "Hello, world!" IL_0005: call void [mscorlib]System.Console::WriteLine(class System.String) IL_000a: ret </span></span></pre><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">LDSTR: Load String.<br />First line indicates load String in stack.<br />Second Line indicates call method System.Console:: WriteLine as the fetch the value from stack put in this method and again put the result in stack.<br />Third line shows fetch the final value from stack and return it.</span></span><p><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">There are some advance option also available. The extra options are enabled by running ILDASM with the /ADV ("ADVanced") command-line switch. When /ADV is specified, ILDASM enables additional command-line switches. For the user convenience I will summarize some basic instructions here below.</span></span></p><p></p><table cellpadding="3" width="100%" border="1" cellspacing="0"><tbody><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><b><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Instruction</span></span></b></td><td class="smallblack" style="color: rgb(0, 0, 0); "><b><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Meaning</span></span></b></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">LDC</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">This instruction pushes a hard coded number on the stack.</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">LDARG and LDARGA</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Load argument and load argument address, respectively</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">LDLOC and LDLOCA</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Load local variable and load local variable address, respectively</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">LDFLD and LDSFLD</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Load Object Field and Load Static Field of a Class, respectively</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">LDELEM</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Load an element of an array</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">LDLEN</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Load the length of an array</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">STARG</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Store a value in an argument slot</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">STELEM</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Store an element of an array</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">STFLD</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Store into a field of an object</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">CEQ</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Compare equal</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">CGT</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Compare greater than</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">CLT</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Compare less than</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">BR</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Unconditional branch</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">BRFALSE and BRTRUE</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Branch on false and branch on true, respectively</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">CONV</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Data conversion</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">NEWARR</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Create a zero-based, one-dimensional array</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">NEWOBJ</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Create a new object</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">BOX</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Convert value type to object reference</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">UNBOX</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Convert boxed value type to its raw form</span></span></td></tr><tr><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">CALL and CALLVIRT</span></span></td><td class="smallblack" style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: arial;"><span class="Apple-style-span" style="font-size: small;">Call a method and call a method associated at runtime with an object, respectively</span></span></td></tr></tbody></table><br /><p></p><p></p></span></span></div><div><span class="Apple-style-span" style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;font-family:Verdana;font-size:13px;"><span class="Apple-style-span" style=" ;font-size:16px;"><span class="smallblack" style=" color: rgb(0, 0, 0); font-family:Verdana, Arial;font-size:10pt;"><p></p><p></p></span></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-27707325749566015902009-05-01T12:27:00.000-07:002009-05-01T12:29:31.325-07:00Intermediate Language Disassembler(ILDASM)<span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">You can get IL disassemble tool as ILDasm.exe in directory C:\Program Files\Microsoft.NET\FrameworkSDK\bin</span><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br /></span></div><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="font-size: 16px; "><span style="font-size:-1;"><p>So what does this tool do?</p><p>The answer to this question is found in the tutorial supplied with .NET SDK as "The ILDSAM tool parses any .NET Framework EXE/DLL module and shows the information in a human-readable format. It allows user to see the pseudo assembly language for .NET". IL disassmeber tool shows not only namespace but also types including their interfaces. As its name suggests, it is an intermediate language, so it has its own specification. Users can also write programs using this intermediate language, its very similar to assembly language of the old days.</p><p>I will use a simple example and use ILDASM.exe</p></span><p><span style="font-size:-1;"></span></p><pre>//Hello World Program HelloWorld.cs using System; class HelloWorld { static void Main() { Console.WriteLine("Hello, world!"); } } </pre><span class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Complier it on command line by using csc HelloWorld.cs<p>Helloworld.exe file will be generated</p><p>Now use the command ildasm HelloWorld.exe</p><p>You will see a screen like this.</p><p><img src="http://www.csharphelp.com/archives/files/archive23/pic1.gif" /></p><p>Here you can see all of the Symbols. The table below explains what each graphic symbol means. Some of them you can find in HelloWorld's members.</p><p><img src="http://www.csharphelp.com/archives/files/archive23/pic2.gif" /></p><p>The tree in this window shows that manifest information contained inside HelloWorld.exe. By double-clicking on any of the types in the tree, you can see more information about the type.</p><p>Double-clicking the ".class public auto ansi" entry shows the following information:</p><p><img src="http://www.csharphelp.com/archives/files/archive23/pic3.gif" /></p><p>Users can see that the HelloWorld type is derived from the System.Object type.</p><p>The first method, .ctor, is a constructor. This particular type has just one constructor but other types may have several constructors each with a different signature. If you double-click on the constructor method, a new window appears showing the IL (intermediate language) contained within the method:</p><p><img src="http://www.csharphelp.com/archives/files/archive23/pic4.gif" /></p><p>The Common Language Runtime is stack based. So, in order to perform any operations, the operands are first pushed onto a virtual stack and then the operator executes. The operator grabs the operands off the stack, performs the desired operation and places the result back on the stack. At any one time, this method will have no more than 8 operands pushed onto the virtual stack. We can see thby looking at the ".maxstack" attribute ( Maximum Stack size ) that appears just before the IL code. In the above code maxstack is shown as 8.</p><p>Lets examine the IL code :</p><p></p><pre>IL_0000: ldarg.0 : Load Object this pointer in stack IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: return the value loaded in stack </pre>If user make a double click on main: void()<br />It will look like this:<p><img src="http://www.csharphelp.com/archives/files/archive23/pic5.gif" /></p><p>If we will examine IL Code:</p><p></p><pre>IL_0000: ldstr "Hello, world!" IL_0005: call void [mscorlib]System.Console::WriteLine(class System.String) IL_000a: ret </pre>LDSTR: Load String.<br />First line indicates load String in stack.<br />Second Line indicates call method System.Console:: WriteLine as the fetch the value from stack put in this method and again put the result in stack.<br />Third line shows fetch the final value from stack and return it.<p>There are some advance option also available. The extra options are enabled by running ILDASM with the /ADV ("ADVanced") command-line switch. When /ADV is specified, ILDASM enables additional command-line switches. For the user convenience I will summarize some basic instructions here below.</p><p></p><table cellpadding="3" width="100%" border="1" cellspacing="0"><tbody><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; "><b>Instruction</b></td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; "><b>Meaning</b></td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">LDC</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">This instruction pushes a hard coded number on the stack.</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">LDARG and LDARGA</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Load argument and load argument address, respectively</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">LDLOC and LDLOCA</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Load local variable and load local variable address, respectively</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">LDFLD and LDSFLD</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Load Object Field and Load Static Field of a Class, respectively</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">LDELEM</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Load an element of an array</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">LDLEN</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Load the length of an array</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">STARG</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Store a value in an argument slot</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">STELEM</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Store an element of an array</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">STFLD</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Store into a field of an object</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">CEQ</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Compare equal</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">CGT</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Compare greater than</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">CLT</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Compare less than</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">BR</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Unconditional branch</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">BRFALSE and BRTRUE</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Branch on false and branch on true, respectively</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">CONV</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Data conversion</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">NEWARR</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Create a zero-based, one-dimensional array</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">NEWOBJ</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Create a new object</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">BOX</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Convert value type to object reference</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">UNBOX</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Convert boxed value type to its raw form</td></tr><tr><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">CALL and CALLVIRT</td><td class="smallblack" style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Verdana, Arial; ">Call a method and call a method associated at runtime with an object, respectively</td></tr></tbody></table><br /><p></p><p></p></span></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8167341973312630746.post-88979412252157992422009-04-24T11:12:00.000-07:002009-04-24T11:24:45.538-07:00ASP.NET Page Life Cycle<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZZ-zYoIy4pxRMs_YSB8uxsNK1Wa8AGVcRPPvwqOuOej_Fz-CiNQmsUL30SvuDr9eSO_d1tQ9-EEYYSCTlt7QPEBoob6a5dz0ZW3LWKDsbP4WHrVzqN13Am07QKtIasGEQHJXGJTBPL_Z/s1600-h/Page-Life-Cycle-Submit.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 292px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZZ-zYoIy4pxRMs_YSB8uxsNK1Wa8AGVcRPPvwqOuOej_Fz-CiNQmsUL30SvuDr9eSO_d1tQ9-EEYYSCTlt7QPEBoob6a5dz0ZW3LWKDsbP4WHrVzqN13Am07QKtIasGEQHJXGJTBPL_Z/s320/Page-Life-Cycle-Submit.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5328324835239679490" /></a><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirmVX-s0Jw6U8r_316lCg4oSJsTvVMcS0fM7BsT2oNUSrCpPgIR_L2deuM35fY-ZHj9CHv4CRxLbGfsX9Hpw4TBqsjM7xLJBnMRQ349El_dWa52XN9rn5zpDCQpEz3xAH4milQeWCiyA5j/s1600-h/Page-Life-Cycle-New.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirmVX-s0Jw6U8r_316lCg4oSJsTvVMcS0fM7BsT2oNUSrCpPgIR_L2deuM35fY-ZHj9CHv4CRxLbGfsX9Hpw4TBqsjM7xLJBnMRQ349El_dWa52XN9rn5zpDCQpEz3xAH4milQeWCiyA5j/s320/Page-Life-Cycle-New.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5328324830593777106" /></a><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span><span class="Apple-style-span" style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">A page in an ASP.NET application consists of several server controls. These are the fundamental building blocks of an ASP.NET application. The Life cycle of an ASP.NET page, depends on whether the page is requested for the </span></span><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">first time or it is a postback</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">. Postback is a process by which a page can request for itself.</span></span></span><div><span class="Apple-style-span" style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span></span></div><div><span class="Apple-style-span" style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="color: rgb(0, 102, 204); font-weight: bold; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">When the Page is requested for the first time</span></span></span></span></div><div><span class="Apple-style-span" style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="color: rgb(0, 102, 204); font-weight: bold;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-weight: normal; "><p class="ArticleText" size="13px" style="text-align: left; word-wrap: break-word; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">The Life Cycle of a page when requested for the first time:</span></span></p><p class="ArticleText" size="13px" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Initializing: </span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">During this phase, the server creates an instance of the server control</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Loading</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">: During this phase, the instance of the control is loaded onto the page object in which it is defined.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">PreRendering:</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"> During this phase, the control is updated with the changes made to it. This prepares the control for rendering.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Saving:</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"> During this phase, the state information of the control is saved. For example, if a value is set for the control during the Load event, it is embedded in the HTML tag that will be returned to the browser.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Rendering:</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"> During this phase, the server creates the corresponding HTML tag for the control.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Disposing: </span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">During this phase, all cleanup tasks, such as closing files and database connections opened by the control are performed.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Unloading</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">: During this phase, all cleanup tasks, such as destroying the instances of server control are performed. This is the final event in the life cycle of a server control</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span class="Apple-style-span" style="color: rgb(0, 102, 204); font-weight: bold; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Life cycle when the page processed during a postback event</span></span></span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span class="Apple-style-span" style="color: rgb(0, 102, 204); font-weight: bold;"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-weight: normal; "></span></span></span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">The processing sequence in which a page is processed during a postback event is:</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Initializing: </span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">During this phase, the server creates an instance of the server control</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Loading view state:</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"> During this phase, the view state of the control posted by the client is reloaded into the new instance of the control.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Loading</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">: During this phase, the instance of the control is loaded onto the page object in which it is defined.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Loading the postback data</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">: During this phase, the server searches any data corresponding to the control that is loaded in the data posted by the client.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">PreRendering:</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"> During this phase, the control is updated with the changes made to it. This prepares the control for rendering.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Saving state:</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"> During this phase, the change in the state of control between the current request and the previous request of the page is saved. For each change, the corresponding event is raised. For example, if the text of a textbox is changed, the new text is saved and a text_change event is raised.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Rendering:</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"> During this phase, the server creates the corresponding HTML tag for the control.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Disposing: </span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">During this phase, all cleanup tasks, such as closing files and database connections opened by the control are performed.</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><i><b><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Unloading</span></span></b></i><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">: During this phase, all cleanup tasks, such as destroying the instances of server control are performed. This is the final event in the life cycle of a server control</span></span></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">The events associated with the relevant page cycle phases are:</span></span></p><ul type="square"><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Page Initialization: Page_Init</span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">View State Loading:LoadViewState</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Postback data processing: LoadPostData</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Page Loading: Page_Load</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">PostBack Change Notification: RaisePostDataChangedEvent</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">PostBack Event Handling: RaisePostBackEvent</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Page Pre Rendering Phase: Page_PreRender</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">View State Saving: SaveViewState</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Page Rendering: Page_Render</span></span></span></p></li><li><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">Page Unloading: Page_UnLoad</span></span></span></p></li></ul></span></span><p></p><p class="ArticleText" style="text-align: left; word-wrap: break-word; "><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;">The above figure tell how the server controls on an ASP.NET page is processed by the server:<br /></span></span></p></span><div><span class="Apple-style-span" style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;font-family:Verdana;font-size:13px;"><br /></span></div></div>Unknownnoreply@blogger.com2