tag:blogger.com,1999:blog-73922992024-02-28T07:46:43.924-05:00my thoughts...Unknownnoreply@blogger.comBlogger12125tag:blogger.com,1999:blog-7392299.post-7563244653071465942011-07-19T07:25:00.024-04:002011-07-22T15:32:56.056-04:00Test Webcast - Pilot<b>Test Webcast - Pilot</b><br><br /><script type='text/javascript'> fid='5320426E31D72141109E';ftype='stream'; width='450'; height='350'</script><script type='text/javascript' src='http://www.freedocast.com/player/freedocast_Customembed.js'></script><br /><br /><script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="world001-gray.swf";obj.TimeZone="GMT0530";obj.width=480;obj.height=250;obj.wmode="transparent";showClock(obj);</script><br /><br /><script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="9001e-blue.swf";obj.TimeZone="GMT0530";obj.width=288;obj.height=18;obj.Target="2011,8,30,6,0,0";obj.Title="Test%20Countdown";obj.Message="Message1";obj.wmode="transparent";showClock(obj);</script><br /><br /><script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="free001-red.swf";obj.TimeZone="GMT0530";obj.width=150;obj.height=150;obj.wmode="transparent";showClock(obj);</script>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-56875829762516599732007-09-28T02:43:00.000-04:002007-09-28T02:54:53.020-04:00The rising Rupee - Time for IT cos to change tack<span style="font-family:verdana;font-size:78%;">The rising rupee has caused much anguish for the export oriented industries, especially the IT sector. But this also presents a golden opportunity for Indian industry to look beyond the labour cost advantage and create genuine value for its customers by moving up the value chain, despite the short-term hiccups, says SUDHAKAR RAM</span><br /><span style="font-family:verdana;font-size:78%;"></span><br /><span style="font-family:verdana;font-size:78%;">Over the last few months, there has been much discussion about the negative impact of the rising rupee on the profitability and competitiveness of Indian exports in general, and IT companies in particular. </span><br /><br /><span style="font-family:verdana;font-size:78%;">There has been a demand from certain quarters for RBI intervention to keep the rupee down. In my view, this demand is short-sighted and does not take into account the enormous opportunity that the rising rupee could present to export-oriented industri es.<br />Before launching into a discussion on the opportunities, I think some basic premises need to be stated. Firstly, as Indians, we should be proud — the strength of the rupee is an indication of the underlying strength of the economy. </span><br /><br /><span style="font-family:verdana;font-size:78%;">Secondly, in today’s global economy, any attempt to tamper with the currency market mechanism is likely to lead to disastrous consequences as many countries have realised (and some countries will in the years to come). In the medium to long term, with global market mechanisms in operation, a rising rupee should lead to decreased costs and, hence, have a marginal impact on our global competitiveness. </span><br /><br /><span style="font-family:verdana;font-size:78%;">The rising rupee, however, does throw up challenges in the short term, and therein lie our opportunities. I will present these opportunities from the perspective of the IT industry so that a parallel can be drawn for other industries. First of all, the rising rupee will force the IT industry to look beyond labour cost arbitrage to create value for its customers – what I call the Third Wave approach; and,<br /></span><br /><span style="font-family:verdana;font-size:78%;">Second, it will make the sector refocus on driving new efficiencies and improving productivity to remain competitive. </span><br /><span style="font-family:verdana;font-size:78%;"></span><br /><strong><span style="font-family:verdana;font-size:78%;">The Third Wave: Beyond Labour Cost Arbitrage<br /></span></strong><br /><span style="font-family:verdana;font-size:78%;">When we look at globalisation, specific industries in emerging economies typically go through three waves of evolution. The electronics industry, first in Japan, then in South-East Asia and now in China, is a good example of this. In the first wave, companies in emerging economies typically act as component suppliers to developed countries that manufacture the complete product. </span><br /><br /><span style="font-family:verdana;font-size:78%;">In the second wave, the local industry gains enough expertise to provide cost-effective contract manufacturing services — of either the entire product or major sub-assemblies. </span><br /><br /><span style="font-family:verdana;font-size:78%;">The third wave is when a set of firms start marketing these products under their own brand — initially within their own countries, and then for the international market.</span><br /><span style="font-family:verdana;font-size:78%;"></span><br /><span style="font-family:verdana;"><span style="font-size:78%;"><strong>The Indian software story</strong><br /></span></span><br /><span style="font-family:verdana;font-size:78%;">We can trace the evolution of the software services industry in India using a very similar paradigm. The software industry has gone through two waves already – as a component supplier and as a contract manufacturer.<br /></span><br /><span style="font-family:verdana;font-size:78%;">Wave 1, which started in the 1970s and 1980s and peaked in the mid-90s, established that the Indian software professional was competent and the industry got results largely through staff augmentation.<br /></span><br /><span style="font-family:verdana;font-size:78%;">Wave 2 established India as a destination for low-cost, high-quality programming services. The catalyst was the Y2K bug and Indian companies’ success in delivering these projects in a cost-effective manner. Many Fortune 1000 c ompanies discovered that moving their application maintenance and on-going development activities to India was viable and attractive.<br /></span><br /><span style="font-family:verdana;font-size:78%;">The Second Wave started in the mid to the late 1990s, and is at its mainstream phase today. Like all mainstream markets, this is characterised by the emergence of a few leaders, namely Tier 1 IT companies, which have posted high rates of growth and profitability and increasing market share.<br /></span><br /><span style="font-family:verdana;font-size:78%;">Wave 3, which is emerging, will be characterised by Indian companies moving up to high-value services that are strategic to the customer and hence command premium, value-based pricing.<br />As we have seen, the industry is already facing a severe shortage of talent (as opposed to mere numbers), rising attrition levels and increasing salary costs.<br /></span><br /><span style="font-family:verdana;font-size:78%;">There are enough indications to suggest that the linear relationship between growth and headcount will not be sustainable for much longer.<br /></span><br /><span style="font-family:verdana;font-size:78%;">The future is in creating strong brands out of India – whether in services, products or solutions – that command the respect and trust of large global customers and hence the appropriate value. In my view, the Third Wave is not just about better margins.<br /></span><br /><span style="font-family:verdana;font-size:78%;">It’s also about true global scale. It’s about the industry achieving new heights – growing from $20 billion currently to over $100 billion in the next decade. It’s also about moving up in value from an ‘order-taker’ to a true strategic partner.<br /></span><br /><span style="font-family:verdana;font-size:78%;">In many ways, the appreciation of the rupee has shaken up people and possibly accelerated the Third Wave in the IT sector. I see the possibility of a similar phenomenon occurring in many other export-oriented industries, given the right vision and leadership.</span><br /><span style="font-family:verdana;font-size:78%;"></span><br /><strong><span style="font-family:verdana;font-size:78%;">New efficiencies, increased productivity<br /></span></strong><br /><span style="font-family:verdana;font-size:78%;">Another opportunity that the rising rupee has given the IT industry is the necessary impetus to take a fresh look at cost structures, productivity and financial metrics. At the entry level, the IT industry has created a fair amount of pressure for the other industries in terms of salary levels.<br />This has cascaded to all levels. The rupee pressure will force all of us to reassess salary levels and maintain them at realistic levels. We are already seeing signs of this in the salary increases granted this year.<br /></span><br /><span style="font-family:verdana;font-size:78%;">In terms of productivity, a large proportion of work carried out in India tends to be on a Time & Material (T&M) basis. In general, there are few incentives in T&M contracts to raise productivity.<br /></span><br /><span style="font-family:verdana;font-size:78%;">With rising costs and shrinking margins, I see the possibility of at least some of these contracts being renegotiated as fixed-price contracts, around work packages.<br /></span><br /><span style="font-family:verdana;font-size:78%;">This gives an incentive to the service providers to improve productivity and margins. I also believe this will help in developing the competence of software professionals.Financial metrics<br />As regards financial metrics, the IT industry has so far focused on Returns on Sales as the basic metric. Given the shortage of talent and the high proportion of salaries in total costs, the industry has already started measuring Return on Talent through metrics like EBIDTA per employee, PAT per employee etc.<br /></span><br /><span style="font-family:verdana;font-size:78%;">This will help us generate the best value for the talent we have, rather than selling them by the hour!<br /></span><br /><span style="font-family:verdana;font-size:78%;">In summary, while the rising rupee does create problems in the short term, rising to the challenge and generating value-based strategies will not only be beneficial to individual firms but to the industry as a whole.<br /></span><br /><span style="font-family:verdana;font-size:78%;">As with liberalisation, I am sure we will look back 10 years from now and see this as a landmark event that changed the basic complexion of Indian industry.(The author is Chairman and Managing Director, Mastek.) </span><br /><span style="font-family:Verdana;font-size:78%;"></span><br /><span style="font-family:Verdana;font-size:78%;">Courtesy: The Hindu BusinessLine Dated:11-09-2007</span><br /><a href="http://www.blonnet.com/2007/09/11/stories/2007091150340800.htm">http://www.blonnet.com/2007/09/11/stories/2007091150340800.htm</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1163317807772064772006-11-12T02:29:00.000-05:002006-11-12T02:58:16.246-05:00Street Children<em><strong><span style="font-family:arial;font-size:85%;">SPANDANA - Come lets make a difference to the lives of Street Children</span></strong></em><br /><strong><em><span style="font-family:arial;font-size:85%;"></span></em></strong><br /><span style="font-family:arial;font-size:85%;">This is a small effort to make difference to lives of street children who live on the edge of this society - abandoned by parents/relatives, abused, traumatised who are trying to accept reality of life.</span><br /><span style="font-family:arial;font-size:85%;"></span><br /><span style="font-family:arial;font-size:85%;">Facts about street children</span><br /><ul><li><span style="font-family:arial;font-size:85%;">There are more than 100 million street and working children in India.</span></li><li><span style="font-family:arial;font-size:85%;">They are eking out a grim existence in India's towns and cities.</span></li><li><span style="font-family:arial;font-size:85%;">Children as young as six have to resort to car washing, begging, carrying luggage, fetching tea or working in small industries to support themselves ... and sometimes their families.</span></li><li><span style="font-family:arial;font-size:85%;">More than 20% of India’s Gross National Product is produced by children. </span></li><li><span style="font-family:arial;font-size:85%;">Girls as young as eight are forced into prostitution in order to survive.</span></li></ul><p><span style="font-family:arial;font-size:85%;"><strong><em>Who are street children?</em></strong></span></p><ul><li><span style="font-family:arial;font-size:85%;">who have only intermittent contact with parents or family (usually mother or sisters) but live most of the time with other children in the city streets, or are on the move. {There are numerous reasons for a child to leave home}</span></li><li><span style="font-family:arial;font-size:85%;">who have been literally abandoned by their parents/relatives, found themselves on the street from the beginning because of family problems, or have chosen to leave home due to some kind of constant abuse.</span></li></ul><p><span style="font-family:arial;font-size:85%;"><em>Those who have run away from home can be separated into two categories:<br /></em><br />- Those who have an unpleasant or traumatic home environment, including child abuse.<br />- Those that experience family problems they are unable to solve: i.e., alcoholism, child abuse, ill treatment by stepparents, HIV/AIDS, unemployment and poverty. Their tolerance level has been far exceeded, leading to the drastic decision to leave their family and home to become street children.<br /><br />Religion of street children in India varies greatly according to area, but, in general, approximately 70% are Hindu, 18% are Muslim, Christian and other. Percentage of Hindu children is as high as 82% in Hyderabad, Indore & Bangalore. (Almost 50% of Hindu children belong to scheduled caste or tribes.) 82.7% of street children are boys. Girls are more difficult to trace but they are, by far, the most vulnerable.<br /><br /></span><span style="font-family:arial;"><span style="font-size:85%;"><strong>WORK CONDITIONS<br /></strong>Most street children find themselves some work, even though they may not be steady and lose jobs regularly. Many think of rag picking as a "job". A study in 1989 shows that 39.3% working children are paid inadequately, and 34% complain of being forced to overwork. Many children are lured into bonded work or "work-camps" that they are unable to escape from, due to unscrupulous and cruel proprietors or middlemen.<br /><br /></span></span><span style="font-family:arial;"><span style="font-size:85%;"><strong>DESIRE TO BE SECURE<br /></strong>A recent study in Madras shows that many street children (45.6%) would like to live in a secure place, while 71% are very eager to change their present life. 63% of children have an ambition to do something meaningful in their future. The vast majority of them have a survival instinct and the tenacity that helps them survive the day to day trials of street life. That does not, however, provide them a future<br /><br /></span></span><span style="font-family:arial;"><span style="font-size:85%;"><strong>AGE OF CHILDREN<br /></strong>The average age of street children is:<br />33% 6-10yrs<br />40% 11-15yrs<br />27% 16yrs +<br /><br /><strong>HEALTH CONDITIONS </strong><br />The health condition of street children is generally poor. Many suffer from chronic diseases like TB, leprosy, typhoid, malaria, jaundice and liver/kidney disorders. Venereal disease is rampant among older ones (14yrs+). Scabies, gangrene, broken limbs and epilepsy are common. HIV & AIDS cases are now widely seen. Most street children are exposed to dirt, smoke and other environmental hazards. They are constantly exposed to intense sun, rain and cold. Though there are supposed to be "free" Government / Municipal Hospitals in all cities, street children do not have easy access to them due the need to pay bribes to enter, or the indifferent or hostile treatment meted out to them by the staff. Bangalore, Vijayawada and Hyderabad report extreme conditions in this regard.<br /><br />For more information about street children please visit following URLs:<br /></span></span><a href="http://www.skcv.com/street%20children%20in%20india.htm"><span style="font-family:arial;font-size:85%;">http://www.skcv.com/street%20children%20in%20india.htm</span></a><br /><a href="http://www.gvnet.com/streetchildren/India.htm"><span style="font-family:arial;font-size:85%;">http://www.gvnet.com/streetchildren/India.htm</span></a><br /><a href="http://www.workingchild.org/htm/cwc.htm"><span style="font-family:arial;font-size:85%;">http://www.workingchild.org/htm/cwc.htm</span></a><span style="font-family:arial;font-size:85%;"> - this is an NGO working in Banglore<br /></span><a href="http://www.streetchildren.org.uk/resources/details/?type=country&country=64"><span style="font-family:arial;font-size:85%;">http://www.streetchildren.org.uk/resources/details/?type=country&country=64</span></a><br /><br /><span style="font-family:arial;font-size:85%;">Please do let us know your thoughts on street children and how we can make a difference to their lives.<br />Do send in your opinion(s), suggestion(s) and information.<br /><br />- Spandana Team </span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1121318506263035272005-07-14T00:50:00.000-04:002005-07-14T01:21:46.270-04:00Tech Stories<span style="font-family:arial;font-size:78%;">Tech Stories<br />The Comeback Vivek Paul - </span><a href="http://www.businessworldindia.com/feb0904/coverstory01.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/feb0904/coverstory01.asp</span></a><br /><a href="http://www.businessworldindia.com/feb0904/index.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/feb0904/index.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">Getting Infy on Track - </span><a href="http://www.businessworldindia.com/sep2203/indepth_makeover01.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/sep2203/indepth_makeover01.asp</span></a><br /><a href="http://www.businessworldindia.com/sep2203/index.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/sep2203/index.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">In Vogue - Phaneesh Murthy - </span><a href="http://www.businessworldindia.com/sep2203/invogue.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/sep2203/invogue.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">The man who gave away his network - </span><a href="http://www.businessworldindia.com/oct0404/coverstory01.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/oct0404/coverstory01.asp</span></a><br /><a href="http://www.businessworldindia.com/oct0404/index.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/oct0404/index.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">The thin end of the wage - </span><a href="http://www.businessworldindia.com/oct1104/indepth01.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/oct1104/indepth01.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">Home Run - </span><a href="http://www.businessworldindia.com/Nov1003/coverstory01.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/Nov1003/coverstory01.asp</span></a><br /><a href="http://www.businessworldindia.com/Nov1003/index.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/Nov1003/index.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">India Calling - </span><a href="http://www.businessworldindia.com/Nov1003/coverstory02.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/Nov1003/coverstory02.asp</span></a><br /><a href="http://www.businessworldindia.com/Nov1003/index.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/Nov1003/index.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">BPO Cross-Border Deals - </span><a href="http://www.businessworldindia.com/nov2204/coverstory01.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/nov2204/coverstory01.asp</span></a><br /><a href="http://www.businessworldindia.com/nov2204/index.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/nov2204/index.asp</span></a><br /><br /><span style="font-family:arial;font-size:78%;">The house Jack built... and Jeffrey is about to sell - </span><a href="http://www.businessworldindia.com/oct1104/coverstory01.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/oct1104/coverstory01.asp</span></a><br /><a href="http://www.businessworldindia.com/oct1104/index.asp"><span style="font-family:arial;font-size:78%;">http://www.businessworldindia.com/oct1104/index.asp</span></a><br /><span style="font-family:arial;font-size:78%;"> </span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1100680604777499822004-11-17T04:35:00.000-05:002004-11-17T03:36:44.776-05:00Few more interesting facts about fastest way of pulling data from database.<span style="font-family:arial;font-size:85%;">Few more interesting facts:
<br />
<br />The fact is that DataReader is much faster then DataSet , as following results show:
<br />DataReader
<br />
<br />DataReader requires for execute
<br />Time No of Rows
<br />
<br />====================
<br />0.9612 10 Rows
<br />.1982 50 Rows
<br />1.4234 100 Rows
<br />3.5585 500 Rows
<br />
<br />Where as DataSet requires for execute
<br />
<br />Time No of Rows
<br />================
<br />1.0979 10 Rows
<br />1.3435 50 Rows
<br />1.6516 100 Rows
<br />4.2164 500 Rows
<br />
<br />On average a datareader is 16% faster then dataset.
<br />
<br />If we compare the SqlDataReader and OleDbDataReader, the result is as below
<br />No of Rows SqlDataReader OleDbDataReader
<br />============================================
<br />10 Rows 0.9612 1.6592
<br />50 Rows 1.1982 2.2088
<br />100 Rows 1.4234 2.8741
<br />500 Rows 3.5585 8.6055
<br />On average SQLDataReader is 115% faster then OleDbDataReader. </span>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1100680400940810172004-11-17T04:25:00.000-05:002004-11-17T03:33:20.940-05:00What is the fastest way to grab records from a database table, from within an ASP.NET page?<span style="font-family:arial;font-size:85%;">To begin with, we were shown the test setup. Microsoft's Application Center Test (part of the Enterprise edition of Studio) was used, and the presenter walked us through its features. He talked about how he had to write a Timer module to accurately get JUST the page execution metrics that he wanted to show. The time utilities in the .NET framework are only accurate to 10 milliseconds, so he ended up writing a wrapper around QueryPerformanceCounter, as it gave accuracy of 1 millionth of a second (on his setup).
<br />
<br />The tests hit the same page 1050 times, and the first 50 results were discarded (so pages were compiled and loaded, and SQL Server was nice and warm).
<br />
<br />Some of the tests were:
<br />
<br />Using a DataReader vs. a DataSet
<br />
<br />The DataReader was of course faster. It was faster by 16% in this particular case.
<br />
<br />Using an ArrayList of Data Holders
<br />
<br />People sometimes put the data from a reader into a data holder class (Value Object). This approach was almost no different to the pure DataReader approach (as expected).
<br />
<br />SQLDataReader vs. OleDBDataReader
<br />
<br />Going with native drivers is always better. The SQLDataReader was 115% faster than going through OLE.
<br />
<br />Using Inline SQL vs. Stored Procedures
<br />
<br />There was next to no difference in performance of using the stored proc versus the inline SQL in this experiment. This is partly due to the fact that this is JUST a SELECT statement, and SQL Server can cache these statements. This doesn't mean that you shouldn't use stored procedures!
<br />
<br />DataReader Column Reference: By Name, Ordinal, or GetString()
<br />
<br />The choices:
<br />
<br />
<br />
<br />dr["ProductName"]
<br />dr[0]
<br />dr.GetString(0)
<br />The order of speed? dr[0] was the fastest, followed by dr["ProductName"], followed by dr.GetString(0) as it has to do the conversion.
<br />
<br />Inline (DataReader) vs. Controls (DataGrid)
<br />
<br />The inline script was 233% faster than a DataGrid component.
<br />
<br />ViewState enabled, or disabled
<br />
<br />DataGrid with ViewState disabled is 66% faster than DataGrid with ViewState enabled.
<br />
<br />Caching comes into play: DataGrid with: no caching, data caching, output caching
<br />
<br />With data caching you get a 637% faster operation. With output caching you get an infinite improvement ;)
<br />
<br />This topic was taken in a tech seminars and the data was available in one of the blogs of MS techie. </span>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1100682535989294022004-11-17T04:07:00.000-05:002004-11-17T04:08:55.990-05:00Contrasting the ADO.NET DataReader and DataSet<span style="font-family:arial;font-size:85%;">Referto the URL:</span>
<br /><a href="http://msdn.microsoft.com/msdnmag/issues/04/06/DataPoints/"><span style="font-family:arial;font-size:85%;">http://msdn.microsoft.com/msdnmag/issues/04/06/DataPoints/</span></a>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1100513826571076212004-11-15T05:10:00.000-05:002004-11-16T01:05:54.050-05:00Adding checkox to a datagrid<span style="font-family:arial;font-size:85%;">There are many instances when we require a webcontrol like a checkbox to be added to a datagrid for performing different operations like adding or deleting records available in a datagrid(from a shopping cart or a mailbox).
<br />
<br />This articles demonstrates how to add a checkbox to a datagrid and read whether the checkbox is checked for each of the records present in the datagrid and perform specific action on them.
<br />
<br />Code below shows a datagrid which contains a checkbox column and a checkbox column is added to the datagrid within the TemplateColumn tag and precisely in the ItemTemplate tag of the datagrid. It is added as a normal checkbox server control.
<br /></span>
<br />
<br /><span style="font-family:arial;">
<br /><form id="DG_Controls_Example" method="post" runat="server">
<br /><asp:datagrid id="DGSample" runat="server" allowpaging="True" autogeneratecolumns="False">
<br /><columns>
<br /><asp:boundcolumn datafield="Contactname" headertext="Customer Name"></asp:BoundColumn>
<br /><asp:boundcolumn datafield="CompanyName" headertext="Company Name"></asp:BoundColumn>
<br /><asp:boundcolumn datafield="ContactTitle" headertext="Title"></asp:BoundColumn>
<br /><asp:templatecolumn>
<br /><itemtemplate>
<br /><asp:checkbox id="chkbox" runat="server"></asp:CheckBox>
<br /></itemtemplate>
<br /></asp:TemplateColumn>
<br /></columns>
<br /></asp:DataGrid>
<br /><asp:button id="Button1" runat="server" text="Button"></asp:Button>
<br /></form>
<br />
<br /></span>
<br />
<br /><span style="font-family:arial;font-size:85%;">In this example we have added a button to read all the records which have been selected by checking the respective boxes in each record and display the checked records.
<br />In the code behind, we bind the data to the datagrid as shown below:
<br />
<br /></span><pre>
<br /><span style="font-family:arial;font-size:85%;">private void Page_Load(object sender, System.EventArgs e)
<br />{
<br /> if(!Page.IsPostBack)
<br /> {
<br /> adp = new SqlDataAdapter("Select * from customers",con);
<br /> ds= new DataSet();
<br /> adp.Fill(ds);
<br /> DGSample.DataSource=ds;
<br /> DGSample.DataBind();
<br /> }
<br />}
<br />
<br /></span></pre>
<br />
<br /><span style="font-family:arial;font-size:85%;">And in the button click event for the button, we write the code for processing the records having checked boxes.
<br />
<br />In a loop for each item present in the datagrid, we find the check box control which we have added in the ItemTemplate tag and assign to an instance of a checkbox variable. For each of this checkbox we check whether the box is checked and if so we perform the required action on the checked records.
<br />
<br />
<br /></span><pre>
<br />
<br /><span style="font-family:arial;font-size:85%;">private void Button1_Click(object sender, System.EventArgs e)
<br />{
<br /> CheckBox chkbox = new CheckBox();
<br /> TextBox txtbox= new TextBox();
<br /> foreach(DataGridItem item in DGSample.Items )
<br /> {
<br /> chkbox=(CheckBox)item.FindControl("chkbox");
<br /> txtbox=(TextBox)item.FindControl("txtbox");
<br /> if(chkbox.Checked)
<br /> {
<br /> Response.Write(item.Cells[0].Text);
<br /> //write the required code for processing depending on the requirement.
<br /> }
<br />
<br /> }
<br />}
<br />
<br />
<br /></span></pre>
<br />
<br /><span style="font-family:arial;font-size:85%;">
<br />Namespaces used:
<br />System.Data
<br />System.Data.SqlClient </span>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1100511859955218462004-11-15T04:40:00.000-05:002004-11-15T04:44:19.956-05:00Assemblies - Part 2<span style="font-family:arial;font-size:85%;"><strong>Structure of an Assembly</strong>
<br />A .NET assembly consists of assembly metadata and the assembly manifest contains the type information, resources, and the MSIL code to implement type metadata in an assembly. The manifest is an important component of an assembly. The assembly manifest contains the following:</span>
<br /><span style="font-family:arial;font-size:85%;">
<br />- Identity Information: Identifies the assembly uniquely by the combination of four properties: assembly name, assembly version, culture, and strong name.
<br />- File List Information: Includes types and declarations defined in another file. Every assembly is made up of one or more files. The manifest maintains a list of files that make up the assembly. The manifest maps the file containing the types and declarations to the file containing the declaration and implementation of an application.
<br />- Referenced Assembly Information: Includes the information of references to other assemblies. In application development, you can develop various components that are spread across various assemblies.
<br />- Exported Type References: Includes information about the functions and types that are exported and available to other assemblies. The components of other assemblies may refer to the methods and properties in the current assembly.
<br />- Type Metadata: Provides the description of each class type. The manifest includes the name of each class type exported from the assembly and the information about the file containing its metadata.
<br />- MSIL Code: Contains the compiled code in the MSIL format. The manifest is the system information about the assembly. The .NET platform compiles code written in a CLS-compliant language to an Intermediate Language (IL). The MSIL compiler compiles the source code to an IL form. When the .Net-based code is executed, the just-in-time compiler of the .NET runtime compiles the IL code to the executable form. The runtime loads the compiled code segment in memory and executes it. As a result, the system stores the complete compiled code as part of the assembly in IL format and recompiles and executes it. This happens only once between the loading and unloading of the .NET runtime.
<br />- Resources: Includes resources such as bitmaps that you can integrate into a manifest. The assembly's resource section contains information on the resources the application uses.
<br />
<br /><strong>Types of Assemblies</strong>
<br /><strong>
<br /></strong>There are two types of assemblies, single-file and multi-file assemblies. In the .NET platform there is no difference between the two. Based on the structure, constraints, and requirements of the development team, you can choose either type of assembly.
<br /></span><a name="709"></a><a name="ch09lev02sec7"></a><span style="font-family:arial;font-size:85%;"></span>
<br /></strong></span><span style="font-family:arial;font-size:85%;"><strong>Single-File Assembly
<br /></strong>A single-file assembly stores the manifest, type metadata, IL, and resources in a single file. You can use this approach for simple applications when you need to develop an assembly for a small-scale deployment.
<br /></span><a name="710"></a><a name="ch09lev02sec8"></a><span style="font-family:arial;font-size:85%;"><strong></strong></span>
<br /><span style="font-family:arial;font-size:85%;"><strong>Multi-File Assembly</strong>
<br />When developing large applications, you can split the application into smaller modules and deploy different development teams to work on various modules in a parallel mode. In this situation, you can use multi-file assemblies, with the different teams developing and compiling the modules. Using the assembly linker, you can integrate the modules into an application, where the assembly is broken into multiple files. Although the application environment contains several modules that can be developed by separate teams, the modules are closely related in functionality. For example, you can have different modules related to the system administration functionality, developed over a period of time. Using the multi-file assembly feature of .NET, you can group all administration functionality modules into an assembly to facilitate component versioning and maintenance.
<br />
<br /><strong>Scope of Assemblies
<br /></strong>Assemblies can either contain a private or a public scope, based on the level of access required by the clients who access it. The manifest contains information regarding the scope of an assembly.
<br /></span><a name="712"></a><a name="ch09lev02sec9"></a><span style="font-family:arial;font-size:85%;"><strong></strong></span>
<br /><span style="font-family:arial;font-size:85%;"><strong>Private Assembly</strong>
<br />Assemblies are private in scope if only one application can access them. Private assemblies are only available to clients in the same directory structure as the assembly. As a result, the .NET assembly resides in the same directory structure as the client executable. You can use a private assembly when it is specific to a client application and no other client application refers to it.
<br /></span><a name="sE35DDB78-F018-4A96-BFBF-3048CCD87CB8"></a><a name="713"></a><a name="ch09lev02sec10"></a><span style="font-family:arial;font-size:85%;"><strong></strong></span>
<br /><span style="font-family:arial;font-size:85%;"><strong>Shared Assembly
<br /></strong>When an assembly such as a system assembly contains features shared by various applications, standard deployment techniques discourage the use of private assemblies. As a result, you need to maintain a copy of the assembly for each client application. You can also register the assembly in the Global Assembly Cache (GAC), so that all client applications refer to one copy of the assembly. This type of assembly is called a shared assembly. The side-by-side execution feature of the .NET platform enables you to register multiple versions of the same assembly in GAC.
<br />
<br /><strong>Global Assembly Cache
<br /></strong>GAC is a repository of assemblies used by multiple applications on a system. When you install the .NET runtime on a system, it creates a cache, which can be used to store assemblies.
<br />
<br /><strong>Advantages of Storing an Assembly in GAC
<br /></strong>The advantages of storing an assembly as a shared assembly in GAC are:
<br />- Multiple Applications: Allows you to access an assembly from one location, GAC. If multiple applications use the same assembly, instead of keeping a copy of the assembly in each application folder, you can store a shared assembly in GAC.
<br />- Security: Ensures that only the system administrator can modify permissions of the folder. The GAC is always installed in the system folder. It inherits the permissions and Access Control Lists (ACLs) present in the system folder. As a result, you can protect GAC from unauthorized modifications.
<br />- Side-by-side Versioning: Enables you to maintain multiple versions of the same application on a system. Private assemblies enable you to maintain a copy of the assembly in every client application folder. When a new version of an assembly is released, instead of updating the assemblies in all client applications, you can maintain multiple versions of the assembly in a central location, GAC. Client applications can refer to various versions of assemblies in GAC.
<br />- Automatic Search Location: Enables the client application to easily access an assembly stored in GAC. When the runtime searches for an assembly, GAC is the default location it searches.
<br /></span><a name="716"></a><a name="ch09lev02sec12"></a><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;"><strong>Disadvantage of Storing an Assembly in GAC
<br /></strong>In a private assembly, you can use a simple Xcopy operation for deployment, which you cannot use for GAC-based assemblies. The assembly has to be physically registered in the GAC of client computers. For example, assemblies stored in the GAC should have the same assembly name and file name, which means that you should save assembly name abc as abc.exe or abc.dll.
<br /> </span>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1100503197839546562004-11-15T02:18:00.000-05:002004-11-15T02:19:57.840-05:00The Real Mr Premji <span style="font-family:arial;font-size:85%;">Azim Premji Profile - </span>
<br /><a href="http://www.businessworldindia.com/nov2204/invouge01.asp"><span style="font-family:arial;font-size:85%;">http://www.businessworldindia.com/nov2204/invouge01.asp</span></a>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1099991828818089062004-11-09T04:10:00.000-05:002004-11-09T04:17:08.820-05:00Generating Bar Chart in ASP.net<span style="font-family:arial;font-size:85%;"><strong>Introduction</strong></span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">The following example demonstrates how to generate bar-charts for any business information available on a web page. This uses the classes which are provided in the .net <strong>System.Drawing</strong> namespace to draw generate the chart.
<br />
<br />Bar chart created in the below example illustrates the Profit of a company for each month from January through December.
<br />
<br /><strong>Generating the Bar chart</strong> </span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">Data which is to be displayed on X axis and Y axis is stored in the ArrayLists and then the data is read from these ArrayLists for creating the required bar chart.
<br />
<br />First the ArrayLists are populated as follows:</span>
<br />
<br /><span style="font-family:arial;font-size:85%;">Dim aMonths As ArrayList = New ArrayList(), aProfits As ArrayList = New ArrayList()</span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("January")
<br /> </span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("February")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("March")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("April")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("May")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("June")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("July")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("August")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("September")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("October")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("November")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aMonths.Add("December")
<br /></span>
<br /><span style="font-family:arial;font-size:85%;">
<br /> aProfits.Add(240500)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(220950)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(283500)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(340000)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(325750)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(123456)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(235621)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(345235)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(290451)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(152345)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(653456)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;"> aProfits.Add(785620)
<br /></span>
<br /><span style="font-family:arial;font-size:85%;">Once the data is populated the chart can be generated by calling the method DrawBarGraph:
<br />
<br /><strong>DrawBarGraph("Profits!", aMonths, aProfits)
<br /></strong>
<br />DrawBarGraph is defined as follows:
<br />
<br /></span>
<br /><span style="font-family:arial;font-size:85%;">Sub <strong>DrawBarGraph</strong>(ByVal strTitle As String, ByVal aX As ArrayList, ByVal aY As ArrayList)
<br /> Const iColWidth As Integer = 60, iColSpace As Integer = 25, iMaxHeight As Integer = 400, iHeightSpace As Integer = 25, iXLegendSpace As Integer = 30, iTitleSpace As Integer = 50
<br /> Dim iMaxWidth As Integer = (iColWidth + iColSpace) * aX.Count + iColSpace, iMaxColHeight As Integer = 0, iTotalHeight As Integer = iMaxHeight + iXLegendSpace + iTitleSpace
<br />
<br /> Dim objBitmap As Bitmap = New Bitmap(iMaxWidth, iTotalHeight)
<br /> Dim objGraphics As Graphics = Graphics.FromImage(objBitmap)
<br />
<br /> objGraphics.FillRectangle(New SolidBrush(Color.White), 0, 0, iMaxWidth, iTotalHeight)
<br /> objGraphics.FillRectangle(New SolidBrush(Color.Ivory), 0, 0, iMaxWidth, iMaxHeight)
<br />
<br /> ' find the maximum value
<br /> Dim iValue As Integer
<br /> For Each iValue In aY
<br /> If iValue > iMaxColHeight Then iMaxColHeight = iValue
<br /> Next
<br />
<br /> Dim iBarX As Integer = iColSpace, iCurrentHeight As Integer
<br /> Dim objBrush As SolidBrush = New SolidBrush(Color.FromArgb(70, 20, 20))
<br /> Dim fontLegend As Font = New Font("Arial", 11), fontValues As Font = New Font("Arial", 8), fontTitle As Font = New Font("Arial", 24)
<br />
<br /> ' loop through and draw each bar
<br /> Dim iLoop As Integer
<br /> For iLoop = 0 To aX.Count - 1
<br /> iCurrentHeight = ((Convert.ToDouble(aY(iLoop)) / Convert.ToDouble(iMaxColHeight)) * Convert.ToDouble(iMaxHeight - iHeightSpace))
<br /> objGraphics.FillRectangle(objBrush, iBarX, _
<br /> iMaxHeight - iCurrentHeight, iColWidth, iCurrentHeight)
<br /> objGraphics.DrawString(aX(iLoop), fontLegend, objBrush, iBarX, iMaxHeight)
<br /> objGraphics.DrawString(Format(aY(iLoop), "#,###"), fontValues, objBrush, iBarX, iMaxHeight - iCurrentHeight - 15)
<br /> iBarX += (iColSpace + iColWidth)
<br /> Next
<br /> objGraphics.DrawString(strTitle, fontTitle, objBrush, (iMaxWidth / 2) - strTitle.Length * 6, iMaxHeight + iXLegendSpace)
<br /> 'objBitmap.Save("C:\inetpub\wwwroot\graph.gif", ImageFormat.GIF)
<br />
<br /> objBitmap.Save(Response.OutputStream, ImageFormat.Gif)
<br /> objGraphics.Dispose()
<br /> objBitmap.Dispose()
<br />End Sub
<br />
<br />This code will generate the bar chart and display it on the screen. Also if required the bar chart can be saved as an image, just uncomment the line below in the above code.
<br />
<br /> <strong>objBitmap.Save("C:\inetpub\wwwroot\graph.gif", ImageFormat.GIF)
<br /></strong> </span>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7392299.post-1099980571930018332004-11-09T01:05:00.000-05:002004-11-09T01:09:31.930-05:00Assemblies - Part 1<span style="font-family:arial;font-size:85%;"><strong>Introduction</strong></span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">An assembly is a small logical collection of classes that contains the metadata of an application and components and resources that enable you to create an application. An assembly is one of the main components of the .NET framework and it is developed during the Runtime. An assembly provides the CLR with the metadata, which describes types, members, and references in your code. The runtime uses the metadata to locate and load classes, lay out instances in memory, generate native code, and enforce security.</span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">It contains a manifest for executing a Microsoft Intermediate Language-based code (MSIL) at the CLR. Before the advent of the .NET platform, the business logic was implemented in the COM component. The main problem with COM is that it is tightly coupled with the operating system. When you deploy a COM component on a system, it copies the related .dll or .exe file to a specific location and makes an entry for the file in the registry. In COM, every component is uniquely identified in the registry through a Globally Unique Identifier (GUID).
<br /></span>
<br /><span style="font-family:arial;font-size:85%;">All COM component operations are based on the data in the registry. You cannot implement COM in other operating systems, such as UNIX/Solaris, because you need a registry to use COM-based components.</span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;"><strong>DLL-hell Problem</strong></span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">COM-based systems are prone to the classic dll-hell problem. You cannot modify a component after it is deployed without affecting existing clients. COM provides a mechanism to register and access multiple versions of a component in the registry, but the operating system does not provide a mechanism to prevent an earlier version of a .dll from accidentally overwriting a newer version.</span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">The assembly handles the operating system dependency and DLL-hell problems because it is a self-describing unit. You can maintain two versions of the same assembly on the same system.</span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;"><strong>Need for Assemblies</strong></span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">When Microsoft developed the .NET platform, the operating system dependency and the dll-hell problems were a major focus and it wanted to remove the coupling between the platform and the registry. The metadata of an application resides in the application itself and provides multiple versions of applications on the same system because each version maintains its own metadata.</span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;"><strong>Assembly Advantages</strong></span>
<br /><span style="font-family:arial;font-size:85%;"></span>
<br /><span style="font-family:arial;font-size:85%;">Assemblies provide the following advantages:- Easy Deployment: Allows you to deploy a .NET component on a client computer with a simple Xcopy command.
<br />- Side-by-side Execution: Allows other applications to use assemblies in addition to the primary application.
<br />- Operating System Independence: Allow you to port assemblies to any operating system that supports a .NET common runtime environment.</span>
<br />Unknownnoreply@blogger.com0