Download pdf - Unit 1(sem-iv)

Transcript

JIGAR JOBANPUTRASRK INSTITUTE OF MANAGEMENT AND COMPUTER EDUCATION

UNIT-1 INTRODUCTION TO VB.NET

JIGAR JOBANPUTRA (J.J.)

› C Language allows you the concept of the procedural programming language.

› Execution starts with the first line of the main() function and then follows the predefined path through the application calling procedures as needed.

› In the event driven application the code doesn’t follow the predefined path.

EVENT-DRIVEN MODEL

JIGAR JOBANPUTRA (J.J.)

› Everything is depended upon an event.

› Event driven programming is associated with properties, methods and events.

› In daily routine we are using so many objects like TV , ICE-CREAM , MOBILE , BIKE etc.

› Each and every object has properties , methods and events

› For e.g. cost of laptop, company , color , size , RAM, HARD DISK are properties of laptop.

Cont…

JIGAR JOBANPUTRA (J.J.)

› Property means characteristics of anything

› Each and every object identified by its characteristics.

› Events are reaction of any action

› Methods are something like function doing something.

Cont…

JIGAR JOBANPUTRA (J.J.)

› Visual studio .net is complete package of development tools for developing web applications, desktop application, mobile applications etc.

› Visual studio .net supports 60 languages for developing software. Some common languages are visual basic.net, visual c++, c# .Net, J# .Net.

What is visual studio.net?

JIGAR JOBANPUTRA (J.J.)

› “Microsoft .NET is based on the .NET Framework, which consists of two major components: the Common Language Runtime (CLR) and an extensive set of Framework Class Libraries (FCL). The CLR defines a common programming model and a standard type system for cross-platform, multi-language development.”

Cont…

JIGAR JOBANPUTRA (J.J.)

› .NET supports VB, C# (C-sharp), C++, J# (Java 1.2), etc.

CONT…

code.vb code.cs code.cp

p

...

Development Tools

app.exe

FCL

JIGAR JOBANPUTRA (J.J.)

› Compiled .NET apps run on any supported platform:

.NET is cross-platform

APP.exe

?Win64 Win32

(XP,2K,98)WinCE

JIGAR JOBANPUTRA (J.J.)

› Cross-platform execution realized in two ways:

1.apps are written against Framework Class Library (FCL), not underlying OS

2.compilers generate generic assembly language which must be executed by the Common Language Runtime (CLR)

How is cross-platform achieved?

JIGAR JOBANPUTRA (J.J.)

› Framework Class Library– 1000's of predefined classes

– common subset across all platforms & languages

– networking, database access, XML processing, GUI, Web, etc.

› Goal?– FCL is a portable operating system

FCL

JIGAR JOBANPUTRA (J.J.)

› RICH SET OF CLASSES: -– Visual studio.net contains hundreds of

classes and namespaces that providing variety of functionality in application

– For example to work with database we need to include system.data namespace

FEATURES OF .NET

JIGAR JOBANPUTRA (J.J.)

› Object oriented programming system– Visual studio .NET provides a fully object

oriented environment.

– Visual studio .NET supports oops concepts

Cont…

JIGAR JOBANPUTRA (J.J.)

› In- built memory management:– Visual studio .NET supports handling memory

on its own.

– The garbage collector take responsibility for freeing up unused objects at regular intervals.

Cont…

JIGAR JOBANPUTRA (J.J.)

› Multi – language and Multi-device support– Visual studio .NET supports multiple language

– This means that if your friend is good in c# and you are comfortable with VB.

– So you can work on the same project using different languages.

– The beauty of multi language supports lies in the fact that even though the syntax of each language is different the basic environment of developing software is same.

– Visual studio .NET supports multi-device

Cont…

JIGAR JOBANPUTRA (J.J.)

› Faster and easy development of web application-– ASP.NET is useful for developing dynamic

and database related web applications

– ASP.NET contains rich and faster development controls for web applications

Cont…

JIGAR JOBANPUTRA (J.J.)

› XML Supports-– Visual studio .NET supports for writing ,

manipulation and transforming XML DOCUMETNS

Cont…

JIGAR JOBANPUTRA (J.J.)

› Ease of development and configuration– Deploying windows application especially

that use COM components have always been a tedious task since .NET does not require any registration as such, much of the deployment is simplified

Cont…

JIGAR JOBANPUTRA (J.J.)

› How .NET works?

HOW .NET WORKS?

Operating System + Hardware

.NET Framework

.NET Application

JIGAR JOBANPUTRA (J.J.)

Base Class Library

Common Language Specification

Common Language Runtime

ADO.NET: Data and XML

VB VC++ VC#V

isu

al S

tud

io.N

ET

ASP.NET: Web Services

and Web Forms

JScript …

Windows

Forms

Framework, Languages, And Tools

JIGAR JOBANPUTRA (J.J.)

› The .NET framework exposes numerous classes to the developer. These classes allow the development of rich client applications and Web based applications alike. In the above slide these classes have been divided into 4 areas.

› ASP.NET provides the core Web infrastructure such as Web Forms for UI based development and Web Services for programmatic interface development,

› User interface development on the Windows platform can be done using Windows Forms

› ADO.NET and XML provide the functionality for data access.

› Finally, the core base classes provide infrastructure services such as security, transaction management etc.

Cont…

JIGAR JOBANPUTRA (J.J.)

•Common Language Runtime• Common, secure execution environment.

• It is the execution engine for .NET framework

• It is the heart and backbone of the .NET

• It provides an infrastructure for running program and allows them to communicate with other parts of the .NET framework

• It provides the following facilities • Code loading and execution

• Application memory , isolation

• Verification of type safety

• Conversion to IL to native code

CONT…

JIGAR JOBANPUTRA (J.J.)

› Access to metadata

› Managing memory for managed objects

› Enforcement of code access security

› Exception handling

Cont…

JIGAR JOBANPUTRA (J.J.)

› CTS allows programs written in different programming language to easily share information

› A class written in C# should be equivalent to a class written in VB.NET

› Languages must agree on the meanings of these concepts before they can integrate with each other.

What is Common Type System?

JIGAR JOBANPUTRA (J.J.)

› CTS provides cross language integration

› The Common type system supports two general categories of types:– Value types

– Reference types

It store directly data on stack. In-built data type.

e.g. dim a as integer

store a reference to the values memory address, and allocate on heap.

Cont…

JIGAR JOBANPUTRA (J.J.)

› CLS includes basic language features needed by almost all the applications.

› It serves as a guide for library writers and compiler writers

› The common language specifications is a subset of the common type system

› The common language specification is also important to application developers who are writing code that will be used by other developers.

What is CLS(common language specifications)?

JIGAR JOBANPUTRA (J.J.)

› Meta data stored within assembly

› .NET records information about compiled classes as metadata

› Meta data means data about data

› A .NET language compiler will generate the metadata and store this is in assembly.

› Meta data is nothing but a description of every namespace, class , method , property etc.

What is metadata?

JIGAR JOBANPUTRA (J.J.)

› CLR uses this metadata to – Locate classes

– Load classes

– Generate native code

– Provide security

Cont..

JIGAR JOBANPUTRA (J.J.)

› As mentioned above .NET framework class library is collection of namespaces

› Namespace is logical naming scheme for types that have related functionality.

› Namespace means nothing but a logical container or partition

› It is like drives of the computer

› The drives are logical partitions of hard disk c: d: e: f: are used for unique identification for particular file.

What is namespace?

JIGAR JOBANPUTRA (J.J.)

› System- contains fundamental classes and base classes

› System.io- classes for reading and writing data in file

› System.xml- classes work with xml

› System.windows.forms- contains classes for window-based applications

› System.data- contains classes for the database connection

Common namespaces

JIGAR JOBANPUTRA (J.J.)

› An assembly is the basic building block of .NET application

› The assemblyinfo.vb file contains information about the assembly its version number, dependencies, product , copyright , trademark, description etc.

What is Assemblyinfo.vb file?

JIGAR JOBANPUTRA (J.J.)

Thank you

JIGAR JOBANPUTRA (J.J.)


Recommended