Friday, August 26, 2011

Server-Side State Management

Server-Side OptionProsCons
Application StateFast. Shared among all users.State is stored once per server in multiple server configurations.
Cache Object
(Application Scope)
Like the Application includes expiration via Depencies.State is stored once per server in multiple server configurations.
Session StateThree choices in process, out of process, DB-backed. Can be configured as cookieless.Can be abused. You pay a serialization cost when objects leave the process. In process requires Web server affinity. Cookies configuration makes it easier to hijack.
DatabaseState can be accessed by any server in a Web farm.Pay a serialization and persistence cost when objects leave the process. Requires SQL Server license.

Monday, August 22, 2011

How Does ASP.NET Work?

  • When a browser requests an HTML file, the server returns the file.
  • When a browser requests an ASP.NET file. IIS passes the request to the ASP.NET engine on the server.
  • The ASP.NET engine reads the file, line by line, and executes the scripts in the file.
  • Finally, the ASP.NET file is returned to the browser as plain HTML.

Wednesday, August 17, 2011

Requirements

Requirements describe in detail what needs to be tested in your application and provide the test team with the foundation on which the entire test process is based.

You define Requirements by building Requirements Tree. This is a graphical representation of your requirement specification, defining your requirements hierarchically.

Requirement Specification Module helps in:
1. Grouping and sorting requirement in a tree
2. monitoring the task allocation
3. monitoring the progress in meeting requirements
4. generating detailed graphs and reports.

Major tasks under Requirement Specification Module are
1. Defining Requirements
2. Viewing Requirements
3. Modifying Requirements
4. Converting Requirements

To define requirements, you need to follow the following steps
1. Open the project
2. Click on requirements button on the side bar

Steps to Create a New Requirement
1. Select the root requirement and click on "New Requirement" button
2. Enter the Name of the Requirement and Select the Requirement Type and click on "OK"
3. Add details to the Requirement and click on Submit

Adding a child Requirement
1. In the requirements tree, select the requirement
2. Click the New Requirement button
3. In Create New Requirement box, enter the requirement name and select the requirement type

Business Component

You can define testing process by specifying releases in Releases Module. A release represents one or more applications that will be available for distribution at the same time. Each release can contain a number of cycles. A cycle represents a development or QA cycle based on the project timeline. Release and cycles have defined start and end date.

To define the releases and cycles, follow the below steps.

Steps to define Release
1. Open the Project
2. Click on "Releases" button on the side bar.
3. In releases tree, select the Root releases folder. Click the New Release folder button.
Enter the name of the release folder and click on OK.
4. Select the folder that is created and click on "New Release" button
5. In the "Release Name" box, enter the name of the release and click on "Ok"

Steps to define new cycle
1. Select the Release
2. Click the New Cycle button
3. In the "Cycle Name" box, enter the name of the cycle and click on "OK"

Progress Graph for the Release
In the release tree, select the release located in the release folder. In the right pane, click on progress tab. In the progress tab displays the progress of the release based on the requirement coverage, elapsed and remaining time, actual and remaining test instances to run.

Quality Graph for the Release
In the release tree, select the release located in the release folder. In the right pane, click on Quality tab.

Defects Opening Graph for the Release
This graph summarizes the number of defects detected in the selected release

Outstanding Defect Graph for the Release
This graph summarizes the number of outstanding defects for the selected release

Program Graph and Quality Graph for the Cycle
In the release tree, select the cycle located in the release. In the right pane, click on Progress tab.

Requirements

Requirements describe in detail what needs to be tested in your application and provide the test team with the foundation on which the entire test process is based.

You define Requirements by building Requirements Tree. This is a graphical representation of your requirement specification, defining your requirements hierarchically.

Requirement Specification Module helps in:
1. Grouping and sorting requirement in a tree
2. monitoring the task allocation
3. monitoring the progress in meeting requirements
4. generating detailed graphs and reports.

Major tasks under Requirement Specification Module are
1. Defining Requirements
2. Viewing Requirements
3. Modifying Requirements
4. Converting Requirements

To define requirements, you need to follow the following steps
1. Open the project
2. Click on requirements button on the side bar

Create a New Requirement
1. Select the root requirement and click on "New Requirement" button
2. In the Requirement dialog box, select the "Requirement Type" and "Enter the Requirement Name" and click on "OK"
3. Add details to the Requirement and Click on Submit

Adding a Child Requirement
1. Select the Requirement, where you want to add the child requirement
2. Click on "New Requirement" button
3. In the Requirement dialog box, select the "Requirement Type" and "Enter the Requirement Name" and click on "OK"
4. Add details to the Requirement and Click on Submit

Deleting a Requirement
1. Select the Requirement in the Requirement Tree
2. Click the "Delete" button
3. Click "Yes" to Confirm


Quality Center - Test Plan

After you define the requirements, you need to determine the testing goals. To do this, we need to examine the application, system environment and testing process, to outline the testing strategy for achieving the gols.

Testing goals are build into a Test Plan tree, which hierarchically divides your application into testing units, or subjects. Each test unit will consists of test steps.

For each test step, you specify the actions to be performed on the application and the expected result.

To keep track of the relationship between your tests and your requirements, you can add links between them.

After you design your tests, you can decide which tests to automate. When you automate a test, you can generate a test script and then complete it using other HP testing tools. (QTP or WinRunner)


This module is used for designing the Test Cases and to store the Test Scripts.

Test Cases can be mapped with requirements, which are created. Each Requirement can be mapped with one or more test Case.

Quality Center - Test Lab

This module is used for executing the Test Cases and Track the Results.


1. Building the Test Set
2. Execute the Test Set
3. Analyse the Results


Defects:
This module acts like a Bug Tracking Tool. It helps in Managing the Defects like, adding a defect, changing the status of the defect.

Quality Center - Dashboard

This module enables you to define graphs and reports.

ReportYou can generate a report from Requirements, Test Plan, Test Lab and Defects.

Execution Report:enables project Manager to see a list of test instances and results.

Graph:To Generate the graph Choose Analysis > Graph > Group-Summary by Status

Live Analysis Graph:Provides a visual overview of all the tests within the folder in Test Plan Tree.

Summary Graph:Enables to view the child requirements data related to the tests that the requirements cover

Coverage Progress Graph:

Defect Opening Rate Graph: Summarizes the number of defects detected in the selected release.

Outstanding Defects: Summarizes the number of outstanding defects in the selected release. By default, defects with the status of New, Open and ReOpen are displayed in the Graph.

Monday, August 15, 2011

Describe about HttpContext Class?

  • The HttpContext class encapsulates HTTP. specific information about an HTTP request.
  • This includes response/request headers, server variables, session variables, user information, and so on. Of particular interest is a property called Current, which returns an interface of the HttpContext class that represents the current HTTP request.
  • Another important property in the HttpContext class is User, which contains security information about the user who made the web request. The User property returns a type the implements the IPrincipal interface.

Sunday, August 14, 2011

What are the two different levels of variables that are supported by ASP.Net

  • Page Level variable : Int, float, char, string and all other .Net data type whose scope is limited to that particular page only.
  • Object level variable : Application Level, Session Level that is used to access the data throughout the application.

Friday, August 12, 2011

Explain what is the purpose of using EnableViewState property?

  • When a page is postback, then it allows the page to save the users input on a form.
  • It also saves all the server side values as a hidden value on the page before sending that page to the clients for a particular given control in the ViewState.
  • When a page is posted back to the server, at the same time the server control is recreated within the state stored in ViewState.

10 .Net Interview Questions

Question 1
Inside which HTML element do we put the JavaScript?
Options:
a. <javascript>
b. <is>
c. <scripting>
d. <script>


Solution
The correct answer is
"D = <script>"

Question 2
Which HTML tag is used to define an internal style sheet?
Options:
a. <css>
b. <style>
c. <body>
d. <script>

Solution
The correct answer is
"B = <style>"

Question 3
How do you write "Hello World" in an alert box?
Options:
a. alert("Hello World")
b. alertbox("Hello World")
c. alert="Hello World"
d. alert Box="Hello World"

Solution
The correct answer is
"A = alert("Hello World")"

Question 4
CSS stands for?
Options:
a. Creative Style Sheets
b. Colorful Style Sheets
c. Computer Style Sheets
d. Cascading Style Sheets

Solution
The correct answer is
"D = Cascading Style Sheets"

Question 5
Which SQL statement is used to update the data in database?
Options:
a. UPDATE
b. MODIFY
c. SAVE
d. SAVE AS

Solution
The correct answer is
"A = UPDATE"

Question 6
Which SQL statement is used to extract data from the database?
Options:
a. SELECT
b. EXTRACT
c. OPEN
d. GET

Solution
The correct answer is
"A = SELECT"

Question 7
ASP stands for?
Options:
a. Active Standard Pages
b. A Server Pages
c. All Standard Pages
d. Active Server Pages

Solution
The correct answer is
"D = Active Server Pages"


Question 8
SQL stands for?
Options:
a. Structured Query Language
b. Strong Question Language
c. Structured Question Language
d. Sequence Query Language

Solution
The correct answer is
"A = Structured Query Language"

Question 9
Which SQL statement is used to insert a new row in a table?
Options:
a. ADD
b. ADD RECORD
c. INSERT INTO
d. INSERT NEW

Solution
The correct answer is
"C = INSERT INTO"

Question 10
What is the correct JavaScript syntax to write "Hello World"?
Options:
a. document.write("Hello World")
b. response.write("Hello World")
c. ("Hello World")
d. "Hello World"

Solution
The correct answer is
"A = document.write("Hello World")"

Explain the advantage of ASP.NET

Following are the advantages of ASP.NET
  • Web application exists in compiled form on the server so the execution speed is faster as compared to the interpreted scripts.
  • ASP.NET makes development simpler and easier to maintain with an event-driven, server-side programming model.
  • Being part of Framework, it has access to all the features of .Net Framework.
  • Content and program logic are separated which reduces the inconveniences of program maintenance.
  • ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in.
  • To develop program logic, a developer can choose to write their code in more than 25 .Net languages including VB.Net, C#, JScript etc.
To Be Continued..

Wednesday, August 10, 2011

What is HTML?

  • HTML stands for "Hyper Text Markup Language".
  • A markup language designed for the creation of web pages and other information viewable in a browser.
  • It is the basic language used to write web pages.
  • File extension: .htm, .html

CoolTuts - Come2Play - Games



Come2Play - Create your gaming channel

Tuesday, August 9, 2011

Managed and UnManaged Code in .Net

Managed Code -

  • Managed code is getting from .Net technologies.
  • Managed code must supply the metadata necessary for the runtime to provide service such as
  1. Memory management
  2. Cross-language integration
  3. Code access security
  4. Automatic lifetime control of objects

  • All code based on Microsoft intermediate language (MSIL) executes as managed code.
  • Safe code – Functions
  • Unsafe code -- Pointers

Un-Managed Code - Language which contains dll’s we can access that language features in the .net framework. CLR doesn’t communicate with unmanaged code.

What is ASP.NET?

  • ASP stands for Active Server Pages
  • ASP.NET is the name of the MICROSOFT technology used for web site development.
  • There are several other technologies exist for web development.
  • ASP.NET is the technology from MICROSOFT and it is widely used one.
  • ASP.NET is not ASP. ASP.NET is an entirely new technology for server side scripting. It was written from the ground up and is not backward compatible with classic ASP.
  • ASP.NET is NOT a programming language like C# or VB.NET.
  • ASP.NET development requires a programming language like C# or VB.NET to write code.
  • ASP.NET technology comes with a rich set of components and controls that make the web development very easy.
  • Visual Studio .Net is the editor from MICROSOFT which helps you develop ASP.NET sites faster
  • IIS(Internet Information Syatems) is the web server from MICROSOFT which supports ASP.NET. To develop ASP.NET web sites, you must have IIS installed in your computer.

Monday, August 8, 2011

This is without a doubt one of the coolest PC-Illusion, I have seen so far.

Follow the instructions:

  1. Relax and concentrate on the 4 small dots in the middle of the picture for about. 30-40 secs.
  2. Then, take a look at a wall near you (any smooth, single coloured surface)
  3. You will see a circle of light developing
  4. Start blinking your eyes a couple of times and you will see a figure emrging...
  5. What do you see? Moreover, who do you see?

Thursday, August 4, 2011

Difference between Web Site and Web application in ASP.NET

• Development Wise Difference


Web Site
1. We can code one page in C# and one page in vb.net (Multiple programming languages allowed).
2. We cannot call (access) public functions from one page to other page.
3. Utility classes / functions must be placed in a special ASP.NET folder (the App_Code folder)
4. Web Sites do not have a .csproj/.vbproj file that manages the project (the folder that contains the site becomes the project root).
5. In the Web Site project, each file that you exclude is renamed with an exclude
keyword in the filename.
6. Explicit namespaces are not added to pages, controls, and classes by default, but you can add them manually.


Web Application
1. Only one programming language allowed per project (Need to decide on programming language when starting project).
2. We can access public functions from one page to other page.
3. Utility classes / function can be placed anywhere in the applications folder structure.
4. Web Applications are treated like other .NET projects and are managed by a project file (.csproj or .vbproj) .
5. One nice feature of the Web Application project is it's much easier to exclude files from the project view.
6. Explicit namespaces are added to pages, controls, and classes by default.




• Deployment wise difference


Web Site
1. It has its code in a special App_Code directory and it's compiled into several DLLs (assemblies) at runtime.
2. No need to recompile the site before deployment.
3. We need to deploy both .aspx file and code behind file.
4. Small changes to the site do not require a full re-deployment. (We can upload the code file that was changed) 

Web Application
1. web application is precompiled into one single DLL.
2. Site has to be pre-compiled before deployment .
3. Deploy only .aspx page, but not associated code file (the pre-compiled dll will be uploaded) .
4. Even small changes require a full re-compile of the entire site(i.e. if the code for a single page changes the whole site must be compiled) (It requires careful planning to ensure new bugs aren't introduced to the production site when uploading bug fixes or other changes.)




sample format of .CSPROJ file in web application
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectView>ProjectFiles</ProjectView>
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <StartPageUrl>CheckboxListTest.aspx</StartPageUrl>
          <StartAction>SpecificPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <PublishCopyOption>RunFiles</PublishCopyOption>
          <PublishTargetLocation>
          </PublishTargetLocation>
          <PublishDeleteAllFiles>False</PublishDeleteAllFiles>
          <PublishCopyAppData>True</PublishCopyAppData>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
  

Written By
Suresh Ruddarraju
.Net Developer

What is CLR (Common Language Runtime)

  • The CLR is described as the "execution engine" of .Net.
  • It is basically defined as core runtime engine in the Microsoft .Net framework for executing applications.
  • It provides the runtime environment within which the programs run.
  • The software version of .Net is actually the CL

Wednesday, August 3, 2011

What is MSIL (Microsoft Intermediate Language Code)

  • When the .net program is compiled, the output of the compiler is not an executable file but a file that contains a special type of code called MSIL now called CIL.
  • The compiler translates the source code into MSIL which is a CPU-Independent set of instructions that can be effectively converted to native code.
  • Before code can be run, MSIL must be converted to CPU-specific code, by JIT compiler.

Tuesday, August 2, 2011

CoolTuts - Miscellaneous - Forwarded Email - Why LokPal?

For your education if you do not already know this ---- See how Lokpal Bill can curb the politicians , Circulate it to create awareness

EXISTING SYSTEM
No politician or senior officer ever goes to jail despite huge evidence because Anti Corruption Branch (ACB) and CBI directly come under the government. Before starting investigation or initiating prosecution in any case, they have to take permission from the same bosses, against whom the case has to be investigated.
SYSTEM PROPOSED BY CIVIL SOCIETY
Lokpal at centre and Lokayukta at state level will be independent bodies. ACB and CBI will be merged into these bodies. They will have power to initiate investigations and prosecution against any officer or politician without needing anyone’s permission. Investigation should be completed within 1 year and trial to get over in next 1 year. Within two years, the corrupt should go to jail.


EXISTING SYSTEM
No corrupt officer is dismissed from the job because Central Vigilance Commission, which is supposed to dismiss corrupt officers, is only an advisory body. Whenever it advises government to dismiss any senior corrupt officer, its advice is never implemented.
SYSTEM PROPOSED BY CIVIL SOCIETY
Lokpal and Lokayukta will have complete powers to order dismissal of a corrupt officer. CVC and all departmental vigilance will be merged into Lokpal and state vigilance will be merged into Lokayukta.

EXISTING SYSTEM
No action is taken against corrupt judges because permission is required from the Chief Justice of India to even register an FIR against corrupt judges.
SYSTEM PROPOSED BY CIVIL SOCIETY
Lokpal & Lokayukta shall have powers to investigate and prosecute any judge without needing anyone’s permission.

EXISTING SYSTEM
Nowhere to go - People expose corruption but no action is taken on their complaints.
SYSTEM PROPOSED BY CIVIL SOCIETY
Lokpal & Lokayukta will have to enquire into and hear every complaint.

EXISTING SYSTEM
There is so much corruption within CBI and vigilance departments. Their functioning is so secret that it encourages corruption within these agencies.
SYSTEM PROPOSED BY CIVIL SOCIETY
All investigations in Lokpal & Lokayukta shall be transparent. After completion of investigation, all case records shall be open to public. Complaint against any staff of Lokpal & Lokayukta shall be enquired and punishment announced within two months.

EXISTING SYSTEM
Weak and corrupt people are appointed as heads of anti-corruption agencies.
SYSTEM PROPOSED BY CIVIL SOCIETY
Politicians will have absolutely no say in selections of Chairperson and members of Lokpal & Lokayukta. Selections will take place through a transparent and public participatory process.

EXISTING SYSTEM
Citizens face harassment in government offices. Sometimes they are forced to pay bribes. One can only complaint to senior officers. No action is taken on complaints because senior officers also get their cut.
SYSTEM PROPOSED BY CIVIL SOCIETY
Lokpal & Lokayukta will get public grievances resolved in time bound manner, impose a penalty of Rs 250 per day of delay to be deducted from the salary of guilty officer and award that amount as compensation to the aggrieved citizen.

EXISTING SYSTEM
Nothing in law to recover ill gotten wealth. A corrupt person can come out of jail and enjoy that money.
SYSTEM PROPOSED BY CIVIL SOCIETY
Loss caused to the government due to corruption will be recovered from all accused.

EXISTING SYSTEM
Small punishment for corruption- Punishment for corruption is minimum 6 months and maximum 7 years.
SYSTEM PROPOSED BY CIVIL SOCIETY
Enhanced punishment - The punishment would be minimum 5 years and maximum of life imprisonment.

Spread it likefire;
our Nation needs us..please Contribute..
This is not justa forward, it’s the future of our Nation

CoolTuts - Miscellaneous - Top Search Engine Market Share in July 2011

Looks Google shared 1 percent of there market share to remaining search Engines in July 2011. When you compare with previous month version its vise versa.

Its Good Competitive World.

Monday, August 1, 2011

CoolTuts - Interview Questions - Home

  • Abstract Classes
  • Access Specifiers
  • ASP.NET 2.0 Interview Questions
  • Assembly and Namespaces
  • Authentication in .Net
  • Authorization in .Net
  • Boxing vs Unboxing
  • Const vs Read-only
  • Const vs Read-only
  • Constants in .Net
  • Constructors
  • Constructors of Extended Classes
  • Cursor point to TextBox
  • Data Abstraction
  • Data Encapsulation
  • Destructors
  • Example on Encapsulation
  • Fields in .Net
  • Focus method
  • Function Overloading
  • Garbage Collections
  • Gridview with Paging
  • Indexers in .Net
  • Inheritance and Extended Classes
  • Inheritance in .Net
  • Inheritance n Extended Classes
  • Members of a Class
  • Methods and Events
  • Namespace used in EventLog
  • Object
  • Overriding and Hiding
  • Page Life Cycle
  • Properties in .Net
  • Ref vs Out parameter
  • Server.transfer vs Response.redirect
  • Signatures of Main[] fn
  • State Management
  • String vs String Builder
  • Types of parameters
  • Using Keyword
  • Value type vs Ref type
  • Versioning in .Net
  • What are Class Methods
  • What are Classes
  • What are Constructors
  • What are Delegates
  • What are Objects
  • What is View State
  • When to OverLoad

CoolTuts - C#.Net - Singleton Design Pattern

Definition:
Ensure a class has only one instance and provide a global point of access to it.

Objectives:
  1. Hide the default constuctor so that the class cannot be instantiated from outside of the class.
  2. Create a custom constructor which returns the single instance of the object, once it is instantiated.
  3. Add a shared variable referencing the the single instantiated instance of the class.
class Program
{
static void Main(string[] args)
{
Singleton a = Singleton.Instance();

//Add a shared variable referencing the the
//single instantiated instance of the class.
a.FullName = "Emmaneale Mendu";

Singleton b = Singleton.Instance();
Console.WriteLine("My FullName is {0}",b.FullName);

Singleton c = Singleton.Instance();
Console.WriteLine("My FullName is {0}", c.FullName);

if (b == c)
Console.WriteLine("Two Instances are same");

Console.ReadKey();
}
}

public class Singleton
{
private static Singleton self;
private string name;

//Hide the default constuctor so that the class
//cannot be instantiated from outside of the class.
private Singleton() { }

//Create a custom constructor which returns the single
//instance of the object, once it is instantiated.
public static Singleton Instance()
{
if (self == null)
self = new Singleton();
return self;
}

public string FullName
{
get { return name; }
set { name = value; }
}
}

Hence I conclude that only one instance is created and only when the instance is needed.