Wednesday, March 02, 2005

Re: More on C# and C++

The one time I picked up a C# book and read some fundamentals,.. I was really quite lost. I kept wondering where is all this in Java and is it really needed. The features did have merit but life was simpler without them.

Can you give some examples? I somehow feel C# maybe simpler because it has better abstractions - things like delegates, events, properties and attributes. Also, Java 1.5 has included many features from C#.

Is NUnit widely used? I think its similar to the JUnit library.

NUnit was a direct port of JUnit. Recent versions have made better use of .NET features like attributes, which have made it better. For example, in JUnit, you have some restrictions like you your test class has to extend "TestCase" and you HAVE to start your method names with "test". In NUnit, you just apply an attribute, ["TestCase"] to your class - no need to extend it, and similarly just apply an attribute ["Test"] to your method - no need to start it with "test".

NUnit is quite popular. But I fear Microsoft is going to have a negative affect on their growth. With Visual Studio 2005, they are introducing Visual Team System, which includes it own testing framework. I'm actually not sure if the Team System features are only for the high end version of Visual Studio or if they will be included in all. This is just another example of the difference in cultures between the Java and Microsoft camps.

JUnit was started by the community and has been accepted as an unofficial standard. Microsoft on the other hand, instead of embracing NUnit has gone and done their own thing. I'm sure their features will be great and it will integrate really well with Visual Studio providing for a great experience. But it just shows that they haven't really opened up to the .NET community.

Java is also a pretty huge framework. It is divided into Standard and Enterprise Editions, but are still very huge in themselves. Are .NET api's divided similarly? And the Java api's are bloating too. So there doesn't seem to be much of a diff there.

.NET has two versions - .NET framework (clients and servers) and .NET compact (mobile - similar to J2ME). I guess it's not going to matter a whole lot that .NET will keep getting bigger because Microsoft will just integrate it into the OS - That's what WinFX is all about. So no headache of downloading it. I found the idea of a linker for .NET quite interesting. Why wouldn't this work?

I just read something similar in a book recently - Class invariants. Never thought of this stuff before. Could Mohn post an example.

I had posted something on class invariants long back. This was during the period where we obsessed with assertions.

No comments: