際際滷

際際滷Share a Scribd company logo
Microsoft .NET 4.0 framework
       Online Session
     Abd El-Rahman Hosny M.
         MSP Assiut Uni.


      The session will start on 2:00 PM
Microsoft .NET 4.0 framework
       Online Session
      Abd El-Rahman Hosny M.
          MSP Assiut Uni.


     The session will start in few moments.
           Thanks for your patience.
Agenda
 Previous State of Affairs
  - Punched Cards.
  - Assembly Programming.
  - C/Windows API
  - C++/MFC
  - Visual Basic 6.0
  - Java
  - COM
 The .NET Solution
 Whats next ?!



                                  3-29
Previous State of Affairs

 Punched Cards

- Piece of paper, that contains digital information.
- Information is represented by the presence or absence of holes
  in predefined positions.




                                                                   4-29
 Assembly Programming

-   More readable for programmers.
-   Consists of machine instructions.
-   Each computer architecture has its own assembly commands.
-   Reduced Instruction Set Computing (RISC).
-   Complex Instruction Set Computing (CISC).
-   Using assembler: assembly code => executable machine code.
-   However, still a low-level programming language.

- High-level assembler for assembly languages that have some
  high-level programming features.




                          Previous State of Affairs         5-29
 Previous State of Affairs   6-29
 C/Windows API

- To develop software for Windows operating systems, we use
  C programming language with the Windows application
  programming interface (API).
- Large number of applications already created with this
  approach.
- However 
  Manual memory management.
  Ugly pointer arithmetic.
  Spaghetti code (thousands of functions & data types).




                         Previous State of Affairs       7-29
 C++/MFC

- Object-oriented layer on top of C.
- Benefits of OOP (Encapsulation, Inheritance, Polymorphism)
- Microsoft Foundation Classes (MFC) are set of C++ classes
  that facilitate building Windows applications.
- MFC hade the underlying Windows API and provide classes,
  macros and code generation tools (wizards).

- However 
  Backward compatibility with C makes it prone to the same
  problems (memory management, pointers, constructs).




                         Previous State of Affairs        8-29
 Visual Basic 6.0

- Programmer is now able to build complex user interfaces and
  code libraries.
- Can access databases easily.
- Hide Windows API by using code wizards, VB data types,
  classes and VB-specific functions.

- However 
  Not fully OO (rather its object-based).
  No is-a relationship (No inheritance).
  No Multi-threaded applications (actually we can use lower
  level APIs.



                          Previous State of Affairs        9-29
 Java

-   C-Like
-   Pure Object-Oriented.
-   Platform independent.
-   Developers can build 100% pure java applications.

- However 
  Little language integration (must use Java front to back during
  the development life cycle.
  Limited ability to access non-Java APIs.




                           Previous State of Affairs 10-29
 COM

- Stands for Component Object Model.
- Microsofts previous application development framework.

- If you build your types in accordance with the rules of COM,
  you end up with a block of reusable binary code.

- Language-Independent.
- ATL ( Active Template Library) provides a set of C++ classes,
  templates & macros.

  - However  Complex Data Type representation



                          Previous State of Affairs      11-29
12-29
The .NET Solution


-   Interoperability with existing source code.
-   Support for many programming language.
-   Common run-time engine shared by all .NET-aware languages.
-   Complete and total language integration.
-   Comprehensive base class libraries.
-   No COM.
-   Simplified deployment model.




                                                             13-29
.NET Building Blocks


     CLR                                        CLS
                           CTS
Common Language                           Common Language
                     Common Type System
   Runtime                                  Specification




                           The .NET Solution       14-29
 CTS (Common Type System)

- CTS Specification fully describes all possible data types and
  programming constructs supported by the run-time.
- CTS specifies how these entities can interact with each other
  and how they are represented in the .NET metadata format.
- Some .NET language might not support every feature defined
  by the CTS.




                             The .NET Solution               15-29
 CLS (Common Language Specification)

- CLS is a set of rules that describes, in detail, the minimal and
  complete set of features a given .NET-aware compiler must
  support to produce code that can be hosted by the CLR, while
  at the same time can be accessed in a uniform manner by all
  languages that the .NET platform support.
- CLS is a subset of the full functionality of CTS.




                              The .NET Solution                 16-29
 CLR (Common Language Runtime)

-   The CLR locate, load and manage .NET types on your behalf.
-   Memory Management (Garbage Collector).
-   Application Hosting.
-   Handling Threads.
-   Security Checks.




                             The .NET Solution              17-29
 CLR (Common Language Runtime) .. cont.


- When an assembly is referenced for use, mscore.dll is loaded
  automatically, which loads the required assembly in turn.
  (MS Common Object Runtime Execution Engine).
- Creating the required custom types.
- The key assembly is the mscore.dll, which contains a large
  number of types, that encapsulate a wide variety of common
  programming tasks as well as the core data types used by all
  .NET languages.




                             The .NET Solution              18-29
Base Class Libraries
- In addition to CLR and CTS/CLS specifications, the .NET
  platform provides a base class library that is available to all
  .NET programming languages




                               The .NET Solution               19-29
 The .NET Solution   20-29
- CIL: the same as Java bytecode, it not compiled into platform
  specific instructions until absolutely necessary.
- You can view the CIL code of any assembly using either:
  ildasm.exe or using Reflector.




                             The .NET Solution            21-29
- Metadata
  describes, in detail, the characteristics of every type within the
  binary.

- Manifest:
  The current version of the assembly.
  Culture information (localizing string & image resources).
  List of externally referenced assemblies that are required for
   the proper execution of the program.

 Single-File assembly vs. Multi-File assembly.




                               The .NET Solution              22-29
SO >>

         The .NET Solution   23-29
24-29
Whats Next ?!




                 25-29
 Criticism

- Applications running in a managed environment tend to
  require more system resources than similar applications that
  access machine resources more directly
- Managed byte code can often be easier to reverse-engineer
  than native code.
- The .NET Framework currently does not provide support for
  calling Streaming SIMD Extensions (SSE) via managed code.
- While the standards that make up .NET are inherently cross-
  platform, Microsoft's full implementation of .NET is only
  supported on Windows.




                                                             26-29
- Pro C# 2010 and the .NET 4 platform.
  By: Andrew Troelsen

- Microsoft Developers Network (MSDN).

- Wikipedia.




                                         27-29
28-29
Abd El-Rahman Hosny M.
3rd Grade  Faculty of Computers and Information
      Microsoft Student Partner  Assiut Uni.
 abdelrahman.hosny@studentpartner.com

             @_abdelrahmanhm_
             /abdelrahman.hosny.m



                                                   29-29

More Related Content

.NET Online Session

  • 1. Microsoft .NET 4.0 framework Online Session Abd El-Rahman Hosny M. MSP Assiut Uni. The session will start on 2:00 PM
  • 2. Microsoft .NET 4.0 framework Online Session Abd El-Rahman Hosny M. MSP Assiut Uni. The session will start in few moments. Thanks for your patience.
  • 3. Agenda Previous State of Affairs - Punched Cards. - Assembly Programming. - C/Windows API - C++/MFC - Visual Basic 6.0 - Java - COM The .NET Solution Whats next ?! 3-29
  • 4. Previous State of Affairs Punched Cards - Piece of paper, that contains digital information. - Information is represented by the presence or absence of holes in predefined positions. 4-29
  • 5. Assembly Programming - More readable for programmers. - Consists of machine instructions. - Each computer architecture has its own assembly commands. - Reduced Instruction Set Computing (RISC). - Complex Instruction Set Computing (CISC). - Using assembler: assembly code => executable machine code. - However, still a low-level programming language. - High-level assembler for assembly languages that have some high-level programming features. Previous State of Affairs 5-29
  • 6. Previous State of Affairs 6-29
  • 7. C/Windows API - To develop software for Windows operating systems, we use C programming language with the Windows application programming interface (API). - Large number of applications already created with this approach. - However Manual memory management. Ugly pointer arithmetic. Spaghetti code (thousands of functions & data types). Previous State of Affairs 7-29
  • 8. C++/MFC - Object-oriented layer on top of C. - Benefits of OOP (Encapsulation, Inheritance, Polymorphism) - Microsoft Foundation Classes (MFC) are set of C++ classes that facilitate building Windows applications. - MFC hade the underlying Windows API and provide classes, macros and code generation tools (wizards). - However Backward compatibility with C makes it prone to the same problems (memory management, pointers, constructs). Previous State of Affairs 8-29
  • 9. Visual Basic 6.0 - Programmer is now able to build complex user interfaces and code libraries. - Can access databases easily. - Hide Windows API by using code wizards, VB data types, classes and VB-specific functions. - However Not fully OO (rather its object-based). No is-a relationship (No inheritance). No Multi-threaded applications (actually we can use lower level APIs. Previous State of Affairs 9-29
  • 10. Java - C-Like - Pure Object-Oriented. - Platform independent. - Developers can build 100% pure java applications. - However Little language integration (must use Java front to back during the development life cycle. Limited ability to access non-Java APIs. Previous State of Affairs 10-29
  • 11. COM - Stands for Component Object Model. - Microsofts previous application development framework. - If you build your types in accordance with the rules of COM, you end up with a block of reusable binary code. - Language-Independent. - ATL ( Active Template Library) provides a set of C++ classes, templates & macros. - However Complex Data Type representation Previous State of Affairs 11-29
  • 12. 12-29
  • 13. The .NET Solution - Interoperability with existing source code. - Support for many programming language. - Common run-time engine shared by all .NET-aware languages. - Complete and total language integration. - Comprehensive base class libraries. - No COM. - Simplified deployment model. 13-29
  • 14. .NET Building Blocks CLR CLS CTS Common Language Common Language Common Type System Runtime Specification The .NET Solution 14-29
  • 15. CTS (Common Type System) - CTS Specification fully describes all possible data types and programming constructs supported by the run-time. - CTS specifies how these entities can interact with each other and how they are represented in the .NET metadata format. - Some .NET language might not support every feature defined by the CTS. The .NET Solution 15-29
  • 16. CLS (Common Language Specification) - CLS is a set of rules that describes, in detail, the minimal and complete set of features a given .NET-aware compiler must support to produce code that can be hosted by the CLR, while at the same time can be accessed in a uniform manner by all languages that the .NET platform support. - CLS is a subset of the full functionality of CTS. The .NET Solution 16-29
  • 17. CLR (Common Language Runtime) - The CLR locate, load and manage .NET types on your behalf. - Memory Management (Garbage Collector). - Application Hosting. - Handling Threads. - Security Checks. The .NET Solution 17-29
  • 18. CLR (Common Language Runtime) .. cont. - When an assembly is referenced for use, mscore.dll is loaded automatically, which loads the required assembly in turn. (MS Common Object Runtime Execution Engine). - Creating the required custom types. - The key assembly is the mscore.dll, which contains a large number of types, that encapsulate a wide variety of common programming tasks as well as the core data types used by all .NET languages. The .NET Solution 18-29
  • 19. Base Class Libraries - In addition to CLR and CTS/CLS specifications, the .NET platform provides a base class library that is available to all .NET programming languages The .NET Solution 19-29
  • 20. The .NET Solution 20-29
  • 21. - CIL: the same as Java bytecode, it not compiled into platform specific instructions until absolutely necessary. - You can view the CIL code of any assembly using either: ildasm.exe or using Reflector. The .NET Solution 21-29
  • 22. - Metadata describes, in detail, the characteristics of every type within the binary. - Manifest: The current version of the assembly. Culture information (localizing string & image resources). List of externally referenced assemblies that are required for the proper execution of the program. Single-File assembly vs. Multi-File assembly. The .NET Solution 22-29
  • 23. SO >> The .NET Solution 23-29
  • 24. 24-29
  • 25. Whats Next ?! 25-29
  • 26. Criticism - Applications running in a managed environment tend to require more system resources than similar applications that access machine resources more directly - Managed byte code can often be easier to reverse-engineer than native code. - The .NET Framework currently does not provide support for calling Streaming SIMD Extensions (SSE) via managed code. - While the standards that make up .NET are inherently cross- platform, Microsoft's full implementation of .NET is only supported on Windows. 26-29
  • 27. - Pro C# 2010 and the .NET 4 platform. By: Andrew Troelsen - Microsoft Developers Network (MSDN). - Wikipedia. 27-29
  • 28. 28-29
  • 29. Abd El-Rahman Hosny M. 3rd Grade Faculty of Computers and Information Microsoft Student Partner Assiut Uni. abdelrahman.hosny@studentpartner.com @_abdelrahmanhm_ /abdelrahman.hosny.m 29-29