Page 13 - Open Soource Technologies 304.indd
P. 13

Modern Programming Tools & Techniques-III



                      Notes         beginners. There are people who criticize VB.NET because of the simplicity of the syntax, but
                                    VB.NET has the ability to create very powerful and sophisticated applications. VB.NET is a great
                                    place to start because of how easy and straight forward it is. The syntax is easy and you will not
                                    find yourself writing hundreds of lines of code as there are many shortcuts that make coding so
                                    much easier in this language.

                                    Let’s take a look at the VB.NET syntax. The purpose of typing code is to instruct the application
                                    what to do. It’s not as easy as typing “Hey application, multiply 5 by 83 but it’s pretty darn close!
                                    If you wanted to tell your application to show a Message Box telling you that
                                    HowToStartProgramming.com is awesome, this would be the code you would use:

                                    MessageBox.Show(“HowToStartProgramming.com is awesome”)
                                    Microsoft Visual Basic .NET is a programming environment used to create Graphical User
                                    Interface (GUI) applications for the Microsoft Windows family of operating systems. It usually
                                    ships in two types, either by itself or as part of Microsoft Visual Studio .NET. To use the lessons
                                    on this site, you must have installed either Microsoft Visual Basic .NET 2003 or Microsoft Visual
                                    Studio .NET 2003. After installing Microsoft Visual Studio .NET 2003, to use the programming
                                    environment, you must first open it. To do that, you would click Start -> (All) Programs ->
                                    Microsoft Visual Studio .NET 2003 -> Microsoft Visual Studio .NET 2003.
                                    In the early days of Microsoft DOS, there was a language called Basic. It provided a simplified
                                    and easy way to create small applications using words very close to the English language. Since
                                    the language was easy, it became popular with the help of Microsoft operating systems gaining
                                    ground. To continue this tendency and provide more support for Basic, Microsoft used that
                                    language as the platform to create Graphical User Interface (GUI) applications. Once again, this
                                    move was welcomed and the language became the widely accepted Visual Basic. The Microsoft
                                    Visual Basic programming environment became very popular for its ease of use and it was a
                                    candidate for serious productive applications. Because Visual Basic was not tied to the operating
                                    systems low-level operations, its programmers had to use library calls to access functions of the
                                    Win32 Application Programming Interface (API), the library that “defines” Microsoft Windows.
                                    This also accentuated the difference with other programming environments like Microsoft
                                    Visual C++ or other libraries like Microsoft Foundation Class (MFC). In fact, although Microsoft
                                    shipped Visual Studio 6 that combined various programming environments with different
                                    languages (Visual Basic, C++, ASP, Win32, etc), the only real thing they had in common was that
                                    they shipped in the same box (and the same DVD). To unify the various languages or programming
                                    environments that Microsoft had developed for many years, the company created a new library
                                    aside from Win32. This was the birth of the .NET Framework. This library is used by, or shared
                                    among, different programming languages or environments so that programmers can benefit
                                    from a better collaboration. Now it is possible for people who “speak”, that is, people who
                                    program in, different languages to work on the same project with less regard for compatibility
                                    issues. This is because (most of) the functions, classes, and resources, are used in conceptually the
                                    same way in the different languages. Microsoft Visual Basic .NET is Microsoft’s implementation
                                    of the .NET Framework for Visual Basic programmers. Although Visual Basic .NET is a “child”
                                    of Visual Basic 6.0, there are many differences that can be interpreted as a complete shift, with a
                                    lot of improvements. Because of these differences, many already Visual Basic 6.0 programmers
                                    resisted the move to this new environment (there were also many other considerations) but
                                    those programmers are catching up.

                                    1.3.1 Common Language Runtime

                                    The CLR is the execution engine for the .NET Framework. This runtime manages all code
                                    compiled with VB.NET. In fact, code compiled to run under .NET is called managed code to
                                    distinguish it from code running outside of the framework. Besides being responsible for




            6                                LOVELY PROFESSIONAL UNIVERSITY
   8   9   10   11   12   13   14   15   16   17   18