Easy way to create a temp SSL for your local web server for testing your web application

It’s seems to me that lot of developers still don’t know there is a very easy way to create a temp SSL for your local server for testing your web application. You don’t have to obtain a trial SSL’s from third party venders or installing and using certificate service. All you have to do is just use selfssl.exe which coming with IIS6 resource kit . Even though that resource kit is for IIS6 you can use it (selfssl.exe) with XP (IIS 5.1). I think it’s also compatible with Win2k also (IIS 5.0). BTW Today I found this simple tutorial which describes nicely how to install IIS6 Resource kit and use selfssl.exe. http://www.visualwin.com/SelfSSL/
Posted by madhawa with no comments

How to get XML view of a typed DataSet in Visual Studio 2005?

If you are coming from vs2k3 background you might know how easy to get the XML view of a Typed DataSet. But unfortunately in vs2k5 they have removed that convenient XML view tab. So how we gonna see the xml of the typed dataset. One of my friends asked me today and my instance answer was use other editor to get that facility. But after doing some research I found that we can get into xml view by right clicking the XSD file in the solution explorer and picking “open with”. Not only the xml view but you can choose some other views from couple other options.
Posted by madhawa with no comments

Can you model Aggregations in Class Designer?

Can you model Aggregations in Class Designer?  No, you can't.

The problem is that Aggregations and Compositions cannot be distinguished from regular associations in code because the .NET languages (apart from Visual C++ perhaps) do not distinguish members held "by reference" (regular association) from those held "by value" (aggregation or composition).

Even if you could model aggregation in Class Designer, the information would be lost when you re-visualized the code, for example by dragging the classes onto another class diagram.

This is where the VS2005 Class Designer differs from UML class designers. The VS2005 is a 100% visualization of the code, with no translation. In UML tools you have to "code generate" and "reverse engineer" between the code and a model that holds additional metadata (such as whether a particular association is an aggregation)...

Posted by madhawa with no comments

Is it .NET Framework 3.0 or 2.1?

We all know that .NET 3.0 is coming. But majority of the community are still catching things in 2.0. But don’t worry; there is no framework change in 3.0 from 2.0 but some additional features (libraries) ships with. So how come it’s a main version change ha? I think Microsoft had to make it 2.1 or sth but not going for 3.0. 

Actually I’m not the only one thinks like that. Check this out and let me know what do you think.

Posted by madhawa with 1 comment(s)

Do we need to use multiple inheritance?

Yesterday evening in the coffee break I and one of my colleagues jumped into a debate over multiple inheritance vs. using interfaces. :) He was a C++ programmer at MIT (local software development firm in Sri Lanka) before joining our company and moving into C#. And he is pretty confidence about multiple inheritance. Seems he has been using multiple inheritances as he told. Anyway I’m not sure he agreed with me on favor composition over Inheritance.

I found good discussion on multiple inheritance and using interfaces at Aritma Developer. I think he (my colleague) better listen to Scott Meyers, one of the world's foremost experts on C++ software development and author of the best-selling Effective C++ series (Effective C++, More Effective C++, and Effective STL).

Check this out. I bet you to would love it.

http://www.artima.com/intv/abcs.html

Posted by madhawa with no comments

Why instance methods in java are virtual by default and in C# not?

Have you ever wondered why instance methods in java are virtual by default and in C# not? In C# to make a method virtual you have to explicitly do it right? Why is that?

I think better to ask from creator of the C# language. :)

So this is what Anders Hejlsberg says:

There are several reasons. One is performance. We can observe that as people write code in Java, they forget to mark their methods final. Therefore, those methods are virtual. Because they're virtual, they don't perform as well. There's just performance overhead associated with being a virtual method. That's one issue.

A more important issue is versioning. There are two schools of thought about virtual methods. The academic school of thought says, "Everything should be virtual, because I might want to override it someday." The pragmatic school of thought, which comes from building real applications that run in the real world, says, "We've got to be real careful about what we make virtual."

When we make something virtual in a platform, we're making an awful lot of promises about how it evolves in the future. For a non-virtual method, we promise that when you call this method, x and y will happen. When we publish a virtual method in an API, we not only promise that when you call this method, x and y will happen. We also promise that when you override this method, we will call it in this particular sequence with regard to these other ones and the state will be in this and that invariant.

Every time you say virtual in an API, you are creating a call back hook. As an OS or API framework designer, you've got to be real careful about that. You don't want users overriding and hooking at any arbitrary point in an API, because you cannot necessarily make those promises. And people may not fully understand the promises they are making when they make something virtual. more...

 

Posted by madhawa with no comments

How many active bloggers are here?

I asked wella to create my blog long time ago but couldn’t blog anything. Actually I have 2 other blogs but now Blogger one is not continuing. I’m gonna use http://geekswithblogs.net/madhawa/ as my techno blog. But I thought better to post sth in .net forum also.

Why I’m doing that? Well… actually there are no of bloggers out there blogging in the forum. But I wonder how many of them are actively doing that? If we wanna create a blogging community here (part of the .net community) I think at least active community members have to blog here. Then others will follow. But I don’t see even at least one of our MVP’s actively blogging here.

Don’t you guys think this is the high time to do that?

Posted by madhawa with 2 comment(s)