Unit 1(sem-iv)

  • View
    120

  • Download
    0

Embed Size (px)

Text of Unit 1(sem-iv)

UNIT-1 INTRODUCTION TO VB.NET

JIGAR JOBANPUTRASRK INSTITUTE OF MANAGEMENT AND COMPUTER EDUCATIONUNIT-1 INTRODUCTION TO VB.NETJIGAR 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 doesnt follow the predefined path.

EVENT-DRIVEN MODELJIGAR 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 eventsFor e.g. cost of laptop, company , color , size , RAM, HARD DISK are properties of laptop.ContJIGAR JOBANPUTRA (J.J.)Property means characteristics of anythingEach and every object identified by its characteristics.Events are reaction of any actionMethods are something like function doing something.

ContJIGAR 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.

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

CONTcode.vb

code.cs

code.cpp

...

Development Tools app.exe

FCL

JIGAR JOBANPUTRA (J.J.)Compiled .NET apps run on any supported platform:

.NET is cross-platformAPP.exe

?Win64Win32(XP,2K,98)WinCEJIGAR JOBANPUTRA (J.J.)Cross-platform execution realized in two ways:apps are written against Framework Class Library (FCL), not underlying OScompilers 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 Library1000's of predefined classescommon subset across all platforms & languages networking, database access, XML processing, GUI, Web, etc.

Goal?FCL is a portable operating system

FCLJIGAR JOBANPUTRA (J.J.)RICH SET OF CLASSES: -Visual studio.net contains hundreds of classes and namespaces that providing variety of functionality in applicationFor example to work with database we need to include system.data namespaceFEATURES OF .NETJIGAR JOBANPUTRA (J.J.)Object oriented programming systemVisual studio .NET provides a fully object oriented environment.Visual studio .NET supports oops concepts

ContJIGAR 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.

ContJIGAR JOBANPUTRA (J.J.)Multi language and Multi-device supportVisual studio .NET supports multiple languageThis 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

ContJIGAR JOBANPUTRA (J.J.)Faster and easy development of web application-ASP.NET is useful for developing dynamic and database related web applicationsASP.NET contains rich and faster development controls for web applications

ContJIGAR JOBANPUTRA (J.J.)XML Supports-Visual studio .NET supports for writing , manipulation and transforming XML DOCUMETNS

ContJIGAR JOBANPUTRA (J.J.)Ease of development and configurationDeploying 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 simplifiedContJIGAR JOBANPUTRA (J.J.)How .NET works?HOW .NET WORKS?Operating System + Hardware.NET Framework.NET ApplicationJIGAR JOBANPUTRA (J.J.)Base Class LibraryCommon Language SpecificationCommon Language RuntimeADO.NET: Data and XMLVBVC++VC#Visual Studio.NETASP.NET: Web Servicesand Web FormsJScriptWindowsFormsFramework, Languages, And ToolsJIGAR 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 FormsADO.NET and XML provide the functionality for data access.Finally, the core base classes provide infrastructure services such as security, transaction management etc.

ContJIGAR JOBANPUTRA (J.J.)Common Language RuntimeCommon, secure execution environment.It is the execution engine for .NET frameworkIt is the heart and backbone of the .NETIt provides an infrastructure for running program and allows them to communicate with other parts of the .NET frameworkIt provides the following facilities Code loading and executionApplication memory , isolationVerification of type safetyConversion to IL to native code

CONTJIGAR JOBANPUTRA (J.J.)Access to metadataManaging memory for managed objectsEnforcement of code access securityException handlingContJIGAR JOBANPUTRA (J.J.)CTS allows programs written in different programming language to easily share informationA class written in C# should be equivalent to a class written in VB.NETLanguages 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 integrationThe Common type system supports two general categories of types:Value typesReference typesIt store directly data on stack. In-built data type.e.g. dim a as integerstore a reference to the values memory address, and allocate on heap.

ContJIGAR 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 systemThe 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 metadataMeta data means data about dataA .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 classesLoad classesGenerate native codeProvide securityCont..JIGAR JOBANPUTRA (J.J.)As mentioned above .NET framework class library is collection of namespacesNamespace 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 computerThe 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 classesSystem.io- classes for reading and writing data in fileSystem.xml- classes work with xml System.windows.forms- contains classes for window-based applicationsSystem.data- contains classes for the database connectionCommon namespaces JIGAR JOBANPUTRA (J.J.)An assembly is the basic building block of .NET applicationThe 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 youJIGAR JOBANPUTRA (J.J.)