Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

VISUAL BASIC PROGRAMMING \\ V

LESSON NO.:2
TITLE: OBJECT-ORIENTED PROGRAMMING & .NET

TERMINOLOGIES:
CLR – Common Language Runtime
FLC - .NET Framework Class Library (FCL)
CTS – Common Type System
CLS – Common Language Specification
CIL – Common Intermediate Language
MSIL – Microsoft Intermediate Language
Metadata – information associated with the managed code which describes the data and identifies the locations of object
references.
JIT – Just in Time Compiler
GC – Garbage Collector
VES – Virtual Execution System
GUI – Graphical User Interface
OOP – Object-Oriented Programming
OOP – it is a programming standard that uses object to design computer programs.
Object – defined as an instance of a class where attributes and methods are placed under a single name.
Class – defined as the model or template that can be instantiated to create an object.

DISCUSSION:

.Net is a common development platform that allows programmers to design, build, and manage applications easily and
quickly.

Benefits of using .NET:


- .NET provides a common programming environment.
- .NET implements object-oriented technologies.
- .NET simplifies programming for Windows environment.
- .NET provides enhanced security.
- .NET enhances productivity through the use of standards (e.g. XML & SOAP).
- .NET provides an enhanced Web-based development process.
- .NET simplifies application distribution.

.NET Framework
Its purpose is to create and run next-generation applications and XML (Extensive Markup Language). .NET Framework
plays an important role in making the task of developing applications easier. At the same time, it ensures that the
applications work properly with high level of security.

.NET Framework Structure


.NET Framework is an environment that allows different programming languages & libraries to work together seamlessly
to create Windows-based applications that are easier to build, manage, deploy, and integrate with other networked
\\ V
systems.

Applications written in .NET Language


Visual Basic, C++, C#, J#, etc.

.NET Framework

.NET Framework Class Library


Windows Forms classes, Web Forms classes.

Common Language Runtime


Common Type System, Intermediate Language

Operating System
Windows 98, Windows 2000, Windows XP

The .NET Framework consists of two main components: Common Language Runtime (CLR) and the .NET Framework
Class Library (FCL). CLR is the foundation of the .NET Framework. It is the part of the system that runs and
manages .NET code at runtime. The CLR converts the Intermediate Languages into native code that can be run on the
operating system. The .NET Framework Class Library is a collection of pre-written classes that can be used to create
applications to run on the windows platform or web pages.
Common Language Runtime (CLR)
The CLR is a runtime engine that executes managed code. The managed code is the equivalent set of machine instruction
of the source program that can be executed in the CLR.
.NET Framework Class Library (FCL)
It is a collection of predefined classes, interface, and value types required to create .NET applications. It is also designed
as the foundation from which all .NET Framework applications are made. The system is the core namespace that contains
fundamental classes and base classes used by every .NET Framework applications.
The Base Class Library is a part of FCL which contains standard classes that can be used by any .NET Languages. It
provides the fundamental building blocks for any application created using any of the .NET languages.

Object-Oriented Programming
OOP simulates real-world interaction. Real-world contains objects that interact with each other (i.e. phones, computers, \\ V
people, etc.) Each of these objects has their own attributes (characteristics) and operations (function or purpose). These
two elements of an object form a cohesive package.

With OOP, a problem will be broken down into a number of units and these units are called objects. The data elements in
the object are called attributes and the procedure or function is called method. Each object is capable of receiving
messages, processing data, and sending message to other object.

OOP has the following advantages over traditional programming approaches:

- OOP provides a clear modular structure for programs which makes it good for defining abstract data types where
implementation details are hidden and the unit has a clearly defined interface.
- OOP is easy to maintain and modify existing code as new objects can be created based on existing objects.
- OOP provides a good skeleton for code libraries where software components can be easily adapted and modified
by the programmer.

Object vs. Classes

To clearly understand the concepts of class and object, examine the example given below.
A vehicle can be described in terms of the following set of attributes and behaviors:

Table 1.1

CLASS: Car
OBJECT: Toyota
Attributes Behavior / Method
Transmission Type: Auto Drive()
Safety Features: TSS Brake()
Braking System: Disc Turn()

Table 1.2

CLASS: Pokemon
OBJECT: Pikachu
Attributes Behavior / Method
Attack % : 125 Attack()
Element Type: Electric Dodge()
IV: 15 15 13 Evolve()
Figure 1.1 the diagram illustrates the template for creating a box. It can be used as a pattern to draw the shape
and parts of the box; it is not yet a box.
Fundamental Concepts of OOP
Every program created using the OOP paradigm may contain or implement the following concepts:

1. Encapsulation – a programming mechanism that binds together the code and the data that it manipulates. It
keeps both data safe from outside interference and misuse.

2. Inheritance – a programming concept that describes the object capability to acquire the properties of another
object.

3. Polymorphism – from the Greek word, meaning “many forms”, it is the ability of objects of different types to
respond to methods of the same name, each one according to the right type-specific behavior.

You might also like