This blog is targeted at beginning / novice programmers for the Visual Basic (VB) language.

Saturday, March 10, 2007

What are the advantages and disadvantages of using VB.Net?

MSDN has a fairly decent comparison of VB.Net and C#. I would recommend checking out this link if you are torn between which languages to choose. http://blogs.msdn.com/csharpfaq/archive/2004/03/11/87816.aspx

Advantages

  • Option Strict – Prevents unintended type conversions. This means that you cannot accidentally assign an ‘Integer’ value to a ‘String’ variable; however, this is not always foolproof. VB.Net does allow some unintended type conversions, such as an integer value could be placed in a ‘Long’ variable.

  • Named Indexers support – Examples would be properties with parameters.

  • Support of legacy keywords – Although some keywords have either been discontinued or their usages completely changed there still remains a huge amount of support of legacy keywords; this is useful for converting legacy projects to the current language specifications. Many will say that the VB.Net conversion wizard has many pitfalls; this is true, however, it does provide a starting point in the conversion process that many other languages do not provide.

  • Handling Pointers indirectly – This provides less opportunity of instability in the produced application; aka produced applications are more secure and stable.
    Cannot handle unmanaged code – This provides a more stable and secure production of code.

  • Easy to use Rapid Application Design (RAD) interface – Within a matter of minutes a complete Graphical User Interface (GUI) can be produced; thus requiring less programming time and less design time.

  • Project wizards – When creating a new project, or just adding a new form or button, the environment will automatically generate the default coding to have the objects appear; in some cases there are wizards that can provide default coding to have some functionality within the application. This translates to a working application can be designed and coded in a fraction of time than some other languages.

  • Large Talent Pool – Since there are so many programmers that know VB you can have a fairly easy time discussing obstacles you run across in your programming and find ideas on how to bypass them; in the same token you may also find a larger number of books that cover a wide variety of topics (general and specialty) and there are an enormous number of websites that cover a wide variety of topics and other means of support.


Disadvantages
  • Cannot handle pointers directly – This can be a disadvantage because there is more required coding and thought to handle a pointer. Additional coding results in additional CPU cycles; which in turn requires additional processing time; which results in slower applications.

  • Large Talent Pool – Since VB is so easy to learn there is a significantly larger pool of competition; thus, there can be more programmers applying for the same employment or project and this can ultimately drive the market value of the programmer’s services down.

  • Intermediate Language (IL) compilation – These types of compilers can be easily decompiled (aka Reverse Engineered); there is little that can be done to deter decompiling of the application, and nearly nothing that can be done to prevent it.

  • Just-In-Time (JIT) compiler – JIT compiling is the way the computer can interpret the IL compilation. This is essential to running the application. This means the target computer will be required to have JIT and that the application can receive performance degradation because of the extra CPU cycles required to use JIT.

  • Large Libraries – Because VB is an IL there is a large number of libraries required for the JIT compiler to interpret the application. Large libraries require more hard drive space, more computing time and most of all it can be a nuisance if the application is being deployed over the internet and the user must obtain these libraries in addition to the files of the compiled application.


These are just some of the advantages and disadvantages of using VB. You will find during your course of time in the programming world there are many opinions and each will have strong cases as to why to use or not use VB. I think the MSDN web article, before mentioned, says it best in that when comparing C# with VB.Net that it is a personal preference. In particular you should keep in mind that both languages have access to the same libraries and .Net structures. It will ultimately come down to syntax choices and in some cases what resources are available to you to learn the language. In both case commit to the language and look to learn others in the future to compliment what you already know.

No comments: