DOC PREVIEW
Microsoft .NET

This preview shows page 1-2-16-17-18-34-35 out of 35 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Microsoft .NETAgendaDefinition…EvolutionArchitecture.NET Core ComponentsJava and .NET: Runtime environmentsCommon Language RuntimeCompiling and executing managed codeSlide 10C#.NET languagesLanguage Compiler ListWhy C# ?The safety of JavaThe ease of Visual BasicThe power of C++Slide 18“foreach” loopsAutomatic “boxing”Inheritance and interfacesFruit example: class Fruit & constructorFruit example: a few Fruit methodsA couple of methods from class AppleSnippets from class Bowl.NET vs. J2EEBasic TruthsSlide 28Typical N-tier application architecture.NET and Java: application platforms.NET vs. Java: standard librariesClass Libraries.NET Class LibraryClass LibraryThanks…Microsoft .NET Object Oriented Software Engineering Course PresentationMurat Can Ganiz04/01/2004Murat Can Ganiz, Lehigh University, 20042Agenda.NETC#.NET vs. J2EE (C# vs. Java)Any .NET or C# programmers here?Murat Can Ganiz, Lehigh University, 20043Definition…“Microsoft .NET is a set of Microsoft software technologies for connecting information, people, systems and devices.”Defining the Basic Elements of .NET: http://www.microsoft.com/net/basics/whatis.aspIn real terms to the developer:A new platform for building applications that run in stand-alone mode or over the InternetMurat Can Ganiz, Lehigh University, 20044EvolutionNext Generation of COM:Component oriented software:Win32/C-style APIs are outdatedCOM was step in right direction, but painful to program withCOM was restricted to VB, C++Binary compatibility/portability an issue: x86 version of COM component needed to be compiled for e.g. PowerPCMemory management also a painCommon Object Runtime:An execution environment for components written in any language:Eventually became .NET with incorporation of Web ServicesStandardised APIWeb Services:Interoperability is key in the connected world:Require open standards for interoperability and leveraging legacy codeMurat Can Ganiz, Lehigh University, 20045ArchitectureMurat Can Ganiz, Lehigh University, 20046.NET Core Components• FCL is Framework Class Library, comparable to JDK’s libraryMurat Can Ganiz, Lehigh University, 20047Java and .NET: Runtime environmentsJavaIntermediate language is bytecodeOriginal design targeted interpretationJava VMs with JIT compilation are now also used.NET FrameworkIntermediate language is MSILProvides JIT compilationWhat is JIT?Just-In-Time compilation: translates a bytecode method into a native method on the fly, so as to remove the interpretation overheadMurat Can Ganiz, Lehigh University, 20048Common Language RuntimeCLR sits on top of OS to provide a virtual environment for hosting managed applicationsWhat is similar to in Java?Java Virtual Machine (JVM)CLR loads modules containing executable and executes their codeCode might be managed or unmanagedIn either case the CLR determines what to do with itManaged Code consists of instructions written in a pseudo-machine language called common intermediate language, or IL.IL instructions are just-in-time (JIT) compiled into native machine code at run timeMurat Can Ganiz, Lehigh University, 20049Compiling and executing managed codeSource CodeLanguage CompilerMicrosoft Intermediate Language (MSIL)CompilationJIT CompilerNativeCodeThe first time each method is calledExecutionMurat Can Ganiz, Lehigh University, 200410Common Language RuntimeC#Murat Can Ganiz, Lehigh University, 200412.NET languagesOver 20 .NET-compatible languagesMost are provided by 3rd parties.NET languages provided by MicrosoftC++Visual BasicC#Murat Can Ganiz, Lehigh University, 200413Language Compiler ListAdaAdaAPLAPLBasic (Visual Basic)Basic (Visual Basic)C#C#CCC++C++Java LanguageJava LanguageCOBOLCOBOLComponent PascalComponent Pascal(Queensland U Tech)(Queensland U Tech)ECMAScript (JScript)ECMAScript (JScript)EiffelEiffel (Monash U.) (Monash U.)Haskell (Utrecht U.)Haskell (Utrecht U.)lcc lcc (MS Research Redmond)(MS Research Redmond)Mondrian (Utrecht)Mondrian (Utrecht)ML ML (MS Research Cambridge)(MS Research Cambridge)Mercury Mercury (Melbourne U.) (Melbourne U.) Oberon Oberon (Zurich University)(Zurich University)Oz (Univ of Saarlandes)Oz (Univ of Saarlandes)PerlPerlPythonPythonScheme (Northwestern U.)Scheme (Northwestern U.)SmallTalkSmallTalkMurat Can Ganiz, Lehigh University, 200414Why C# ?Important features are spread out over multiple languagesExample: do you think developers should have to choose between pointers (C++) or garbage collection (Java)?Old languages + new features = poor syntaxGarbage collection in C++?Event-driven GUIs in Java?Increase developer productivity!Type safetyGarbage collectionExceptionsMurat Can Ganiz, Lehigh University, 200415The safety of Java100% object orientedAutomatic garbage collectionArray bounds checking at runtimeStrict type checkingStructured exception handlingMurat Can Ganiz, Lehigh University, 200416The ease of Visual BasicFirst class support for propertiesFirst class support for eventsforeach loopsMurat Can Ganiz, Lehigh University, 200417The power of C++EnumerationsOperator overloadingMathematical, Indexing, and CastingFunction pointersCalled “delegates”Type safeStructsMurat Can Ganiz, Lehigh University, 200418The power of C++Option to pass parameters by reference or by valueCan disable type-safety, garbage collection, and bounds checkingCan directly manipulate memory with pointersMurat Can Ganiz, Lehigh University, 200419“foreach” loopsIterates over arrays or any class that implements the IEnumerable interfaceInt32[] myArray = new Int32[]{10, 20, 30, 40};Int32[] myArray = new Int32[]{10, 20, 30, 40};foreach(Int32 i in myArray){foreach(Int32 i in myArray){ Console.WriteLine(i);Console.WriteLine(i);}}Murat Can Ganiz, Lehigh University, 200420Automatic “boxing”Automatically converts primitive values to objects as neededStack s = new Stack();Stack s = new Stack();s.push( 42 );s.push( 42 );......int x = (int)s.pop();int x = (int)s.pop();Stack s = new Stack();Stack s = new Stack();s.push( new Integer( 42 ) );s.push( new Integer( 42 ) );......int x = ((Integer)s.pop()).intValue();int x = ((Integer)s.pop()).intValue();Murat Can Ganiz, Lehigh University, 200421Inheritance and interfacesC++ syntaxSimply use a colon


Microsoft .NET

Download Microsoft .NET
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Microsoft .NET and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Microsoft .NET 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?