vb.net

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Introduction to .

net framework
Introduction to .NET Framework

• The .NET Framework is a software development platform that was


introduced by Microsoft in the late 1990 under the NGWS. On 13
February 2002, Microsoft launched the first version of the .NET
Framework, referred to as the .NET Framework 1.0.
• In this section, we will understand the .NET Framework,
characteristics, components, and its versions.
.NET Framework
• It is a virtual machine that provide a common platform to run an application
that was built using the different language such as C#, VB.NET, Visual Basic,
etc. It is also used to create a form based, console-based, mobile and web-
based application or services that are available in Microsoft environment.
• Furthermore, the .NET framework is a pure object oriented, that similar to
the Java language.
• But it is not a platform independent as the Java. So, its application runs only
to the windows platform.

• The main objective of this framework is to develop an application that can


run on the windows platform. The current version of the .Net framework is
4.8.
Components of .NET Framework
There are following components of .NET Framework:
• CLR (Common Language Runtime)
• CTS (Common Type System)
• BCL (Base Class Library)
• CLS (Common Language Specification)
• FCL (Framework Class Library)
• .NET Assemblies
• XML Web Services
• Window Services
CLR (common language runtime)
• It is an important part of a .NET framework that works like a virtual
component of the .NET Framework to executes the different languages
program like c#, Visual Basic, etc.
• A CLR also helps to convert a source code into the byte code, and this byte
code is known as CIL (Common Intermediate Language) or MSIL (Microsoft
Intermediate Language). After converting into a byte code, a CLR uses a JIT
compiler at run time that helps to convert a CIL or MSIL code into the
machine or native code.
CTS (Common Type System)
• It specifies a standard that represent what type of data and value
can be defined and managed in computer memory at runtime. A
CTS ensures that programming data defined in various languages
should be interact with each other to share information. For
example, in C# we define data type as int, while in VB.NET we
define integer as a data type.
BCL (Base Class Library)
• The base class library has a rich collection of libraries features
and functions that help to implement many programming
languages in the .NET Framework, such as C #, F #, Visual C ++,
and more. Furthermore, BCL divides into two parts:
• CLS (Common language Specification)
It is a subset of common type system (CTS) that defines a set of rules and
regulations which should be followed by every language that comes
under the .net framework. In other words, a CLS language should be
cross-language integration or interoperability. For example, in VB.NET it is
not end with semicolon, and when these statements execute in .NET
Framework, it provides a common platform to interact and share
information with each other.
• It provides the various system functionality in the .NET Framework, that
includes classes, interfaces and data types, etc. to create multiple
functions and different types of application such as desktop, web, mobile
application, etc.
Microsoft .NET Assemblies
A .NET assembly is the main building block of the .NET Framework. It is
a small unit of code that contains a logical compiled code in the Common Language
infrastructure (CLI), which is used for deployment,
security and versioning. It defines in two parts (process) DLL and library
(exe) assemblies. When the .NET program is compiled, it generates a
metadata with Microsoft Intermediate Language, which is stored in a file called Assembly.
FCL (Framework Class Library)
It provides the various system functionality in the .NET Framework, that includes classes,
interfaces and data types, etc. to create multiple functions and different types of application
such as desktop, web, mobile application, etc. In other words, it can be defined as, it provides
a base on which various applications, controls and components are built in .NET Framework.
Key Components of FCL
1. Object type
2. Implementation of data structure
3. Base data types
4. Garbage collection
5. Security and database connectivity
6. Creating common platform for window and web-based application
•Garbage Collection (GC): It is used to provide the Automatic Memory
Management feature.
Just In Time Compiler (JIT): It is responsible for converting the Common
Intermediate Language (CIL) into machine code or native code using the
Common Language Runtime environment

•Windows Forms is a smart client technology for the .NET Framework, a set of
managed libraries that simplify common application tasks such as reading and
writing to the file system.

•ASP.NET is a web framework designed and developed by Microsoft. It is used


to develop websites, web applications, and web services. It provides a fantastic
integration of HTML, CSS, and JavaScript. It was first released in January 2002.

•ADO.NET is a module of .Net Framework, which is used to establish a


connection between application and data sources. Data sources can be such as
SQL Server and XML. ADO .NET consists of classes that can be used to connect,
retrieve, insert, and delete data.
Intermediate language (IL)
• Intermediate language (IL) is an object-oriented programming language
designed to be used by compilers for the .NET Framework before static or
dynamic compilation to machine code.
• The IL is used by the .NET Framework to generate machine-independent
code as the output of compilation of the source code written in any .NET
programming language.
• As IL is used for automatic generation of compiled code, there is no need
to learn its syntax.
LINQ (Language Integrated Query)
• It is a query language, introduced in .NET 3.5 framework. It is used to
• make the query for data sources with C# or Visual Basics programming
• languages.
• Just-In-Time Compilation:
The process of converting the just-in-time compilation of CIL to
machine code translation This is done by the JIT compiler (JIT or Jitter)
in the world of .NET, which is a part of Common Language Runtime
• JIT store compiled code in dynamic memory This means that if you run
it twice, you will compile your application twice
There are two types of JIT compilers available in the latest .NET
Framework version.
General - JIT compiler. This is the compiler that I have described above.
It compiles methods in runtime as needed.
Pre-JIT compiler It compiles the entire assembly before being used.
Usually the compilation application occurs during deployment. You can
pre-compile the assembly using the Ngen.exe tool (Original Image
Generator).
Features of .NET Framework
1. Less Coding and Increased Reuse of Code
.Net framework supports Object-oriented programming (OOP) languages,
which eliminates unnecessary codes and involves less coding. .NET consists of
reusable code and many reusable components. This translates into less time
and consequently less cost to develop applications.
2. Language-independent
.NET framework allows to develop Desktop, Web, Mobile and Console based
applications. Also, it’s promoted as a language-independent framework, which
means that development can happen in several compliant languages that
include C#, VB.NET, etc.
3. Used for Service-Oriented Architecture
.NET is often used for Web Services, WCF and Web API creation; which helps
create REST API and SOAP based services that can communicate and transmit
data utilizing standard Internet protocols.
4.Easy Versioning & Deployment Process
With features like no-impact applications, private components, controlled code
sharing, side-by-side versioning and partially trusted code, .NET framework makes
deployment easier post development. The code execution environment supports
safe code execution that minimizes software deployment and versioning conflicts.
Moreover, it eliminates the performance problems of scripted or interpreted
environments as well.

5. Security
.NET offers enhanced application security as web applications developed
usingASP.NET have Windows confirmation and configuration. Managed code and
CLR offer safeguard features like ‘role-based security’ and ‘code access security’.

6. Multi-tiered Software Architecture


.NET makes use of multi-tiered software architecture. It is known as multi-tiered
because it physically separates functions for presentation, business logic and data
management. It helps developers to build flexible applications. Moreover,
developers also can add or edit a layer without being required to transform on the
whole app.
Feature-rich
There are a variety of features which will be explored by the developers to make
powerful apps. But then .NET Framework has been found to be a great platform for
re-designing current applications in order to make it line up with the growing needs
of an organization as well. For this, let us consider the case of its ‘rich toolbox’ and
the ‘Designer’ in the visual studio. They let you access features such as automatic
deployment, WYSIWYG editing, and drag-and-drop controls, etc. Any third-party
control integration is also easily achievable with .Net Framework.
8. Caching & Exception Handling
The caching & exception handling features in .Net system, make your code more
robust and easier-to-use. Types of applications that can be created with .NET
1. Desktop Applications:
2. Mobile Application
3. Service-oriented Applications
• Visual Basic (VB) is an event-driven programming language from
Microsoft that provides a graphical user interface (GUI) which allows
programmers to modify code by simply dragging and dropping
objects and defining their behavior and appearance. VB is derived
from the BASIC programming language and is considered to be
event-driven and object-oriented.
Introduction
• The VB.NET stands for Visual Basic. Network Enabled Technologies. It is a
simple, high-level, object-oriented programming language developed by
Microsoft in 2002. It is a successor of Visual Basic 6.0, that is
implemented on the Microsoft .NET framework.
• Furthermore, it supports the OOPs concept, such as abstraction,
encapsulation, inheritance, and polymorphism.
• Therefore, everything in the VB.NET language is an object, including all
primitive data types (Integer, String, char, long, short, Boolean, etc.), user-
defined data types, events, and all objects that inherit from its base class.
• It is not a case sensitive language, whereas, C++, Java, and C# are case
sensitive language.
• Applications built using the VB.NET language are very reliable and
scalable, relying on the .NET Framework to access all libraries that help to
execute a VB.NET program.
• With this language, you can develop a fully object-oriented application
that is similar to an application created through another language such as
C++, Java, or C#.
• In addition, applications or programs of VB.NET are not only running on
the window operating system but can also run on Linux or Mac OS.
• The VB.NET language is designed in such a way that any new beginner or
novice and the advanced programmer can quickly develop a simple,
secure, robust, high performance of web, windows, console, and mobile
application running on .NET Framework.
Integrated Development Environment - .NET (IDE)
• Visual Studio is integrated with .NET and includes the features of
language specific environments, from one of its earlier versions (VS
6.0).
• It provides a single workspace consisting of a multiple-document
interface in which activities related to code development such as
editing, compiling, debugging, etc. is easily possible.
• The main facility that this IDE provides is form creation during design-
time. By placing the controls in the layout the display of the application
can be rendered at runtime.
• Hence, IDE provides simpler way of building applications in lesser time.
VB.NET Features
oAs we know, it is a high-level programming language with many features to
develop a secure and robust application. These are the following features
that make it the most popular programming language.
oIt is an object-oriented programming language that follows various oops
concepts such as abstraction, encapsulation, inheritance, and many more.
oIt means that everything in VB.NET programming will be treated as an
object.
oThis language is used to design user interfaces for window, mobile, and
web-based applications.
oIt supports a rapid application development tool kit. In which a developer
does not need to write all the codes as it can get various code
automatically from its libraries.
oFor example, when we create a form in Visual basic.net, it automatically
calls events of various form in that class.
• It is not a case sensitive language like other languages such as C++, java,
etc.
• It supports Boolean condition for decision making in programming.
• It also supports the multithreading concept, in which you can do multiple
tasks at the same time.
• It provides simple events management in .NET application.
• A Window Form enables us to inherit all existing functionality of form that
can be used to create a new form. So, in this way, it reduced the code
complexity.
• It uses an external object as a reference that can be used in a VB.NET
application.
• Automatic initialized a garbage collection.
• It follows a structured and extensible programming language for error
detection and recovery.
• Conditional compilation and easy to use generic classes.
• It is useful to develop web, window, and mobile applications.
Advantages of VB.NET
• The VB.NET executes a program in such a way that runs under CLR (Common
Language Runtime), creating a robust, stable, and secure application.
• It is a pure object-oriented programming language based on objects and
classes. However, these features are not available in the previous version of
Visual Basic 6. That's why Microsoft launched VB.NET language.
• Using the Visual Studio IDE, you can develop a small program that works
faster, with a large desktop and web application.
• The .NET Framework is a software framework that has a large collection of
libraries, which helps in developing more robust applications.
• It uses drop and drag elements to create web forms in .NET applications.
• However, a Visual Basic .NET allows to connect one application to another
application that created in the same language to run on the .NET framework.
• A VB.NET can automatically structure your code.
• The Visual Basic .NET language is also used to transfer data between
different layers of the .NET architecture such that data is passed as simple
text strings.
• It uses a new concept of error handling in the Visual Basic .NET Framework
• Disadvantages of VB.NET
• The VB.NET programming language is unable to handle pointers directly..
• The VB.NET programming is easy to learn, that increases a large competition
between the programmers to apply the same employment or project in
VB.NET. Thus, it reduces a secure job in the programming field as a VB.NET
developer.
• It uses an Intermediate Language (IL) compilation that can be easily
decompiled (reverse engineered), but there is nothing that can prevent an
application from disintegrating.
• Just-In-Time (JIT) compiler: It is the process through which a computer can
interpret IL (intermediate language) compilation and is also required to run
your application. It means that the target computer needs a JIT compiler to
interpret a source program in IL, and this interpretation requires an
additional CPU cycle that degrades the performance of an application.
• It contains a large collection of libraries for the JIT compiler that helps to
interpret an application. These large libraries hold a vast space in our system
that takes more computing time.
Introduction to Visual Studio
Visual Studio is an Integrated Development Environment(IDE) developed by Microsoft to
develop GUI(Graphical User Interface), console, Web applications, web apps, mobile apps,
cloud, and web services, etc. With the help of this IDE, you can create managed code as well
as native code. It uses the various platforms of Microsoft software development software like
Windows store, Microsoft Silverlight, and Windows API, etc.
It is not a language-specific IDE as you can use this to write code in C#, C++, VB(Visual Basic),
Python, JavaScript, and many more languages. It provides support for 36 different
programming languages. It is available for Windows as well as for macOS.
Evolution of Visual Studio: The first version of VS(Visual Studio) was released in 1997,
named as Visual Studio 97 having version number 5.0. The latest version of Visual Studio is
15.0 which was released on March 7, 2017. It is also termed as Visual Studio 2017. The
supported .Net Framework Versions in latest Visual Studio is 3.5 to 4.7. Java was supported in
old versions of Visual Studio but in the latest version doesn’t provide any support for Java
language.
Debugger
• Visual Studio includes a debugger that works both as a source-level
debugger and as a machine-level debugger.
• It works with both managed code as well as native code and can be used for
debugging applications written in any language supported by Visual Studio. In
addition, it can also attach to running processes, monitor, and debug those
processes. If source code for the running process is available, it displays the
code as it is being run.
• The Visual Studio debugger can also create memory dumps as well as load
them later for debugging.
• The Visual Studio Debugger allows setting breakpoints (which allow execution
to be stopped temporarily at a certain position) and watches (which monitor
the values of variables as the execution progresses).
• Breakpoints can be conditional, meaning they get triggered when the
condition is met. Code can be stepped over, i.e., run one line (of source code)
at a time.
Designer
Visual Studio includes a host of visual designers to aid in thedevelopment of applications.
These tools include:
Windows Forms Designer
The Windows Forms designer is used to build GUI applications using
Windows Forms. Layout can be controlled by housing the controls inside other containers or
locking them to the side of the form.
The UI is linked with code using an event-driven programming model. The designer generates
either C# or VB.NET code for the application.
WPF Designer
Like the Windows Forms designer it supports the drag and drop metaphor. It is used to author
user interfaces targeting Windows Presentation Foundation. It supports all WPF functionality
including data binding and automatic layout management. It generates XAML code for the UI.
the designer-oriented
product.
Web designer/development
Visual Studio also includes a web-site editor and designer that allows web pages to be
authored by dragging and dropping widgets. It is used for developing ASP.NET applications
and supports HTML, CSS and JavaScript. There is also ASP.NET MVC support for MVC
technology as a separate download and ASP.NET Dynamic Data project available from
Microsoft.
Class designer
The Class Designer is used to author and edit the classes (including its members and their
access) using UML modeling. The Class Designer can generate C# and VB.NET code outlines for
the classes and methods. It can also generate class diagrams from hand-written classes.
Data designer
The data designer can be used to graphically edit database schemas, including typed tables,
primary and foreign keys and constraints. It can also be used to design queries from the
graphical view.
Solution Explorer
In Visual Studio parlance, a solution is a set of code files and other resources that are used to
build an application. The files in a solution are arranged hierarchically, which might or might
not reflect the organization in the file system. The Solution Explorer is used to manage and
browse the files in a solution.
Team Explorer
Team Explorer is used to integrate the capabilities of Azure DevOps
into the IDE. In addition to version control integration it provides the ability to view and
manage individual work items (including user stories, bugs, tasks and other documents). It is
included as part of a Visual Studio installation and is also available as a standalone download.
Data Explorer
Data Explorer is used to manage databases on Microsoft SQL Server
instances. It allows creation and alteration of database tables (either by
issuing T-SQL commands or by using the Data designer). It can also be used to
create queries and stored procedures, with the latter in either T-SQL or in
managed code via SQL CLR. Debugging and IntelliSense support is available as
well.
Server Explorer
The Server Explorer tool is used to manage database connections on an
accessible computer. It is also used to browse running Windows Services,
performance counters, Windows Event Log and message queues and use
them as a data source.

You might also like