Why we use C# for .NET development

In the company where we work, we have a policy of using Java for all major developments. The core reason behind this being that we have a long term aspiration to being vendor and platform independent.

Regards the .NET framework the policy is to use VB rather than C#. Having spent some time using both langauges I disagree with this decision. I am not one to ignore company policy but I will try to change it where I think it is incorrect.

So, I spent a little time putting a SOAP (summary on a page) together to present to our chief architect.

I expect there are many companies out there with a similar policy, so I thought I would post this so you could share my reasonings and perhaps change your own company policies.

I wouldn't be appropriate to post the original but here is a public version:

SOAP - .NET Language Preference

Summary

Java is the preferred development platform within our company, but where close coupling with Microsoft technologies is required, development using the Microsoft .NET Framework may be required or preferred.

In an aim to reduce the number of languages supported by our company, a decision has been made to select a preferred language for the .NET platform.

Our company has selected VB .NET as the preferred language for .NET development. The reasoning behind this is that we already have live applications written using VB .NET (although there are also live C# applications within our company). The status of C# is that it may be used where an application is already developed using this language, but not for new projects.

This SOAP proposes switching the status of the VB. NET and C# languages so that C# is the preferred language and existing applications in VB .NET may still be maintained.

Operational Perspective

The reasoning behind this proposal is as follows:

  • VB .NET is significantly different to Java in terms of syntax and structure. C# is based on the Java/C++ syntax. VB .NET developers will have a steeper learning curve when adopting Java than C# developers. For this reason C# lends itself better to being a secondary language in a Java based organisation.
  • The .NET CLR (Common Language Infrastructure) has been submitted to ECMA and accepted. C# has the same status, http://msdn.microsoft.com/netframework/ecma/ . VB .NET has not. C# is better protected than VB .NET to changes in strategic direction.
  • Both VB .NET and C# have been used within our company to develop live applications.
  • Typically developers migrated from VB6 to VB .NET as this reduced the learning curve. However the .NET environment is significantly different from VB6, even though it looks superficially similar. The migration from VB6 to VB .NET can result in poorly designed VB6 style solutions running in the .NET framework.
  • Visual Studio 2005 comes with JLCA (Java Language Conversion Assistant) allowing Java code to be ported to C#, http://msdn.microsoft.com/vstudio/downloads/tools/jlca/ . There is no comparable tool for VB .NET.
  • C# provides the ability to work with C/C++ style pointers. This is rarely required and should be avoided. The exception to this rule is some forms of interoperability with legacy Microsoft code. VB .NET does not have this capability.
  • C# supports Java style code documentation – where definitions of properties and methods are commented in such a way as to make the component interfaces self documenting. VB .NET does not support this.
  • Visual Studio .NET itself was written using C#. Community support for C# is wider than for VB both inside and outside Microsoft, http://blogs.msdn.com/categories , http://www.technorati.com/search/vb c.f. http://www.technorati.com/search/c# . Industry wide there is more demand for C# as shown by the following link: http://www.indeed.com/jobtrends?q=C%23%2C+VB.NET .

Financial Perspective

  • In terms of the cost of multi-skilled developers, the "C# & Java" skillset should be cheaper than "VB & Java" due to the languages similarities. Not only does this relate to less training but also a higher quality of code/output as the developer is more likely to be highly competent in both languages.
  • The lack of case sensitivity in VB means that there can be no common coding standards across Java/VB as there could be across Java/C#. This further increases the cost of cross training and maintaining those skills.
  • The internet is the first stop when a development problem is encountered, and here the significantly larger online C# community reduces time required to resolve problems.
  • The greater industry-wide take up of C# (compared to VB) means that more developers are available to recruit.
  • Most C# developers were previously Java or C/C++ developers, and most VB developers come from a VB5/6 background. As a result the average C# developer will have more background in object oriented design (and is more likely to be to be competent in Java also).
  • I don't believe that there is much wrong per se with VB, it's the peripheral aspects such as developer background, community support, and skills availability that make the difference.
  • As a result I suggest that C# developers will, on average, be more productive than their VB counterparts, saving our company money and time.

Conclusion

The differences between VB. NET and C#, as standalone languages, are fairly minimal. C# can do very few things that VB .NET cannot, and VB .NET provides a slightly easier migration path for existing Microsoft VB developers.

However, in the context of Java being the primary language in the organisation, C# is a considerably better fit as a preferred .NET language.

Combined with C#’s status as a ratified standard this provides a strong argument to switch the statuses of VB .NET and C# within the organisation.

....

The argument is under review here still so I would appreciate any constructive commments...

Author Dave Howard

I have been involved in IT development for the last 10 years - a lot of it around desktop applications and telecoms.

Comments

Neal said:

nice paper man....

good arguments .... I've mostly been programming in Java / VB.Net myself....but you just gave me some more arguments for taking the time to teach myself C#

18/Sep/2006 12:06 PM

R.S.RAMASWAMY said:

Excellent! I would just add a few more reasons.

It can be claimed without being far off the mark, that ASP.net is the prize-offering in the DotNet platform. ASP.Net programs can bewritten in either C# or in VB.Net. However, it is better to use C#. Professional programming mostly requires C/C++/Java and C# is very much similar to these languages.Thus, it will be easier to switch over to other languages if necessary. If we want to write our program, using J# also, it will entail minimum change in style of coding..Moreover, C# is the language being actively promoted by Microsoft for certain advanced level work.

 If we want to work in ASP.net , but in Linux platform using MONO, then C#  is a ' must' at present, though in future, it may be possible to create ASP.net programs in other languages in MONO.So, it will be better to switch over to C# from VB world. 

VB.net however is only very slightly different from C# code.VB.net may seem to be the easier choice as it is the default language for 'ASP.net in Microsoft platform' and is not case-sensitive( how swiftly, things are changing! Who would have predicted that we may have to qualify ASP.net with reference to the platform?) . But, being case-indifferent is not the best way to thrive in professional software field!.

More along these lines at:

my home-page :

http://in.geocities.com/rsramsam

Another point,which should be stressed is that though there are classes in' Windows.Forms' and 'Web.Forms', bearing the same name,their behaviour is different. ( For example, Datagrid).However, a lot of C# code will work equally well in desktop as well as in ASP.net!

     ASP.net makes VB programmers , equally productive in Web-Applications as well as desktop apps.Similarly,  ASP.net ,gives the great ease of webforms and webservice to j2ee hands and  removes all hurdles. For all appearances, ASP.net programming is just like VB programming except that instead of getting the gui elements by drag and drop, we have to write some rudimentary html-like code. True, even this difference vanishes if we are using VisualStudio.net but we will be using DotNet Framework SDK only, for our lessons because it is LEGALLY free for professional development and our method will be useful even in Linux world.  And , as we are studying ASP.net in C#, 

we must write the code with case-awareness.

19/Sep/2006 09:09 AM

rs.ramaswamy said:

It can be claimed without being far off the mark, that ASP.net is the prize-offering in the DotNet platform. ASP.Net programs can bewritten in either C# or in VB.Net. However, it is better to use C#. Professional programming mostly requires C/C++/Java and C# is very much similar to these languages.Thus, it will be easier to switch over to other languages if necessary. If we want to write our program, using J# also, it will entail minimum change in style of coding..Moreover, C# is the language being actively promoted by Microsoft for certain advanced level work.

 If we want to work in ASP.net , but in Linux platform using MONO, then C#  is a ' must' at present, though in future, it may be possible to create ASP.net programs in other languages in MONO.So, it will be better to switch over to C# from VB world.  

VB.net however is only very slightly different from C# code.VB.net may seem to be the easier choice as it is the default language for 'ASP.net in Microsoft platform' and is not case-sensitive( how swiftly, things are changing! Who would have predicted that we may have to qualify ASP.net with reference to the platform?) . But, being case-indifferent is not the best way to thrive in professional software field!.

Another point,which should be stressed is that though there are classes in' Windows.Forms' and 'Web.Forms', bearing the same name,their behaviour is different. ( For example, Datagrid).However, a lot of C# code will work equally well in desktop as well as in ASP.net!

     ASP.net makes VB programmers , equally productive in Web-Applications as well as desktop apps.Similarly,  ASP.net ,gives the great ease of webforms and webservice to j2ee hands and  removes all hurdles. For all appearances, ASP.net programming is just like VB programming except that instead of getting the gui elements by drag and drop, we have to write some rudimentary html-like code. True, even this difference vanishes if we are using VisualStudio.net but we will be using DotNet Framework SDK only, for our lessons because it is LEGALLY free for professional development and our method will be useful even in Linux world.  And , as we are studying ASP.net in C#, 

we must write the code with case-awareness.

my home-page is at:

http://in.geocities.com/rsramsam

19/Sep/2006 09:14 AM

Rolls said:

Dave take a Disprin and have a lie down mate.You comment that the differences are minimal... I would go further to say the differences are mereley semantic.

 You forgot to put the real reason you prefer c sharp...(most people believe that c sharp skills are better than vb). This argument is irrelavant to your company.

Rolls

19/Sep/2006 19:44 PM

Andrew said:

"C# supports Java style code documentation – where definitions of properties and methods are commented in such a way as to make the component interfaces self documenting. VB .NET does not support this."

As much as I loathe VB.NET, you're wrong on this one, or at least working from old informaiton. VB.NET does support JavaDoc-style comments. (Unless you're stuck on .NET 1.0 or 1.1)

19/Sep/2006 20:12 PM

Smoke said:

    I flip back and forth from VB to C#, depending on the client. Of the two, I prefer C#, probably because my early experience was using C++. Personally I think you're splitting hairs and any competent developer should be able to program effectively in any of the three languages (Wouldn’t it be nice if organizations understood this and were more flexible about what languages can and cannot be used?). The biggest hurdle here is usually idiomatic design (How do I do this the [whatever language] way).

Comments about your points:

* Syntax is different, structure is pretty much the same

* Standardization: C# is still closely tied to .NET which is proprietary, so I wouldn't say it's better protected against change

* Poorly designed solutions will not go away by using C#. Some of the same design warts that existed in VB6 still exist in .NET using VB or C#.

* My experience leads me to think community support is much wider for VB, especially on MSDN. Either way I’ve never read a C# article that didn’t translate directly to VB, and vice versa.

* A background in OO design doesn't indicate the person will know OO any better than a VB6 programmer might. OO is still widely misunderstood and misused in the average business environment.

* "C# can do very few things that VB .NET cannot", the reverse is also true, VB.NET can do very few things that C# cannot. One interesting example is using the Implements statement to implement one or more interface members (i.e. 1 concrete member implementing more than 1 interface member). I don't think C# has this capability.

19/Sep/2006 20:31 PM

mooper said:

If you REALLY knew your languages, you'd know theres no difference between them. Why not study harder? Then you will realise the syntactical differences are the only differences. steeper learning curve my ass. Any developer worth a fart should know both plus java/ruby/ampco.

25/Sep/2006 11:40 AM

mark said:

Cool post but overloading SOAP to mean Summary On A Page is not cool. Just my two cents.

19/Jan/2007 22:37 PM

Michael said:

Perhaps, the greatest argument you could point out is that c# is designed to be a platform independent language, much like Java, which is what your company is aiming for right? But, I'm still fairly new to c# just recently taken it up a couple of days ago, so I'm not entirely confident about that answer.

19/Sep/2009 10:59 AM

Add Comment

Name
Comment
 

Your comment has been received and will be shown once it passes moderation.