1 CHAPTER I.NET FRAMEWORK AND VB.NET. 2 VB.NET INTRODUCTIONINTRODUCTION EVOLUTION OF THE.NET FRAMEWORKEVOLUTION OF THE.NET FRAMEWORK OVERVIEW OF THE.NET.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Advertisements

Introduction to .NET Framework
.NET Framework Overview
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
.NET Framework .NET Training Program Ashutosh Pandey
History of.Net Introduced by Microsoft Earlier technology was VC++ and VB VC++ comes with so many library and VB was so easy to use and not flexible to.
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
.NET Technology.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Introduction. What is.Net? The hype: “Microsoft.Net is a set of Microsoft software technologies for connecting information, people, systems, and devices.
.Net Overview Giuseppe Attardi Università di Pisa.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
DotNET A Developer’s Perspective Mike Litzkow University of Wisconsin - MadisonOne.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Rajeswari Indupuri Introduction to.NET Framework.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to .Net Framework
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
High thoughts must have high language. Aristophanes
Module 1: Introduction to C# Module 2: Variables and Data Types
Introduction to Visual Studio.NET Pradeep K. Shah
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a library for.
1 Visual Studio.NET Languages Carlotta Eaton Associate Professor of IST New River Community College Dublin, VA Slides by Microsoft.
Introduction to .NET Rui Ye.
 Internet providing backbone for applications  Use of several web sites and devices to provide one complete solution  Software as services  Quick software.
Understanding Code Compilation and Deployment Lesson 4.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
.NET Framework Overview
Introduction .NET Framework
ISYS 573 Special Topic – VB.Net David Chao. The History of VB Early 1960s:BASIC-Beginner’s All-Purpose Symbolic Instruction Code –Teaching –Simple syntax,
Managed C++. Objectives Overview to Visual C++.NET Concepts and architecture Developing with Managed Extensions for C++ Use cases Managed C++, Visual.
.NET Language Supports. .NET Language Support Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Introduction to Computers and Programming.
MSIL & CLI Kun-Yuan Shieh.
Programming in C#. I. Introduction C# (or C-Sharp) is a programming language. C# is used to write software that runs on the.NET Framework. Although C#
Introduction to VB.Net. What is.NET? A brand of Microsoft technologies A platform for creating distributed Web applications A combination of new and updated.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company Application Foundation Presented By : Naveed Sattar Software Engineer.
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Introduction to.NET. What is.NET? Microsoft’s vision of the future of applications in the Internet age –Increased robustness over classic Windows apps.
Active Server Pages (ASP), also known as Classic ASP or ASP Classic, was Microsoft's first server-side script engine for dynamically generated web pages.
Key Components of.NET Framework  Common Language Runtime  CLR at Design time  CLR at Runtime  Class Library  Assemblies  Namespaces  ASP.NET  Applications.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
Architecture of.Net Framework. Multiple Language Support  IL (MSIL or CIL) – Intermediate Language  It is low-level (machine) language, like Assembler,
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
C# and.NET. .NET Architecture  Compiling and running code that targets.NET  Advantages of Microsoft Intermediate Language (MSIL)  Value and Reference.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
A Detailed Introduction To Visual Studio.NET CRB Tech ReviewsCRB Tech Reviews introduces you to the world of Visual.
Introduction to the Microsoft.NET Framework Chris Wastchak Student Ambassador to Microsoft.
Introduction to .NET Framework
Introduction to .NET framework
Introduction to .NET Framework
Application Foundation
Introduction to .NET By : Mr. V. D. Panchal Content :
BHUBANESWAR,KHURDA,ODISHA
Introduction to .NET Framework
Presentation transcript:

1 CHAPTER I.NET FRAMEWORK AND VB.NET

2 VB.NET INTRODUCTIONINTRODUCTION EVOLUTION OF THE.NET FRAMEWORKEVOLUTION OF THE.NET FRAMEWORK OVERVIEW OF THE.NET FRAMEWORKOVERVIEW OF THE.NET FRAMEWORK DLL, COM, COM+, DCOM AND ASSEMBLIESDLL, COM, COM+, DCOM AND ASSEMBLIES VB.NET LANGUAGEVB.NET LANGUAGE DEVELOPMENT OF A SIMPLE VB.NET PROGRAMDEVELOPMENT OF A SIMPLE VB.NET PROGRAM

3.NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a library for writing and executing written programs in any compliant language) The.NET framework comes with programming languages including VB.NET, C#, J#, and managed C++. Introduction to.NET Framework

4 What Is.NET.Net is a new framework for developing web- based and windows-based applications within the Microsoft environment. The framework offers a fundamental shift in Microsoft strategy: it moves application development from client-centric to server-centric..Net gives a common class library, which can be utilized by any of the given set of languages. The syntax of each.Net language can be explored by the class library

5 EVOLUTION VB.Net is developed by Microsoft It is Visual Basic for.Net Platform Ancestor of VB.Net is BASIC In 1991, Microsoft added visual components to BASIC and created Visual Basic After the development of.Net, VB was added with more set of controls and components and thus evolved a new language VB.Net

6 History Development began in 1998 Beta 1 released Oct, 2000 Beta 2 released July, 2001 Finalized in Dec, shipping in Feb 2002 Vista ships with.NET Framework 3.0 (Runtime) VB 6.0, VB 7.0 (VB.NET), VB 8,……

7.NET Sits on top on the OS Provides language interoperability across platforms Strong emphasis on Web connectivity, using XML web services to connect and share data between smart client devices, servers, and developers/users Platform/language independent.Net has the single class library, through which the code written in VB.Net / C# / J#.. Can be complied and executed. With class library the datatype compatibility can be achieved, by the powerful set of library classes

8 Purpose of.NET Framework Code written in any.net language( VB.Net / C#, J#, etc.) Converted in an Intermediate language (MSIL) MSIL code contains compiled code (cannot be executable) Operating System + Hardware.NET Framework.NET Application.Net application runs the.Net framework to execute the code..Net framework converts the execution to class libraries into relevant API There is no native code. But to execute MSIL, the.net framework converts the MSIL code into the native code ie. The.net Framework for windows will converts it into windows native code and execute, similarly for Linux also. MS is moving all its technologies to be.Net based or.Net related. SQL server may also support writing stored procedures in.Net languages. And.Net runtime environment will be the part of all OS in the future.

9 Pros and Cons Pros –Faster development of programs –Rich set of controls –Object Orientation of language enhances modularity, readability and maintainability Cons –Debugging larger programs is difficult, due to the absence of an effective debugger

10.NET Overview Three main elements: –The Framework (CLR, FCL / BCL, ASP, WinForms) –The Products (Windows, Visual Studio, Office) –The Services (My Services) Framework Goals –Improved reliability and integrated security. –Simplified development and deployment. –Unified API, multi-language support. XML is the.NET “Meta-Language”. All MS server products now.NET-enabled.

11 Base Class Library Common Language Specification Common Language Runtime ADO.NET: Data and XML VB.NETVC++VC# Visual Studio.NET ASP.NET: Web Services and Web Forms JScriptPerl… Windows Forms / User Interface Framework, Languages, And Tools

12.NET Framework Framework Class Library ADO.NET Network XML Security Threading Diagnostics IO Etc. Common Language Runtime Memory Management Common Type SystemLifecycle Monitoring C# VB.NET C++.NET Other Operating System VisualStudio.NETVisualStudio.NET Common Language Specification Windows Forms ASP.NETASP.NET Web Services ASP.NET Application Services Web FormsControlsDrawing Windows Application Services

13 The.NET Framework.NET Framework Services Common Language Runtime Windows ® Forms ASP.NET –Web Forms –Web Services ADO.NET, evolution of ADO Visual Studio.NET

14 Common Language Runtime (CLR) CLR works like a virtual machine in executing all languages. All.NET languages must obey the rules and standards imposed by CLR. Examples: –Object declaration, creation and use –Data types,language libraries –Error and exception handling –Interactive Development Environment (IDE)

15 Common Language Runtime Development –Mixed language applications Common Language Specification (CLS) Common Type System (CTS) Standard class framework Automatic memory management –Consistent error handling and safer execution –Potentially multi-platform Deployment –Removal of registration dependency –Safety – fewer versioning problems

16 Common Language Specification CLS is a set of rules that specifies features that all languages should support –Goal: have the.NET framework support multiple languages –CLS is an agreement among language designers and class library designers about the features and usage conventions that can be relied upon Example: public names should not rely on case for uniqueness since some languages are not case sensitive This does not mean all languages are not case sensitive above the CLR!

17 Some.NET Languages C# COBOL Eiffel Fortran Mercury Pascal Python SML Perl Smalltalk VB.NET VC++.NET J#.NET Scheme …. More are planned or under development

18 Compilation in.NET Code in VB.NETCode in C# Code in another.NET Language VB.NET compilerC# compiler Appropriate Compiler IL(Intermediate Language) code CLR just-in-time execution

19 Intermediate Language (IL).NET languages are not compiled to machine code. They are compiled to an Intermediate Language (IL). CLR accepts the IL code and recompiles it to machine code. The recompilation is just-in-time (JIT) meaning it is done as soon as a function or subroutine is called. The JIT code stays in memory for subsequent calls. In cases where there is not enough memory it is discarded thus making JIT process interpretive.

20 DLL, COM, COM+ A dynamic-link library (DLL) file is an executable file that allows programs to share code and other resources necessary to perform particular tasks. Microsoft Windows provides DLL files that contain functions and resources that allow Windows-based programs to operate in the Windows environment. Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in It is used to enable interprocess communication and dynamic object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, COM+, DCOM, the Windows shell, DirectX, and Windows Runtime. With Windows 2000, that significant extension to COM was incorporated into the operating system (as opposed to the series of external tools provided by MTS) and renamed COM+. At the same time, Microsoft de-emphasized DCOM as a separate entity. Components that made use of COM+ services were handled more directly by the added layer of COM+, in particular by operating system support for interception. In the first release of MTS, interception was tacked on - installing an MTS component would modify the Windows Registry to call the MTS software, and not the component directly.

21 ASSEMBLIES An assembly in the Common Language Infrastructure (CLI) is a compiled code library used for deployment, versioning, and security. There are two types: process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process that will use classes defined in library assemblies. CLI assemblies contain code in CIL, which is usually generated from a CLI language, and then compiled into machine language at run time by the just-in- time compiler. In the.NET framework implementation, this compiler is part of the Common Language Runtime (CLR). An assembly can consist of one or more files. Code files are called modules. An assembly can contain more than one code module and since it is possible to use different languages to create code modules it is technically possible to use several different languages to create an assembly. Visual Studio however does not support using different languages in one assembly.

22 Multiple Languages Common Type System makes interoperability seamless between languages Class in one language can inherit from a class in another language Exceptions can be thrown across languages Makes it easier to learn a new.NET language since the same tools and classes are in place Can debug across languages

23 The Common Type System At the core of the Framework is a universal type system called the.NET Common Type System (CTS). Everything is an object - but efficient –Boxing and Unboxing All types fall into two categories - Value types and Reference types. –Value types contain actual data (cannot be null). Stored on the stack. Always initialized. –Three kinds of value types: Primitives, structures, and enumerations. Language compilers map keywords to the primitive types. For example, a C# “int” is mapped to System.Int32.

24 The Common Type System Reference types are type-safe object pointers. Allocated in the “managed heap” Four kinds of reference types: Classes, arrays, delegates, and interfaces. –When instances of value types go out of scope, they are instantly destroyed and memory is reclaimed. –When instances of reference types go out of scope, they are garbage collected. Boxing = converting an instance of a value type to a reference type. Usually done implicitly through parameter passing or variable assignments. UnBoxing = casting a reference type back into a value type variable.

25 The Common Type System Primitive Types Int16 Int32 Int64 Single Double Decimal Boolean Byte Char Currency DateTime TimeSpan Object Array String Enum ValueType Exception Delegate Multicast Delegate Multicast Delegate Class1 Class2 Class3

26 CTS & CLS Multiple Language Support CTS is a rich type system built into the CLR –Implements various types (int, double, etc) –And operations on those types CLS is a set of specifications that language and library designers need to follow –This will ensure interoperability between languages

27 MSIL and JIT Compilation Source code is compiled into MSIL (Microsoft Intermediate Language). Similar to Java bytecodes - CPU-independent instructions MSIL allows for runtime type-safety and security, as well as portable execution platforms. The MSIL architecture results in apps that run in one address space - thus much less OS overhead. Compilers also produce “metadata” or glue that binds the code with debuggers, browsers, etc. –Definitions of each type in your code. –Signatures of each type’s members. –Members that your code references. –Other runtime data for the CLR.

28 MSIL and JIT Compilation Metadata in the load file along with the MSIL enables code to be self-describing - no need for separate type libraries, IDL, or registry entries. When code is executed by the CLR, a JIT compilation step occurs. –Code is compiled method-by-method to native machine code as methods are invoked –Results in performance slowdown when a program is first executed, but can be efficient for code that is never executed –Subsequent invocations reuse compiled code, so no slowdown

29 Languages Languages provided by MS –VB, C++, C#, J#, JScript Third-parties are building –APL, COBOL, Pascal, Eiffel, Haskell, ML, Oberon, Perl, Python, Scheme, Smalltalk…

30 Windows Forms Framework for Building Rich Clients –RAD (Rapid Application Development) –Rich set of controls –Data aware –ActiveX ® Support –Licensing –Accessibility –Printing support –Unicode support –UI inheritance

31 ASP.NET ASP.NET,the platform services that allow to program Web Applications and Web Services in any.NET language ASP.NET Uses.NET languages to generate HTML pages. HTML page is targeted to the capabilities of the requesting Browser ASP.NET “Program” is compiled into a.NET class and cached the first time it is called. All subsequent calls use the cached version.

32 ASP.NET Logical Evolution of ASP –Supports multiple languages –Improved performance –Control-based, event-driven execution model –More productive –Cleanly encapsulated functionality

33 ASP.NET Web Forms Allows clean cut code –Code-behind Web Forms Easier for tools to generate Code within is compiled then executed Improved handling of state information Support for ASP.NET server controls –Data validation –Data bound grids

34 ASP.NET Web Services A technical definition –“A programmable application component accessible via standard Web protocols” Web Services It is just an application… …that exposes its features and capabilities over the network… …using XML… …to allow for the creation of powerful new applications that are more than the sum of their parts…

35 ADO.NET (Data and XML) New objects (e.g., DataSets) Separates connected / disconnected issues Language neutral data access Uses same types as CLR Great support for XML

36 Namespaces Namespaces are logical groupings of related classes. The namespaces in the.Net base class library are organized hierarchically. The root of class library is the System namespace. Other namespaces which are constituents of this root namespace, can be accessed with. (period) operator. Ex. System.Math, System. Data, System.Windows.Forms, System.IO, System.web.Services, System.Diagonositics, System.Net, System.Security, etc.

37 Visual Studio.NET Development tool that contains a rich set of productivity and debugging features

38.NET – Hierarchy, Another View CLR

39 Features of VB.Net Object Oriented Language Supports unified data type system. VB.NET code is managed by CLR. Release of unused objects taken care by the CLR Easy to develop. We can drag controls from the tool bar and drop them on the form and write code for the controls Runs on the CLR (Common Language Runtime) Many type-safe measures are incorporated. Classes are declared and defined in the same code blocks. VB.NET supports versioning features. VB.NET overcomes the DLL hell problems. Creating windows-based application is very easy Web forms in VB.NET enable to develop very efficient web- based applications which generates dynamic web content. Writing web services in VB. NET is very easy, because VB.NET was designed from the ground up with web services.

40 Summary The.NET Framework –Dramatically simplifies development and deployment –Provides robust and secure execution environment –Supports multiple programming languages