October 2004 - Posts
This is not a new feature of whidbey, it was there in .net framework 1.0 itself. I was searching in google for new appsettings binding feature in whidbey( will post about it later..), i found this information in Paul Wilson's blog. You can place your appsettings detail in some other file other than web.config/app.config and you can reference that file in your web.config file. I feel major advantage of this option is, it wont restart the application if you change anything in your custom file (actually disadvantage in most of the times...) unlike web.config file. You can use this feature as advantage to store some data for which application restart is not required immediately. Yesterday also somebody asked in asked in the newgroup how to avoid restart of application after doing some changes in web.config. He can use this feature to do that.
For more details, refer these links
Microsoft is going to release new collection classes in .NET Framework 2.0 which is equivalent to exisiting collections in 1.0 but rewritten to use generics. All this collections are placed under System.collections.generic namespace. I have done a test to find out the performance difference in using Arraylist and List<T> collection(equivalent of Arrarylist in .NET 2.0 written using generics) . In this test 30,00,000 items of various data types has been added to both the collections and all the items are retrieved back from the collections. This test basically finds out the performance improvement by using generics. Performance results are mentioned in milliseconds. The performance difference is very value type when compared to reference type. But for reference type also performance difference during fetch is huge
Note: To learn about generics, refer this article
|
Collection Name |
Integer |
String |
Date Time |
Custom Object |
|
|
Add |
Fetch |
Add |
Fetch |
Add |
Fetch |
Add |
Fetch |
|
Arraylist |
3860 |
3508 |
1482 |
786 |
5769 |
4848 |
1916 |
1778 |
|
List<T> |
511 |
1474 |
1477 |
132 |
1158 |
4166 |
1328 |
722 |
Test setup: Windows 2003 server, .NET Framework 2.0 Beta1.
If you want to do the performance testing on your own, you can use this generics sample to test the performance between various collections
As i told ealier, i am currently working on Whidbey. I am trying out many new features in whidbey, mainly on asp.net. So i will try to post atleast one blog everyday about whidbey. Here are the few links which will be useful for you to start with whidbey.
MSDN Beta documentation url,
http://msdn2.microsoft.com/library/default.aspx
Though this documentation is not complete, you can use this for reference.
Beta QuickStart Tutorial
http://beta.asp.net/quickstart/
You can find lots of information here which you wont find it anywhere else in web. For example, i was searching for web part connection example in web for quite sometime. Later i found out a neat article/explanation on that feature here..
Other links,
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
http://msdn.microsoft.com/vbasic/whidbey/
http://msdn.microsoft.com/vcsharp/2005/
Just now came from gym, thought of posting about StopWatch Class which i have used today during my performance testing of generics(will post performance results later....) before i go to home.
StopWatch is a new class introduced in Whidbey used to accurately measure elapsed time. I was expecting this class from vb6 days...now it is available in framework itself. Previously if i want to measure any performance testing. Either i use DataTime.Now() or Enviorment.TickCount() to measure elapsed time between any operation. But using these methods, resolution can go maximum up to 500ms. But using StopWatch class, you can accurately measure elapsed time(you can measure up to nanoseconds) with few lines of code. For example,
Stopwatch sw = new Stopwatch();
List<double> list = new List<double>();
sw.Start();
for (int i = 0; i < count; i++)
{
list.Add(<double>);
}
long addTime = sw.ElapsedMilliseconds;
sw.Reset();
Double d = 0;
sw.Start();
for (int i = 0; i < count; i++)
{
for (int j = 0; j < 30; j++)
{
d = list[i];
}
}
long getTime = sw.ElapsedMilliseconds;
sw.Stop();
Start the stopwatch, measure elapsed time using ElaspsedMilliseconds() property. For more details about stopwatch class, check this beta msdn link (http://msdn2.microsoft.com/library/ebf7z0sw.aspx).
I am working on ASP.NET 2.0 new features for the past one month. Last week i tried out Client Callbacks feature in ASP.NET Whidbey. This feature allows client script to call server side event asynchronously.
In most of the application we require this feature for posting some data to server without doing page refresh. Even for doing server side validation we can use this feature extensively. This feature is just wrapper over XMLHttp which we used previously to do asynchronous post. In my previous project, we extensively used XMLHttp Post. Now we no need to code for this, all this work will be done by Call back manager we just need to use this framework. Other advantage of this feature is, it is cross browser friendly. It will work both in Netscape and IE (of course it has to work here...). Basically it will work in all the browser which supports XMLHttp. To know more about client call back, read my
article.
If you check out WebForm_DoCallback javascript function in script returned by webresource.axd handler, you can find out the client script for XML Http work. It neatly decides whether it wants to do post or get depending upon posted data size. My only concern is that, it posts the viewstate data also along with other posted data to callback page. I feel most of the time we might not require posted data(especially viewstate) as we are passing necessary information to call back page through argument parameter. So i feel there should be some way to avoid passing viewstate to call back page. I am working on this, will update about this issue in detail in next post.
Microsoft Software Architect Forum 2004 happened in Bangalore last week. I attended many sessions there, most of the sessions were concentrated on SOA only. Other than that we had a session on RFID, Software Factories, Indigo..... I happened to meet
Pat Helland, who was one of the founders of MTS (now COM+) and chief architect of Yukon's SQL Service Broker product. He gave two sessions on SOA, both were great. If you are interested in learning SOA, then check out his
presentation on SOA during PDC.
Soma and Eric Rudder came to our BDotNet UserGroup Meeting last week. We all had a Q & A session with Soma and Eric. During that session, i asked Soma about Edit and Continue support in ASP.NET. He told, as of now they dont have any plans of including this feature in Whidbey. If this feature is very useful, they will think about it after Whidbey release. Other then this session, we had a session on Software Design(by Arun) and on VSTS (by Gaurav).
Yesterday i bought a book "
Software Architecture in Practice - Second Edition" by Len Bass, Paul Clements, Rick Kazman. My lead (Mandar Bhagwat) suggested me to buy this book. I am very excited to read this book after i read the TOC and Preface. There are also lots of case studies in this book. If you are planning to become an architect, then it is a must buy book. I will also try to post here some of the good stuff i learn from this book.
Like many C# developers i was also looking for Edit and Continue feature in C#. Its good to know that this feature will also be available in C# in whidbey release itself.
Somasegar(Vice president of the Developer Division,MS) mentioned about this in his
blog
Welcome to my blog,
After much procrastinating, I have finally entered the blogging world. I am excited about blogging and hope to post some of the stuff that I learn in .NET and other technologies here. Here is a small intro about myself,
I graduated from REC Trichy, and am currently working with Hewlett Packard (India) in a team called Technology and Innovation Leadership Group. This team mainly concentrates on the latest Microsoft technologies. I have been closely involved in architecting and designing applications based on ASP/ASP.NET, VB/VB.NET, COM+, SQL Server 2000 for more than 4 years.
I love to work with technology that fascinates me, .NET being my favorite. I co-host ExtremeExperts, which is a collaborative knowledge base of Microsoft technology related articles, tools, code snippets and much more. I spend my free time listening to music, watching movies, and playing cricket.. Latest addition to this list is writing blogs...