Title: 1' Introduction to Computers, Internet and Visual Basic 'NET
11. Introduction to Computers, Internet and Visual
Basic .NET
2Lecture Outline
- Visual Programming Environment.
- Introduction to Visual Studio.
- Introduction to .NET.
- Introduction to visual studio .NET
- .NET Framework.
- Major Components of .NETÂ Framework
- Namespaces
- Framework class library (FCL)
- Common Language Runtime (CLR)
- Common Language Specification (CLS)
3Visual Programming Environment
- Environment which allows the use of visual
expressions (such as graphics, drawings,
animation or icons) in the process of
programming.
4Visual Programming Environment
- The technique of Visual Programming allows
programmers to create GUI without writing any
code. - Microsoft Visual Studio .NET is a visual
programming environment.
5- First what is Visual Studio ??
- Second what is .NET ??
- Any ideas ??????
61. Introduction to Visual Studio
- Is the main Integrated Development Environment
(IDE) from Microsoft. - It can be used to develop console and GUI
applications.
71. Introduction to Visual Studio
81. Introduction to Visual Studio
- Visual Studio includes a code editor supporting
some features like IntelliSense.
9Introduction to Visual Studio Features
- IntelliSense shows the available classes and the
methods and properties available on those
classes. - Designers Visual Studio includes visual WYSIWYG
designers for GUI and other applications. - Debugging is the ability to step through your
application line by line as it is executing. - Organization it provides intuitive methods for
organizing your various code files into projects
and your various projects into solutions.
101. Introduction to Visual Studio
- Visual Studio 97
- Visual Studio 6.0 (1998)
- Visual Studio .NET (2002) - New programming
- language that targets .NET
- Visual Studio .NET 2003 - First release to
support for - developing programs for mobile
devices. - Visual Studio 2005 Removes .NET only from name.
- Visual Studio 2008 Focuses on Windows Vista.
- Visual Studio 2010 -- Under development.
11 122. Introduction to .NET
- When you hear the name .NET, it gives a feeling
that it is something to do only with internet or
networked applications. - Even though it is true that .NET provides solid
foundation for developing such applications it is
possible to create many other types of
applications.
132. Introduction to .NET
- The .NET is one over which Web-Based applications
can be distributed to variety of devices ( such
as cell phones ) and desktop computers. - Offers a new programming model that allows
programs , created in disparate programming
languages , to communicate with each other. - Additional information available at Microsoft Web
site www.microsoft.com/net
142. Introduction to .NET
- You can develop such varied types of
applications. Thats fine. But how? -
152. Introduction to .NET
- As with most of the programming languages, .NET
has a complete Software Development Kit (SDK) -
more commonly referred to as .NET Framework SDK - It provides classes, interfaces and language
compilers necessary to program for .NET. -
- Additionally it contains excellent documentation
and Quick Start tutorials that help you learn
.NET technologies with ease.
162. Introduction to .NET
- Good news is that - .NET Framework SDK is
available FREE of cost. You can download it from
the MSDN web site. -
- This means that if you have machine with .NET
Framework installed and a text editor such as
Notepad then you can start developing for .NET
right now!
You can download entire .NET Framework SDK
(approx 131 Mb) from MSDN web site at
http//msdn.microsoft.com/downloads/default.asp?ur
l/downloads/sample.asp?url/msdn-files/027/000/97
6/msdncompositedoc.xml
17.NET Development Tools
2. Introduction to .NET
- If you are developing applications that require
speedy delivery to your customers and features
like integration with some version control
software then simple Notepad may not serve your
purpose. - In such cases you require some Integrated
Development Environment (IDE). - The new Visual Studio.NET is such an IDE. VS.NET
is a powerful and flexible IDE that makes
developing . NET applications a breeze.
18So.
-
- VS .NET VS.NET
-
- VS .NET is
- A Visual programming environment
- That represents the best development environment
for the .NET platform.
19Introduction to VS .NET
- VS .NET comes with
- the .NET Framework,
- several programming languages including Visual
Basic, Visual C, and Visual C.
20Major Components of .NET FrameworkÂ
Framework Class Library (FCL)
Common Language Specification (CLS)
Common Language Runtime (CLR)
21Major Components of .NET FrameworkÂ
- 1- Framework class library (FCL)
- OO, Pre-packaged classes ready for reuse.
- Used by any .NET language.
- It contains around 3400 classes classified
logically into namespaces. Each class contains
numerous methods and properties which you will
use for your programming tasks.
222 -Common Language Runtime (CLR)
Major Components of .NET FrameworkÂ
- Central part of framework is the virtual machine
component of the .NET framework. All .NET
programs execute under the supervision of the
CLR. - Compilation process Two compilations take place
- Programs compiled to Microsoft Intermediate
Language (MSIL) - Defines instructions for CLR
- MSIL code translated into machine code
- Machine code for a particular platform
23CLR Execution Model
Source code
VB
C
C
Compiler
Compiler
Compiler
Managed code
MSIL Code
Common Language Runtime
Machine Code
Operating System Services
24Major Components of .NET FrameworkÂ
- Why two compilations?
- Platform independence - PortabilityÂ
- .NET Framework can be installed on different
platforms - Execute .NET programs without any modifications
to code - Language independence Inter-operability
- .NET programs not tied to particular language
- Programs may consist of several .NET-compliant
languages - Programs written in different languages are all
compiled into MSILthe different parts can be
combined to create a single, unified program. - Execution-management features
- Manages memory, security and other features
- Relieves programmer of many responsibilities
- More concentration on program logic
25Major Components of .NET FrameworkÂ
- 3- Common Language Specification (CLS)
- The CLR allows objects created in one language be
treated as equal citizens by code written in a
completely different language. - To make this possible, Microsoft has defined the
CLS that details for compiler vendors the minimum
set of features that their compilers must support
if they are to target the runtime. - Any language that conforms to the CLS can run on
the CLR.
26Major Components of .NET FrameworkÂ
VB
C
C
Visual Studio.NET
JScript
CLS
WindowsForms
ASP.NET Web Services and Web Forms
WindowsForms
ADO.NET Data and XML
FCL
CLR
Operating System Services
27Namespaces
- As said earlier, FCL contains classes
classified logically into namespaces. - The .NET Framework is a whole lot of Classes
(called Namespaces) and the technology to get
those Classes to work.
28Namespaces
- Most of the built in classes are part of either
System. or Microsoft. namespaces. - It encapsulates a large number of common
functions, such as file reading and writing,
graphic rendering, and database interaction,
among others. - The .NET class libraries are available to all
.NET languages.
29Namespaces
- A Namespace is a group of Classes which are
grouped together. - Namespaces are organized hierarchically.
- Namespaces developed by .NET team begin with
System.
30Namespaces
- If we can explore the System namespace little
bit, we can see it has lot of namespace. For
example - The System.IO Namespace groups together Classes
that you use to read and write to a file. - System.Windows.Forms Includes classes for
creating Windows based forms.
31Namespaces
- System is a top-level Namespace as the leader of
a hierarchy. - IO and Windows would be part of this hierarchy,
just underneath the leader. - Each subsequent group of Classes is subordinate
to the one the came before it. - For example Forms is a group of Classes available
to Windows, just as Windows is a group of Classes
available to System.
32Namespaces
- A single form is a Class available to Forms
- System.Windows.Forms.Form
- A Button is also part of the Forms Class
- System.Windows.Forms.Button
- As too is a Textbox
- System.Windows.Forms.TextBox
33Namespaces
- Use dot syntax to connect namespaces together
- A period separates each namespace name
- System.Drawing
- System.Windows.Forms
- System.Data
34Namespaces
- Some Namespaces and their use
- System Includes essential classes and base
classes for commonly used data types, events,
exceptions and so on - System.Collections Includes classes and
interfaces that define various collection of
objects such as list, queues, hash tables,
arrays, etc - System.Data Includes classes which lets us
handle data from data sources - System.Drawing Provides access to drawing
methods - System.Net Provides interface to protocols used
on the internet - System.Web Includes classes and interfaces that
support browser-server communication
35The Organization of Namespaces
System namespace System
Drawing namespace System.Drawing
Windows.Forms namespace System.Windows.Forms
Data namespace System.Data
Printing namespace System.Drawing.Printing
36Parts of a Namespace
- A namespace contains
- Classes which are reference types.
- Enumerations which define a symbolic name for a
value. - Structures which are value types.
37Parts of a Namespace
Windows.Forms namespace System.Windows.Forms
Enumerations
Classes
Structures
Button
BorderStyle
Message
Label
FormBorderStyle
TextBox
381. Namespace Classes
- Classes are reference types
- Variable stores the memory address of an object
rather than the object itself - Controls appearing in the Toolbox are all classes
Variable btnCalculate 023448
Variable contains memory address of Button
control instance
btnCalculate (Memory address 023448) Data
Caption "Calculate"
392. Namespace Enumerations
- Enumerations define a symbolic name for a value.
- Enumerations improve code readability.
- Enumeration can be done at the place where we
need to assign integer values for words. For
example - Enum ServingSizes As LongSmall 1Regular
2Large 3 - End Enum
- The BorderStyle enumeration applies to the
System.Windows.Forms namespace - lblFileName.BorderStyle _ System.Windows.Form
s.BorderStyle.FixedSingle
403. Namespace Structures
- Structures are value types
- Store data directly in the variable
- Structures are designed to be lightweight
alternatives to classes. In this case, the term
lightweight means that structures use fewer
resources (i.e., less memory) than classes, but
they offer less functionality. - Primary data types such as Boolean Integer,
Single, and Double are all structures - Note that the String data type is a class though
413. Namespace Structures
Private mcolCurrent As System.Drawing.Color
 mcolCurrent System.Drawing.Color.Navy
Â
Allocate memory for the variable
Store the value Navy directly in the variable
variable mcolCurrent Navy
42Chapter Summary
- CAP 211 gives an introduction to how to develop
.NET software with Visual Basic .NET.
43Lecture Resources
- http//en.wikipedia.org/wiki/.NET_Framework
- http//www.hitmill.com/programming/vbnet/about_vbn
et.html - http//www.devarticles.com/c/a/ADO.NET/Introductio
n-to-.NET/ - http//www.devhood.com/training_modules/dist-a/Int
ro.NET/?module_id1 - http//homepages.com.pk/kashman/dotnet.htm
- http//www.devhood.com/training_modules/dist-a/Int
ro.NET/Intro.NET_pres_files/frame.htm
44SELF-REVIEW EXERCISES
- Fill in the blank
- Programs that translate high-level language
programs into machine language are called
_______________ - 2. True or False
- Visual Basic .NET is the only language available
for programming .NET applications. - Computers can directly understand high-level
languages.
45SELF-REVIEW EXERCISES
- 3. What is the meaning of the following
terminologies - MSIL
- ADO .NET
- ASP .NET
- Portability
- Inter-operability
- 4. What does BASIC in Visual BASIC Stands for?
- 5. How many levels of compilation happen in .NET
Framework? - 6. Where can you find COMException class?
46Integrated Development Environment (IDE)
- In computing, an integrated development
environment (IDE) is a software application that
provides comprehensive facilities to computer
programmers for software development. - An IDE normally consists of a source code editor,
a compiler and/or interpreter, build automation
tools, and (usually) a debugger.
Back