1. Purpose
The purpose of this document is to make initial recommendations based on a comparative analysis of VC++, VB.NET and C# for development of Blu Ray Disc authoring application. The document first talks about features of VC++, VB.NET and C#. Then it compares the pros and cons of each development environment with respect to various evaluation criteria. Recommendation follows in the later section.
2. Introduction
2.1. VB.NET
Visual Basic .NET as its predecessor Visual Basic inherits the RAD (Rapid Application Development) infrastructure. It leverages the understanding of the developers’ existing knowledge of Visual Basic to create application with .NET Framework.
With Visual Basic .NET, rapid application development is taken to the next level by leveraging the skills Visual Basic developers already possess and enabling them to address any programming task using paradigms that are both familiar and intuitive.
VB.NET enables the developers to
Ø Build rich desktop applications using Microsoft Windows Forms
Ø Offers flexible and simplified data access mechanism.
Ø Create broad-reach Web and mobile Web applications
Ø Develop non-visual business logic components, including XML Web services
Ø Supports Object Oriented Programming
Ø Easier to build web based applications.
Ø All the classes in the .NET Framework support VB.NET
2.2. C#
Visual C# (VC# or just C# as it is called) is a strongly typed object oriented language designed to give the optimum blend of simplicity, expressiveness and performance. C# and .NET are a little symbiotic: Some features of C# are there to work well with .NET and some features of .NET are there to work well with C#. C# is easy to write, read and maintain like Visual Basic and offers the power and flexibility of C++.
Following are some key features of C#
Ø It is a simple and powerful programming language for writing enterprise edition applications.
Ø It helps developers to easily build web services that can be used across the Internet through any language on any platform.
Ø It helps the developer write fewer lines of code to implement the same functionaliy that will lead to fewer errors in code.
Ø It introduces considerable improvement and innovations in areas such as type safety, versioning, events and garbage collection.
Ø Can be used to develop enterprise applications on the Web or Client server applications.
Ø It comes with the powerful distributed object model (Remoting) and supports XML web services natively.
2.3. VC++ (Referred to as Unmanaged C++ in .NET documentation)
Ø Because VC++ does not take advantage of the services provided by the EE (Execution Engine) or Run Time, it often runs faster than C#. But this is a significant advantage only in case of low level programming rather than GUI development.
Ø It can call Win32 API's (such as DirectX to access and render video/audio content) and other existing code without the additional transition overhead required by EE such as using managed marshalers.
Ø VC++ IDE supports the development of applications as well as the low-level modules (like drivers).
Ø It will live for a long time because there will be times when you will have to develop components in C++ and then use Interop services (provided by .NET framework) to access them from a .NET application.
Ø It provides good framework support for COM (Component Object Model)/DCOM (Distributed Component Object Model).
Ø VC++ code execution will be on an unmanaged memory space, where as C# code runs on safe, managed application domains.
3. Comparison Matrix
Key Parameter |
Wght (W) |
VB.NET |
C# |
VC++ |
Rapid Application Development (RAD) Or Time to Market |
35 |
High VB is best known for RAD. It has large developer base in the industry and enables rapid development. |
Medium-High It is a new language and has a comparatively smaller developer base in the industry. |
Low-Medium It is a language for low-level programming. GUI development will take comparatively more time. |
Rating(R) |
|
5 |
4 |
3 |
Weighted Rating |
|
175 |
140 |
105 |
Cost Saving |
35 |
High Needs lesser development effort and a short learning curve. Therefore cost saving is high. |
Medium-High Cost saving is intermediate between VB .NET and VC++. Depending on the nature of application and its complexity, it may be closer to that of VB .NET or VC++. |
Medium Cost saving is the least because the development effort is considerably higher. |
Rating(R) |
|
5 |
4 |
3 |
Weighted Rating |
|
175 |
140 |
105 |
Performance |
20 |
Medium VB code is slightly slower than C# because in some instances it generates more lines of MSIL (Microsoft Intermediate Language) code. This difference in performance may not be visible in many applications. |
Medium-High C# code is slightly faster but difference may be insignificant because both VB.NET and C# code get converted into MSIL eventually. |
Medium-High VC++ code is faster than both C# and VB but the difference in performance across VC++, C# and VB may be insignificant in case of GUI development. |
Rating(R) |
|
3 |
4 |
4.5 |
Weighted Rating |
|
60 |
80 |
90 |
Scalability and Interoperability |
15 |
High VB.NET and C# scale equally well because this is supported by CLR (Common Language Runtime) |
High VB.NET and C# scale equally well because this is supported by CLR |
High Scalability is slightly better because of MFC. But this may be insignificant for GUI development. |
Rating(R) |
|
5 |
5 |
5 |
Weighted Rating |
|
75 |
75 |
75 |
Availability of Information And Support |
10 |
Medium-High Documentation, technical support and sample source code are available from newsgroups/developer communities such as MSDN (Microsoft Developer Network). |
Medium-High Documentation, technical support and sample source code are available from newsgroups/developer communities such as MSDN (Microsoft Developer Network). |
Medium-High Documentation, technical support and sample source code are available from newsgroups/developer communities such as MSDN (Microsoft Developer Network). |
Rating(R) |
|
4 |
4 |
4 |
Weighted Rating |
|
40 |
40 |
40 |
IDE Support |
5 |
High Has good support for IDE. E.g. Intellisence |
Medium-High IDE support is not as good as VB.NET. |
High Well-developed and proven IDE. |
Rating(R) |
|
4.5 |
4 |
5 |
Weighted Rating |
|
27.5 |
20 |
25 |
Well Structured |
10 |
High Can write structured code in VB. |
High Can Write structured code in C# |
High Can Write structured code in VC++ |
Rating(R) |
|
5 |
5 |
5 |
Weighted Rating |
|
50 |
50 |
50 |
Reliability/Maintenance |
30 |
High Because Memory management and object life cycle management is automatically handled, it is easier to write more reliable and maintainable code. Good inline documentation support |
High Because Memory management and object life cycle management is automatically handled, it is easier to write more reliable and maintainable code. Good inline documentation support |
Medium Although it has good inline documentation, programmer needs to manage memory and object life cycle himself and therefore it is more difficult to write reliable and maintainable code. |
Rating(R) |
|
5 |
5 |
3 |
Weighted Rating |
|
150 |
150 |
90 |
Ease of Development |
30 |
High
|
Medium-high
|
Medium
|
Rating(R) |
|
5 |
4 |
3.5 |
Weighted Rating |
|
150 |
120 |
105 |
Support for Object Oriented Programming |
15 |
Medium Even though VB.NET supports object oriented programming, it would be difficult for old VB developers to switch to this new paradigm. |
High C# is designed for object oriented programming and developer community is mostly made up of previous C++, Java developers. |
High VC++ is designed for object-oriented programming. |
Rating(R) |
|
3 |
5 |
5 |
Weighted Rating |
|
45 |
75 |
75 |
Microsoft Commitment |
20 |
High VB brought huge success to Microsoft and now it has a large user and developer community. Hence Microsoft is committed to this in the future as well. |
High This is designed for .NET development and has inherent features. Microsoft is equally committed to increase its usage. |
High VC++ will live for a long time because there will be times when you will have to develop components in C++ and then use Interop services to access them from .NET application. Microsoft is equally committed to its usage in low-level programming. |
Rating(R) |
|
5 |
5 |
5 |
Weighted Rating |
|
100 |
100 |
100 |
Support on other platforms |
20 |
Low It is very less probable that VB will be supported on other platforms when CLR becomes available and therefore VB is not highly portable |
High C# will be supported on other platforms when CLR becomes available. |
Low It is tied to Windows. Raw C++ can be used in different environments. |
Rating(R) |
|
1 |
5 |
2 |
Weighted Rating |
|
20 |
100 |
40 |
GRAND TOTAL |
|
1067.5 |
1090 |
900 |
4. Scenarios
4.1. Scenario 1 – Speed and cost of application development.
If one wants to choose the language that aids rapid application development, the natural choice would be VB.NET or C# because of its simplicity and familiarity among the developer community. Still C# is a fairly new language and it has not yet become popular among developers. At the same time you can get the advantage of rich GUI in C#. You can avoid the development complexity of VC++.
4.2. Scenario 2 – Performance.
VC++ gives the best performance in any development, but it is not a RAD tool. In case of GUI, we can achieve almost same performance using VB.NET or C#. Theoretically both VB.NET and C# offer similar performance levels because both these languages compile the code into MSIL code which is then executed by CLR. But number of lines of MSIL code generated by C# will be slightly lesser because it uses a technique called reflection. For most practical applications the difference in performance would be negligible.
4.3. Scenario 3 – Scalability and Interoperability.
VC++ is very much scalable. Also code written in VC++ can interoperate with code written in VB.NET/C# or vice versa. We can develop complex computation intensive code in VC++ (resulting in superior performance) and GUI in VB.NET and/or C#. All the .NET compliance languages use the same CLR/CTS (Common Type System), so that interoperability is not an issue. As VB.NET and C# are supported by CLR, it doesn’t make any difference in terms of scalability and interoperability whether VB.NET or C# is chosen.
5. Initial Recommendations
To sum up, all the three languages have their own advantages and disadvantages. VC++ is a good choice for time critical computation intensive code and therefore will give better performance. For GUI design, both VB.NET and C# on the whole do equally well. When it comes to taking advantage of the .NET features, C# is a little ahead as it conforms to OOAD standards.
We could use a good mix of VC++ and C# (and/or VB .NET) for development purposes. This will help us reduce development effort/time using the .NET features and also get the expected performance in low level modules.
'백엔드기술 > 개발언어' 카테고리의 다른 글
Modularization (0) | 2009.12.09 |
---|---|
값이 오버플로우되는지 확인하기 - checked (0) | 2009.03.24 |
C# 정규식 예제 (1) | 2009.03.17 |