7
Defining the.NET Framework The.NET Framework is  A software development environment  A runtime engine for Managed Code  A platform designed for Internet-Distributed software The.NET Framework is an exciting new computing platform

10
Cross Language Support The.NET Framework supports many languages Any compiler can be modified to emit managed executables  IL and metadata Languages that target the.NET Framework  C#, Visual Basic, C++, Java, PERL, COBOL, SmallTalk  Dozens more existing and on the way Regardless of source language, all managed code can  Use the same tools  Use the same reusable components  Take advantage of features of the CLR Developers use their language of choice

11
Platform Independent Support.NET Linux Development tool has been created to date (Mono & DotGNU) Mono  Primary Component is CLR which executes.net Byte-code (MSIL)  Same as Java Runtime Environment. DotGNU  More Focused on Web Service area of.NET

15
Managed Code and the CLR The Common Language Runtime (CLR) is a runtime engine  Manages.NET Code (such as C# applications)  Provides features such as memory management, thread management, object type safety, security, etc.  Is a part of the.NET Framework

20
Just-in-Time Compiling All managed code runs in native machine language All managed code is made up of IL and metadata The CLR JIT-compiles the IL and metadata  At execution time  Executed directly by CPU Allows for the best of both worlds  Code management features  Performance of full-speed execution

23
The Common Language Runtime The Common Language Runtime (CLR)  Execution engine of The.NET Framework  Offers many system services  Similar to an OS  Runs on a host OS The.NET Framework  New platform by Microsoft  Designed to target the Internet

25
…The Purpose of the CLR Bug reduction  More code interacting, bugs affect more users Ease of integration Developer investment  Reuse skills from project to project, even if the projects are vastly different

28
Automatic Memory Management The CLR manages memory for managed code  All allocations of objects and buffers made from a Managed Heap  Unused objects and buffers are cleaned up automatically through Garbage Collection Some of the worst bugs in software development are not possible with managed code  Leaked memory or objects  References to freed or non-existent objects  Reading of uninitialized variables Pointerless environment

29
A B E D C The Managed Heap = Object or buffer in memory class MyClass{ void Method(){ Variable v1; Variable v2; do{. Objects A and D will be cleaned up because neither is directly or indirectly referenced by code Garbage Collection

30
Garbage collection occurs when a new operation fails due to lack of memory All managed threads are stopped Collection starts with roots, and recursively finds referenced objects  Roots == globals, locals, cpu registers Referenced objects are moved down in the managed heap,  Making space available at the end  Removing unreachable objects  No Fragmentation References fixed-up and managed threads restarted

34
The Framework Class Library A huge collection of reusable types  Classes, interfaces, enumerations and structures For use by any managed code  Including code written in any managed programming language Types for  Common tasks such as collections, file IO, memory and thread management  GUI and window manipulation  Web form and web service applications Totally object oriented toolbox for developers  Ships as part of the.NET Framework

35
Using the FCL Types are arranged in a hierarchy of Namespaces A type’s full name includes its namespaces  Form class is actually System.Windows.Forms.Form  Use using to indicate namespaces in source code Assembly references are necessary for many types The SDK documentation is critical for using SDK types  Includes descriptions  Often includes useful code samples  Indicates namespaces and assemblies for types

38
Versioning Assemblies Assemblies can be strongly named  Includes public/private key information Strong named assemblies bind by version  Code that uses V1 uses V1 even after V2 is installed on the system  Avoids DLL hell  Gives you the freedom to make V2 components incompatible with V1 Strong binding is a major improvement over DLLs

39
Top 10 Reasons to Move to.NET

40
Reason 1 In the past, the Microsoft architecture has been built on COM/DCOM, a binary standard for allowing cross- process communication that standard didn't have any relevance outside the Microsoft world In the past, the Microsoft architecture has been built on COM/DCOM, a binary standard for allowing cross- process communication that standard didn't have any relevance outside the Microsoft world ADO Recordset also saves data in Binary Format and Binary Format has no meaning for non Microsoft Environment. ADO Recordset also saves data in Binary Format and Binary Format has no meaning for non Microsoft Environment.. Net uses completely standards-based like Xml linked with XSD so that client can validate the data.. Net uses completely standards-based like Xml linked with XSD so that client can validate the data. SOAP is an XML-based protocol that communicates with Web services. The integration of SOAP allows for easy programmatic access by any client, whether or not that client is running a Microsoft operating system. SOAP is an XML-based protocol that communicates with Web services. The integration of SOAP allows for easy programmatic access by any client, whether or not that client is running a Microsoft operating system. XML, SOAP, and more Standards integration

41
Reason 2 COM makes extensive use of the Windows Registry to locate components on the machine. The concept was good, but there would only ever be a single instance of a component registered, and all applications would use the same version. COM promised to have new versions maintain backwards compatibility with old versions, but developers were free to break this compatibility, and sometimes did. COM makes extensive use of the Windows Registry to locate components on the machine. The concept was good, but there would only ever be a single instance of a component registered, and all applications would use the same version. COM promised to have new versions maintain backwards compatibility with old versions, but developers were free to break this compatibility, and sometimes did..Net doesn't use the registry, most deployments can simply be done with a copy command. There's often no need to develop installation files. Also, Web applications don't lock assemblies, so you don't have to shut down an application to update a DLL..Net doesn't use the registry, most deployments can simply be done with a copy command. There's often no need to develop installation files. Also, Web applications don't lock assemblies, so you don't have to shut down an application to update a DLL. Ease of Deployment

42
Reason 3 Microsoft is on the Web service bandwagon in a major way, and it's never been easier to develop Web services than it is with.Net. You can create simple Web services with Notepad and not even have to run them through a compiler; simply call them and.Net compiles them and even generates a test page so you can verify they are working..Net has all the plumbing needed and generates all the files you need, such as the WSDL file. Microsoft is on the Web service bandwagon in a major way, and it's never been easier to develop Web services than it is with.Net. You can create simple Web services with Notepad and not even have to run them through a compiler; simply call them and.Net compiles them and even generates a test page so you can verify they are working..Net has all the plumbing needed and generates all the files you need, such as the WSDL file..Net is also a smart consumer of Web services: Once you set a reference to a Web service, you treat it just like a local assembly. You get full Intelligence and function completion help..Net is also a smart consumer of Web services: Once you set a reference to a Web service, you treat it just like a local assembly. You get full Intelligence and function completion help. Web service support

43
Reason 4 User finally have an integrated set of tools for all your languages like VB.NET,C# etc. User finally have an integrated set of tools for all your languages like VB.NET,C# etc. Standard toolset for any.Net language

44
Reason 5 Soon after the release of Visual Studio.Net, Microsoft released the Microsoft Mobile Internet Toolkit (MMIT) for building mobile applications using.Net. This allows you to visually drag and drop controls on forms aimed at mobile devices. The toolkit handles writing the proper markup language (e.g., WML, WAP, and so forth). Soon after the release of Visual Studio.Net, Microsoft released the Microsoft Mobile Internet Toolkit (MMIT) for building mobile applications using.Net. This allows you to visually drag and drop controls on forms aimed at mobile devices. The toolkit handles writing the proper markup language (e.g., WML, WAP, and so forth). Coming soon will be the.Net Compact Framework, a scaled- down version of the Framework designed to run on Pocket PC devices. This will enable developers to create rich applications to run on Pocket PC computers. Coming soon will be the.Net Compact Framework, a scaled- down version of the Framework designed to run on Pocket PC devices. This will enable developers to create rich applications to run on Pocket PC computers. Support for mobile devices

46
Reason 7.NET Application can also be build and executed in other platforms like LINUX.NET Application can also be build and executed in other platforms like LINUX Platform Independent

47
Reason 8 Net has probably spawned more books than any other programming technology. Net has probably spawned more books than any other programming technology. There are a number of Web sites that provide techniques and tutorials for developers moving to.Net. There are a number of Web sites that provide techniques and tutorials for developers moving to.Net. No lack of learning resources

48
Reason 9 Completely OOPS Completely OOPS The languages were built with an n-tier, component-based approach in mind. The languages were built with an n-tier, component-based approach in mind. Modernized languages

49
Reason 10 One of the banes of VB developers has been that a string in VB was not the same as a string in C++, so when calling Windows API functions, there could be some problems..Net specifies a standard definition for all types, so a string in VB.Net is the same as a string in C#, which is the same as a string in netCOBOL.Net. One of the banes of VB developers has been that a string in VB was not the same as a string in C++, so when calling Windows API functions, there could be some problems..Net specifies a standard definition for all types, so a string in VB.Net is the same as a string in C#, which is the same as a string in netCOBOL.Net. Standard base types across languages