Techmentor

Techmentor
Techmentor

Monday, August 14, 2006

Enter the Dragon - Part I

It was 6th August afternoon (Sunday) i reached Chennai with two bags having my dresses and certificates(though not needed) and i went to my sisters house. After that i came to my uncles house and had a nice sleep.

Sun (not sun microsystem rather the natural sun) is so happy in chennai that it wishes everyone with great delight and i woke up in the morning with zeal enthusiasm and had my bath and lighted the lamp before god and prayed to him.

After that i just started with my uncle in his motor bike and i was just eagerly waiting to see the building where am about to start the new assignment and which i was thinking like a turning point in my life...

I saw the building and was eagerly waiting to enter the dragon i mean my new so called fortune 12 company VERIZON.

END of PART I
To be contd....

Sunday, August 13, 2006

New Assignment..

On 7th August 2006, Monday I have joined Verizon in Chennai. Hope my career has a new shift..

Friends you can always reach me at the following contact

Email: comshiva@gmail.com
Mobile: +91 98844 77705

I will be meeting new people and new environment and more than anything am gonna get new friends...... This gonna be a breakthrough and hope to have a thrill of working in a fortune 12 company.

Either it may be a wish or a comment or just pulling legs or even criticism kindly do leave it to me dear pal's .......

loving Regards,
Shiva.

Thursday, June 08, 2006

After a Long Time....

Hi all,
Its been a long since i blogged and there are two news to share.

Firstly I got my MCP for the very first time in developing web app with c#

Secondly i got my BCIP-web Developer (Brainbench Certified Internet Professional) too

These certifications provide me a greater insight to the technologies and also provide me a hope to move further. I also got invitation to be an volunteer for INETA from Mr. Vinod Kumar (MVP) who works in Intel india who has been involved in writing articles to leading magazines like MSDN. He inspired me a lot by the way he answered in a Microsoft Site http://mvp.support.microsoft.com/mvpInsider_2005-08

Thanks vinod for your encouragement. I hope to be an active volunteer and also hope to post articles on websites and in my user group too.

more to blog....

Wednesday, April 12, 2006

Diving into "mini" Technology

Today i got started to Research new kind of development of our product for Mobile Devices and PDA's. I would like to blog more on thse in the coming days. Moreover Am new to this Mobile development.

Today i was eagerly waiting to see my output in my GPRS enable mobile but i couldnt enter into it as network was dead slow. Anyway hope to see smiles on everyones face after giving a demo of the same.

More to come ....

Saturday, February 25, 2006

Calling .NET ians - Come join and serve

Dear Friends,
I have created a new .NET User Group in MSN to share the wealth of knowledge with others and especially to create a community service for people who are in coimbatore and are into Microsoft .NET development.

Come join, Lets serve the mankind and bridge the digital divide.

Coimbatore .NET Users Group
---------------------------
http://groups.msn.com/cdotnet


After all, Its your group

Saturday, February 18, 2006

Connection Pooling - Huh!

I got really frustrated after i got complaints continously about Connection pooling timeout expired problem in our web application. After some googling i found few solution for the problem.

Design Properly
-------------------
The first and foremost thing in any kind of software development is to design it properly as it reduces lot of problems. Before using any new technology its always best to know what it is and what are the pros and cons and how to use it EFFECTIVELY.

Whenever you are using Data Access Layer the first thing to do is to know about the Architectural design which clearly defines how to use them effectively in our software development.

Connection Pooling - what it is?
--------------------------------
When a connection is opened, a connection pool is created based on an exact matching algorithm that associates the pool with the connection string in the connection. Each connection pool is associated with a distinct connection string. When a new connection is opened, if the connection string is not an exact match to an existing pool, a new pool is created.

Controlling Connection Pooling with Connection String Keywords
--------------------------------------------------------------
We can control the connection pooling using the connection string keywords.

------------------------------------------------------------------------------------
Cnnection Lifetime - This specifies the life time of connection string [default=0]
Connection Reset - Determines whether the database connection is reset when being removed from the pool [default:true]
Enlist - When true, the pooler automatically enlists the connection in the current transaction context of the creation thread if a transaction context exists [default: true]
Max Pool Size - The maximum number of connections allowed in the pool [default:100]
Min Pool Size - The minimum number of connections maintained in the pool [default: 0]
Pooling - When true, the connection is drawn from the appropriate pool, or if necessary, created and added to the appropriate pool. [default:true]
------------------------------------------------------------------------------------

Connection Leak? - How can i find?
----------------------------------
It was very hard to figure out if you were leaking connections in v1.0 and v1.1. Now microsoft have added new performance counters. With ADO.NET 2.0 if you see the NumberOfReclaimedConnections performance counter go up you know that your application is leaking connections.

The following table lists the connection pooling counters that can be accessed in Performance Monitor under the ".NET CLR Data" performance object.

-------------------------------------------------------------------------------------
Counter | Description
-------------------------------------------------------------------------------------
SqlClient: Current # of pooled and non pooled connections | Current number of connections, pooled or not.
SqlClient: Current # pooled connections | Current number of connections in all pools associated with the process.
SqlClient: Current # connection pools | Current number of pools associated with the process.
SqlClient: Peak # pooled connections | The highest number of connections in all pools since the process started. Note: this counter is only available when associated with a specific process instance. The _Global instance will always return 0.
SqlClient: Total # failed connects | The total number of connection open attempts that have failed for any reason.
-------------------------------------------------------------------------------------


How to fix the leak?
--------------------
You need to guarantee that the connection close _OR_ dispose gets called. The easiest way is with the “using” construct


public void DoesNotLeakConnections()

{

Using (SqlConnection sqlconnection1 = new SqlConnection("Server=.\\SQLEXPRESS ;Integrated security=sspi;connection timeout=5")) {

sqlconnection1.Open();

SqlCommand sqlcommand1 = sqlconnection1.CreateCommand();

sqlcommand1.CommandText = "raiserror ('This is a fake exception', 17,1)";

sqlcommand1.ExecuteNonQuery(); //this throws a SqlException every time it is called.

sqlconnection1.Close(); //Still never gets called.

} // Here sqlconnection1.Dispose is _guaranteed_

}


How "using" construct works?
----------------------------
The Using construct is equivalent to a Try/…/Finally{ .Dispose() ). Even when ExecuteNonQuery tries to throw out of the execution scope we guarantee that the code in the Finally block will get called


Some DONT'S in connection string
--------------------------------
a) Do not do Pooling = False.
b) Do not do Connection Lifetime = 1;
c) Do not do Connection Timeout = 40000;
d) Do not do Max Pool Size = 40000;



Hope this gives some information about connection pooling.

HAVE A NICE DAY.

Wednesday, January 18, 2006

.NET Internals ...

.NET Framework:
The .NET framework allows objects, classes, and functions created in multiple programming languages the ability to communicate effectively amongst themselves. During code compilation within the .NET framework, source code is converted into MSIL (Microsoft Intermediate Language). MSIL, or IL, is the common language created that the CLR (Common Language Runtime) can read and understand. Once .NET code is compiled into the intermediate language (MSIL, IL), objects written in Visual Basic .NET may reference or inherit functionality from objects written in Visual C# .NET, managed Visual C++, or any other .NET language.

For each source code compiler (VB.NET, C#.NET, etc.), there is a minimum set of coding standards that must be met. The mininum set of coding standards that must be met to compile .NET code into MSIL code is known as CLS - Common Language Specification. The role of the Common Language Specification is to ensure that all generated code (MSIL) that meets the minimum set of coding standards can operate successfully within the .NET framework. THE CTS (Common Type System) handles conversion of programming-language data types into .NET compatible (MSIL) data types. The implicit benefit of the CTS is the reduction of development time when attempting to coordinate data types between two sets of different programming-language code.

Assembly and Assembly Manifest
The assembly is made up of code, metadata, and resources. The assembly manifest is a provider of information about the assembly. The information provided by the assembly manifest includes: assembly name, version number, identity information, types exposed by the assembly, list of other required assemblies, and a list of access security instructions and permissions regarding the assembly. The assembly manifest can be contained in its own file or within one of the assembly's modules. Each module can contain any number of combinations of two types: reference types (classes) and value types (structures). Type information is stored in the assembly manifest. Types can contain fields, properties and methods. A field represents storage of a particular type of data. A phone number can be stored to a field. Properties are very similiar to fields, but usually provide validation when data is set or retrieved. When an attempt to add or update a telephone number is made, validation to verify the telephone number has the proper number of characters may occur. Methods represent behavior. Continuing with the telephone example, you might have a Call method that communicates with a telephone and passes the telephone number as a parameter.

Compilation and Execution
A .NET application is not compiled to binary. As previously discussed, the .NET application code is compiled to MSIL. At least one of the MSIL assemblies will contain an executable that is designated as the application entry point. When execution begins, the first assembly is loaded and the CLR examines the assembly manifest and determines the program requirements. After a successful security permission check, the CLR will execute the code. During this period, a process for the application is created and application execution begins. When execution starts, the first bit of code that needs to be executed is loaded into memory and compiled into native binary code from IL by the CLR's Just-in-Time (JIT) compiler. Once compiled, the code is executed and stored in memory as native code. When program execution begins executing code that has not run, the JIT compiler compiles it ahead of execution and stores it in memory as binary code. Application performance is maximized because parts of a program that are executed are compiled.

Friday, January 13, 2006

Dynamic Frames using javascript....

For the past two days i was having a problem for a component to dynamically load the page in the specified frame and if the frame is not specified it has to be loaded in the default frame.

One of my friend and colleague Ramesh said, he will try for me as i was not an expert in javascript.

Today morning also i was a bit disappointed as it could be merely a single line answer but it breaked my head like anything.

At last i roled out my sleeves and thought of exploring myself very patiently and i got a real self confidence after reading an article in the internet about achievement. Atlast i found the answer today and it was really simple.

Solution
---------
The document object has frames collection which cane be used to point out the required frame


document.frames[].location.href = URL

here the frameName can be passed as both Name and index.
Name refers to the name of the target frame
index referes to the index in the specified order of the frameset.

so i just passed the required frame which i have stored in the database which is another BIG story!

Thats all folks!

Thank you ramesh for you try!


shiva

Sunday, January 01, 2006

Happy Dazzling New Year 2006!


Dear Bloggers,


WISH YOU ALL A VERY HAPPY AND PROSPEROUS NEW YEAR 2006!


love,
shiva