Saturday, July 31, 2004

Reviewing C#

Two of the guys at the Microsoft Portal event mentioned that their companies exlusively did .NET development in C#, which was also the language used in all of the labs. I'm familiar with VB.NET, but hadn't really bothered doing much with C#, we hadn't seen the need to at my previous workplace, and theoretically there is no difference which language you use in .NET as it is all compiled to MS Intermediate Language anyway.

However, the guys I talked to mentioned that changing to a less familiar .NET language was thought to help programmers remember that .NET is a completely new paradigm, and make the mental shift to it.
(Note: Clayton did mention that with v2.0 so close to release programmers who haven't made the shift yet might as well wait for it so as to not have to re-learn everything a second time)

So I bought a C# book for myself (C# Complete from Sybex, a very good deal as it includes the most relevant chapters from all of their other C# books for a third the price of any one of them) and sat down to read it this weekend.

I had barely noticed that we were using C# during the portal labs - partly because the code was already written for us, and partly because when you can program in VB6, VB.NET, LotusScript, Lotus Notes Formulas, JavaScript, VBA, PHP, ASP, Java, HTML, XSLT and Omnis7 then its easy to forget which one is strongly typed and which isn't, which ones requires characters to end a line and which don't and which ones are case sensitive and which aren't.

C# is case sensitive (which I hate, and like Java) and is strongly typed (which I like), it is also object oriented (which is good), requires semicolons (;) to end a line (mostly, another common point with Java, and Lotus Notes Formulas), and you try code and exceptions are thrown (also Java like).

So far I've yet to form an opinion as to whether I would like to program in it. It would certainly make me stop and consider what I was doing, but the decrease in productivity would take a while to overcome. Of course, I probably won't ever program in it, but it is always a good idea to know the tools your team might use.

Speaking of which, I really want to try Whidbey out, and aren't we overdue for a new version of Visual Studio?

2 comments:

  1. Anonymous4:32 pm

    Personally I prefer C++.Net. Then again I us managed and unmanaged code. Its also good to get access direct access to the set and get methods of objects.

    ReplyDelete
  2. Hey Anonymous, thanks for commenting.

    I've never used C++ (or C) because there was always a need for us as IT consultants to have RAD tools that allowed us to quickly build solutions for clients.

    One way around this problem is to pre-build common solution components, thus avoiding the need to custom build everything each time. OO tools make this easier, and C++ might be a good solution if you can afford to invest into common reusable components.

    Avanade takes an approach like this, they say they provide "asset based services", where the assets are pre-built common components, or in some cases entire template solutions.

    ReplyDelete