Download presentation
Presentation is loading. Please wait.
Published byCory Snow Modified over 8 years ago
1
7/23/2016 1.NET - What and Why.NET What Is It And Why Use It?
2
7/23/2016 2.NET - What and Why Software from Components In the industrial revolution, engineers learned to build things in a consistent, predictable, and repeatable way They learned to use assembly lines to assemble items from components Any component of a given type and specification is interchangeable with another of the same type
3
7/23/2016 3.NET - What and Why Why not build software the same way? Multiple languages and incompatibilities Basic, C, C++, COBOL, Visual Basic, C#, Java, Fortran, Perl, Python, Eiffel, Delphi, SQL, Pascal, PL/I, APL, assembly, Scheme, Smalltalk, Prolog, Lisp, RPG, Ada, Ruby, … Cannot just take a piece of code from a Lisp program, for example, and plug it into a COBOL program and have it work Usually, cannot even call an Ada function from a Python program without special efforts, for example
4
7/23/2016 4.NET - What and Why Why not build software the same way? Different Data Types Many different data types stringsNot implemented the same way in all languages (consider the many ways strings are implemented) Implementations vary in size ASCIIEBCDIC UnicodeCharacter type may be 1 byte (ASCII or EBCDIC) or 2 bytes (or even 4) for Unicode Integers may be 16 bits, 32 bits, 64 bits, etc.
5
7/23/2016 5.NET - What and Why Why not build software the same way? Different conventions left-to-right right-to-leftArgument passing may be left-to-right or right-to-left Arguments in various languages may be passed using a stack, others use registers, pointers, or some other means; not consistent among languages Name collisions Same word may be used differently in different languages – a function name in one may be a keyword in another
6
7/23/2016 6.NET - What and Why Why not build software the same way? platformsarchitecturesDifferent platforms and architectures Addressesdata163264Addresses and data: 16-bit, 32-bit, 64-bit,… Big-endianlittle-endian 0123456767452301Big-endian vs. little-endian (the number 01234567 is stored with the 01 at the lowest address in big-endian and at the highest address in little-endian: 01234567 vs. 67452301) BM's 370 mainframes RISC-based Motorolabig-endian big-endianbig-endian network orderI BM's 370 mainframes, most RISC-based computers, and Motorola microprocessors use the big-endian approach. TCP/IP also uses the big-endian approach (and thus big-endian is sometimes called network order). IntelDEC little-endianIntel processors (CPUs) and DEC Alphas and at least some programs that run on them are little-endian. instructionsetsDifferent instruction sets registerarchitectureDifferences in register architecture
7
7/23/2016 7.NET - What and Why Why not build software the same way? operating systemsDifferent operating systems even on the same hardware Almost all user software depends on and uses services (I/O, memory management, processor management, etc.) provided by the OS and its subsystems Different OS’s have different ways of implementing the services, different API’s, different conventions, different levels of support for various activities
8
7/23/2016 8.NET - What and Why Why not build software the same way? Human LanguagesCulturesDifferent Human Languages; Different Cultures English, French, Japanese, Chinese, German, … Punctuation:Punctuation: In the US, 1.23 represents 1 and 23 hundredths, while in many European cultures, the same value would be represented as 1,23 Temperature:Temperature: Fahrenheit vs. Celsius; in US 30 degrees is cold while in Canada 30 degrees is hot Currency:Currency: US Dollars vs. Canadian Dollars, Euros, Yen, Rubles,... Dates:Dates: 03/04/2014 is March 4, 2014 in the US but it is April 3, 2014 in much of Europe English MetricEnglish vs. Metric measures: Inches, miles, gallons, pounds vs. centimeters, kilometers, liters, and kilograms
9
7/23/2016 9.NET - What and Why COM, CORBA, Enterprise Java Beans Various companies and groups of companies came up with approaches that could be used to standardize things and allow components to work together Problems: All approaches were proprietary Approaches incompatible with each other Not based on open standards
10
7/23/2016 10.NET - What and Why.NET Based on a open standard developed by Microsoft, Intel, IBM, and others ECMAApproved as a standard by ECMA ISOApproved as a standard by ISO CTSCLSC#,Standards cover CTS, CLS, C#, and other items languageindependentDesigned to be language independent PlatformneutralPlatform neutral OpenOpen to development by anyone
11
7/23/2016 11.NET - What and Why Common Type System (CTS) common typesAll.NET languages support common types – though not necessarily using the same name System.Int32intC++ C#, IntegerVBSystem.Int32 is called int in C++ and C#, and Integer in VB, but they are same type and can be passed back and forth as arguments System.SingleSingleVBfloat C++C#,.NETSystem.Single is called Single in VB and float in C++ and C#, but all are the same type and are interchangeable in the.NET languages CTSLanguages are free to add types, but added types may not be compatible with other CTS languages
12
7/23/2016 12.NET - What and Why Common Language Specification (CLS) All.NET languages must support a minimal subset of.NET features and classes CTSFor example, all must support the CTS, the same.NET class libraries, and so forth CLS.NET CLRThe CLS is a set of rules to which a language compiler must adhere in order to create.NET applications that run in the CLR
13
7/23/2016 13.NET - What and Why Common Language Runtime (CLR) Intermediate Language (IL)All.NET compilers emit platform-neutral Intermediate Language (IL) object code rather than native machine language code AssemblyOutput of a project is called an Assembly.EXE.DLLMay be either a.EXE or a.DLL CLRplatformOnly the CLR needs to know what platform it is running on CLRJITILnativemachinelanguage optimizedtargetmachineCLR contains a JIT compiler that turns IL into native machine language optimized for its target machine Very fast and efficient Done only once and only as needed CLRgarbage-collectionexceptionhandlingcross-language debugging,distributeddebuggingCLR also handles garbage-collection, exception handling, cross-language debugging, and distributed debugging, and other common features runtimesupport.NETIncludes runtime support for thousands of.NET classes
14
7/23/2016 14.NET - What and Why IL Example.method public hidebysig static void Main() cil managed {.entrypoint.entrypoint.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() =.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = // Code size 14 (0xe) // Code size 14 (0xe).maxstack 8.maxstack 8 IL_0000: nop IL_0000: nop IL_0001: newobj instance void ManageDB.frmTblMgmt::.ctor() IL_0001: newobj instance void ManageDB.frmTblMgmt::.ctor() IL_0006: call void [System.Windows.Forms]System.Windows.Forms.Application::Run (class [System.Windows.Forms]System.Windows.Forms.Form) IL_0006: call void [System.Windows.Forms]System.Windows.Forms.Application::Run (class [System.Windows.Forms]System.Windows.Forms.Form) IL_000b: nop IL_000b: nop IL_000c: nop IL_000c: nop IL_000d: ret IL_000d: ret } // end of method frmTblMgmt::Main
15
7/23/2016 15.NET - What and Why Runtime Compilation and Execution Native code C# code Visual Basic.NET code Which language? VB.NET compiler C# Compiler MSIL JIT compiler default.aspx CLR HTML
16
7/23/2016 16.NET - What and Why Platform Neutral IL portableBecause the IL code is not targeted at any platform, it is portable between systems NET.exeNET.dll Windows AppleIBMmainframeIF CLRILnative codeA (.NET).exe and a (.NET).dll compiled on a Windows system will run on an Apple or an IBM mainframe IF it has its own CLR to convert the IL code to native code targeted to the machine on which it is to run and to provide the runtime support for the.NET classes
17
7/23/2016 17.NET - What and Why Language Interoperability VB.NET C#The standards that are part of.NET insure that a control developed in VB.NET can be used in a C# program methodbusiness-tierclass COBOL.NETVB.NET WindowsFormsA method written in a business-tier class in COBOL.NET can be invoked by a VB.NET Windows Forms front end NETstringDelphi.NET WindowsC# SSCLI Apple OS-XA.NET string in a Delphi.NET program compiled using a Borland compiler on a Windows computer can be passed to a C# method written using a SSCLI compiler running on an Apple OS-X platform
18
7/23/2016 18.NET - What and Why.NET Implementations Implementations of.NET and its standard technologies include NETFrameworkVisual Studio.NETMicrosoft’s.NET Framework and Visual Studio.NET SharedSourceCommonLanguageInitiative SSCLIBSDUnixAppleOS-XThe Shared Source Common Language Initiative (SSCLI) that runs on BSD Unix and Apple OS-X MonoNovellMono open source effort led by Novell and others 30.NETMore than 30 languages support.NET: VB.NET, C#, J#, managed C++, Cω, Spec#F#, JavaScript, TypescriptMicrosoft: VB.NET, C#, J#, managed C++, Cω, Spec#, F#, JavaScript, Typescript Python, Perl, Cobol, Delphi, Pascal, EiffelPython, Perl, Cobol, Delphi, Pascal, Eiffel, and many others by non-Microsoft vendors
19
7/23/2016 19.NET - What and Why Visual Studio.NET: Tool for.NET Development Visual Studio.NET Windows Forms Tools Web Forms Tools Error Handling Data Access Multiple Languages Web Services Tools DevelopDebugDeployDesign
20
Much of.NET to be Open Sourced 7/23/2016 20.NET - What and Why Announced 4/3/2014
21
7/23/2016 21.NET - What and Why The.NET Framework Components Win32 MessageQueuingCOM+ (Transactions, Partitions, Object Pooling) IISWMI Common Language Runtime.NET Framework Class Library ADO.NET and XML XML Web Services User Interface Visual Basic C++C# ASP.NET PerlPython… Database support Web Apps and Services Base Class Library JIT, GC, Exceptions, Debugging, etc. Web Server Base OS API
22
7/23/2016 22.NET - What and Why Thus, … projectSolutions/Applications can be developed in any.NET language or languages (by project) that fully supports the features used by the application and that adheres to the standards solutionDifferent parts of an application (solution) can be developed in different languages projectVisual Studio compiles a project with a single language compiler, thus source code within a project must be in same language, but it can use components such as class libraries written and compiled in other languages
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.