Вы находитесь на странице: 1из 8

LPU

ASSIGNMENT
NO1 OF
MODERN
PROGRAMMING
TOOLS &
TECHNIQUES III
SUBMITTED TO SUBMITTED

BY

DEEPAK MEHTA VARUN KATOCH

E3801B53
Q1.“The architecture of .Net Framework support Application isolation,

Data Security & Interoperation among various languages”. Is this

statement true? If yes then prove the manner in which it is

actually implemented in VB.Net.

ANSWER:-Yes according to me this statement is 100% true, Because In

.net framework it consist of many languages which follows the oop

concept, where we use the classes, objects, and the mechanism of

encapsulation where the data remains very secure in it.

.Net is a kind of framework where we are able to design the windows

as well as web application with console based or with GUI

interface.

NOTE:- According to the question due to the oops mechanism the data

remain secure in it.

Q2. Analyse Byte code vs. Binary code vs. MSIL. ? Write in detail the

role of Language compiler & CLR in the whole process. Analyse &

compare JVM with CLR. Give specific examples. Also compare

other features of JAVA & VB.NET language.

ANSWER 2:-
BYTE CODE:-
IT is a kind of term which is being used to denote various
forms of instruction,IT is also being suitable for further compilation into
machine code. Byte codes are compact numeric codes, constants, and
references (normally numeric addresses) which encode the result of
parsing and semantic analysis of things like type, scope, and nesting
depths of program objects. They therefore allow much better
performance than direct interpretation of source code.
A byte code program is normally executed by parsing the instructions
one at a time. This kind of byte code interpreter is very portable. Some
systems, called dynamic translators, or "just-in-time" (JIT) compilers,
translate byte code into machine language as necessary at runtime:
this makes the virtual machine unportable, but doesn't lose the
portability of the byte code itself.

BINARY CODE:-
Binary code is the system of representing text or computer processor
instructions by the use of the binary number system's two-binary digits
"0" and "1". this is generally used computing and telecommunication,
binary code is used for any of a variety of methods of encoding data,
such as character strings, into bit strings. Those methods may be
fixed-width or variable-width.
In a fixed-width binary code, each letter, digit, or other character, is
represented by a bit string of the same length; that bit string,
interpreted as a binary number, is usually displayed in code tables in
octal, decimal or hexadecimal notation.
There are many character sets and many character encodings for
them.
A bit string, interpreted as a binary number, can be translated into a
decimal number.

MSIL:-
IT is known as Microsoft Intermediate Language, IT is the lowest-level
human-readable programming language defined by the Common
Language Infrastructure specification and used by the .NET
Framework.
In this during the compilation of .NET programming languages, the
source code is translated into CIL code rather than platform or
processor-specific object code. CIL is a CPU- and platform-independent
instruction set that can be executed in any environment supporting the
Common Language Infrastructure (either the .NET runtime on Microsoft
Windows operating system, or the independently derived Mono, which
also works on Linux or Unix-based operating systems). CIL code is
verified for safety during runtime, providing better security and
reliability than natively compiled binaries.
NOTE:-

CIL was originally known as Microsoft Intermediate Language (MSIL)

during the beta releases of the .NET languages. Due to

standardization of C# and the Common Language Infrastructure,

the byte code is now officially known as CIL. Because of this

legacy, CIL is still frequently referred to as MSIL, especially by

long-standing users of the .NET languages.

ROLE OF LANGUAGE COMPILER:-

Generally the compiler convert the whole statements into the machine
level language, So that it is easily read by the machine,and if there is
an any error then it shoud inform us to correct it,each and very
language consist of its own compiler.
ABOUT CLR:-

CLR is stands for common language run time It is a core component of


Microsoft's .NET initiative. Its a Microsoft's implementation of the
Common Language Infrastructure (CLI) standard, which defines an
execution environment for program code. In the CLR, code is
expressed in a form of byte code called the Common Intermediate
Language (CIL, previously known as MSIL—Microsoft Intermediate
Language).
PROCESS OF CLR:-
Generally it is used in C# or in VB.NET compiler converts such code
into CIL code. At runtime, the CLR's just-in-time compiler converts the
CIL code into code native to the operating system. Alternatively, the
CIL code can be compiled to native code in a separate step prior to
runtime by using the Native Image Generator (NGEN). This speeds up
all later runs of the software as the CIL-to-native compilation is no
longer necessary.

ABOUT JMV:-
JNV stands for Java Virtual Machine (JVM), It is a set of computer
software programs and data structures that use a virtual machine
model for the execution of other computer programs and scripts. The
model used by a JVM accepts a form of computer intermediate
language commonly referred to as Java byte code.
Programs intended to run on a JVM must be compiled into a
standardized portable binary format, which typically comes in the form
of .class files. A program may consist of many classes in different files.
For easier distribution of large programs, multiple class files may be
packaged together in a .jar file (short for Java archive).
The JVM runtime executes .class or .jar files, emulating the JVM
instruction set by interpreting it, or using a just-in-time compiler (JIT)
such as Sun's HotSpot. JIT compiling, not interpreting, is used in most
JVMs today to achieve greater speed. Ahead-of-time compilers that
enable the developer to precompile class files into native code for a
particular platforms also exist.
Like most virtual machines, the Java Virtual Machine has a stack-based
architecture akin to a micro controller/microprocessor. However, the
JVM also has low-level support for Java-like classes and methods, which
amounts to a highly idiosyncratic memory model and capability-based
architecture.
The JVM, which is the instance of the 'JRE' (Java Runtime Environment),
comes into action when a Java program is executed. When execution is
complete, this instance is garbage-collected. JIT is the part of the JVM
that is used to speed up the execution time. JIT compiles parts of the
byte code that have similar functionality at the same time, and hence
reduces the amount of time needed for compilation.

Q3. With example elaborate how various types of applications viz.

Console, Windows, Web & mobile Applications can be create in

VB.Net.

ANSWER3:-

CONSOLE BASED APPLICATIONS:-


A console application is a computer program designed to be used via a
text-only computer interface, such as a text terminal, the command
line interface.
here we don't have any graphical user interface.

WINDOW:-
Window applications is made on Window Forms,Its totally based on
what we are going to developed or what we are going to build. It is
totally based on user interface and they come with a rich set of
classes. Forms allow us to work visually with controls and other items
from the toolbox. In VB .NET forms are based on the Sys
tem .For this just select the option window and click over it,Once you
click OK a new Form opens with the title, Form1, towards the top-left
side of the form and maximize, minimize and close buttons towards
the top right of the form. The whole form is surrounded with a border.
The main area of the form in which we work is called the Client Area.
It's in this client area we design the user interface leaving all the code
to the code behind file. Forms also support events which let's the form
know that something happened with the form, for example, when we
double-click on the form, the Form load event occurs. VB .NET also
supports forms to be inherited.

Q 4 Compare & contrast VB.Net with Visual Basic6 & C#.Net. Also
elaborate the compilation & execution process of a VB.Net program.
ANSWER4:-

ABOUT VB.NET:-
Visual Basic (VB) is the third-generation event-driven programming
language and integrated development environment (IDE) from
Microsoft for its COM programming model. VB is also considered a
relatively easy to learn and use programming language, because of its
graphical development features and BASIC heritage.
Visual Basic was derived from BASIC and enables the rapid application
development (RAD) of graphical user interface (GUI) applications,
access to databases using Data Access Objects, Remote Data Objects,
or ActiveX Data Objects, and creation of ActiveX controls and objects.
Scripting languages such as VBA and VBScript are syntactically similar
to Visual Basic, but perform differently.
A programmer can put together an application using the components
provided with Visual Basic itself. Programs written in Visual Basic can
also use the Windows API, but doing so requires external function
declarations.
The final release was version 6 in 1998. Microsoft's extended support
ended in March 2008 and the designated successor was Visual Basic
.NET (now known simply as Visual Basic).

Visual Basic .NET (VB.NET) is an object-oriented computer


programming language that can be viewed as an evolution of
Microsoft's Visual Basic (VB) which is generally implemented on the
Microsoft .NET Framework. Its a plateform indepoendent,it is the
easiest and most productive language and tool for rapidly buliding
window and web applications,Its totally based on WYSWYG. And its
also known as RAD(Rapid application Development),having with
DLL(Dinamic linking lib.),IT is use to create the web,window and the
mobile based applications.
And the main thing is that its the global one.

compilation & execution process of a VB.Net program:-


IT is done by MSIL(Microsoft Intermediate Language), IT is the lowest-
level human-readable programming language defined by the Common
Language Infrastructure specification and used by the .NET
Framework.
In this during the compilation of .NET programming languages, the
source code is translated into CIL code rather than platform or
processor-specific object code. CIL is a CPU- and platform-independent
instruction set that can be executed in any environment supporting the
Common Language Infrastructure (either the .NET runtime on Microsoft
Windows operating system, or the independently derived Mono, which
also works on Linux or Unix-based operating systems). CIL code is
verified for safety during runtime, providing better security and
reliability than natively compiled binaries.
NOTE:-

CIL was originally known as Microsoft Intermediate Language (MSIL)

during the beta releases of the .NET languages. Due to

standardization of C# and the Common Language Infrastructure,

the bytecode is now officially known as CIL. Because of this legacy,

CIL is still frequently referred to as MSIL, especially by long-

standing users of the .NET languages.


Q6. Every language on .Net framework provide different data types. In

what manner does these different data types are managed by .Net

Framework, specially while implementing interoperability.

Elaborate in detail.

ANSWER6:- The most important change (from VB 6 to VB.NET) is that


all of the languages under the .NET umbrella ... now implement a
subset of a common set of data types, defined in the .NET
Framework's Base Class Library (BCL).

And it is being managed by active X controleand ADO.

Вам также может понравиться