Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft.NET Framework Overview Svetlin Nakov Software Development Consultant, Part-time Computer Science Lecturer Sofia University “St. Kliment Ohridski”

Similar presentations


Presentation on theme: "Microsoft.NET Framework Overview Svetlin Nakov Software Development Consultant, Part-time Computer Science Lecturer Sofia University “St. Kliment Ohridski”"— Presentation transcript:

1

2 Microsoft.NET Framework Overview Svetlin Nakov Software Development Consultant, Part-time Computer Science Lecturer Sofia University “St. Kliment Ohridski” http://www.nakov.com

3 .NET Enterprise Vision ERP & Billing Customer Service Sales Users Any device, Any place, Any time XML Web Services Integrate business applications and processes Back Office Heterogeneous application and server infrastructure Scheduling Authentication Notification

4 .NET Framework  Programming model for.NET  Platform for running.NET code in a managed environment  Provides a very good environment to develop networked applications and Web Services  Provides programming API and unified language-independent development framework  Code runs on multiple platforms (Windows, Linux, FreeBSD, …)  Programming model for.NET  Platform for running.NET code in a managed environment  Provides a very good environment to develop networked applications and Web Services  Provides programming API and unified language-independent development framework  Code runs on multiple platforms (Windows, Linux, FreeBSD, …)

5 The Core of.NET Framework: FCL & CLR  Common Language Runtime  Garbage collection  Language integration  Multiple versioning support for assemblies (no more DLL hell!)  Integrated security  Framework Class Library  Provides the core functionality: ASP.NET, Web Services, ADO.NET, Windows Forms, IO, XML, etc.

6 .NET Framework Common Language Runtime Operating System Common Language Runtime  CLR manages code execution at runtime  Memory management, thread management, etc.  Code-based security  Role-based security

7 .NET Framework Base Class Library Operating System Common Language Runtime.NET Framework (Base Class Library)  Object-oriented collection of reusable types  Collections, I/O, Strings, …

8 .NET Framework Data Access Layer Operating System Common Language Runtime.NET Framework (Base Class Library) ADO.NET and XML  Access relational databases  Disconnected data model  Work with XML

9 .NET Framework ASP.NET & Windows Forms Operating System Common Language Runtime.NET Framework (Base Class Library) ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms  Create application’s front-end – Web-based user interface, Windows GUI, Web services, …

10 .NET Framework Programming Languages Operating System Common Language Runtime.NET Framework (Base Class Library) ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms C++C#VB.NETPerlJ#…  Use your favorite language

11 .NET Framework Common Language Specification Operating System Common Language Runtime.NET Framework (Base Class Library) ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms Common Language Specification C++C#VBPerlJ#…

12 .NET Framework Visual Studio.NET Operating System Common Language Runtime.NET Framework (Base Class Library) ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms Common Language Specification C++C#VBPerlJ#… Visual Studio.NET

13 Multiple Language Support  IL (MSIL or CIL) – Intermediate Language  It is low-level (machine) language, like Assembler, but is Object-oriented  CTS is a rich type system built into the CLR  Implements various types (int, float, string, …)  And operations on those types  CLS is a set of specifications that all languages and libraries need to follow  This will ensure interoperability between languages

14 Example of MSIL Code.method private hidebysig static void Main() cil managed {.entrypoint.entrypoint // Code size 11 (0xb) // Code size 11 (0xb).maxstack 8.maxstack 8 IL_0000: ldstr "Hello, world!" IL_0000: ldstr "Hello, world!" IL_0005: call void [mscorlib]System.Console::WriteLine(string) IL_0005: call void [mscorlib]System.Console::WriteLine(string) IL_000a: ret IL_000a: ret } // end of method HelloWorld::Main

15 .NET Languages  Languages provided by Microsoft  C++, C#, J#, VB.NET, JScript  Third-parties languages  Perl, Python, Pascal, APL, COBOL, Eiffel, Haskell, ML, Oberon, Scheme, Smalltalk…  Advanced multi-language features  Cross-language inheritance and exceptions handling  Single project can share code written in multiple languages  Integration is built in, not bolted on  No additional rules or API to learn

16 C# Language  Mixture between C++, Java and Delphi  Component-oriented  Properties, Methods, Events  Attributes, XML documentation  All in one place, no header files, IDL, etc.  Can be embedded in Web applications  Everything really is an object  Primitive types aren’t magic, e.g. 5.ToString() is valid  Unified type system == Deep simplicity  Good extensibility and reusability

17 C# Language – Example using System; class HelloWorld { public static void main() { Console.WriteLine(“Hello, world!”); }}

18 Code Compilation and Execution Compilation - Install time precompilation - Install time precompilation Execution JIT Compiler NativeCode MSIL Code Metadata Source Code Language Compiler Also called Assembly (.EXE or.DLL file) Also called Assembly (.EXE or.DLL file) - First time each method is called

19 VS.NET – Single Development Environment & Skill Set  From Visual Studio.NET you can:  Write code  Design user interface  Study documentation  Execute, test and deploy  Debug  Same tools for all languages  Same tools for all platforms  Same tools for all technologies

20 Visual Studio.NET

21 The.NET Framework Library Base Class Library ADO.NET and XML Web Forms Web Services Mobile Internet Toolkit WindowsForms ASP.NET

22 System Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Runtime InteropServices Remoting Serialization System.Data Design ADO SQLTypes SQL System.Xml XPath XSLT Serialization.NET Framework Namespaces System.Web ConfigurationSessionState CachingSecurity ServicesUI HtmlControls WebControls Description Discovery Protocols System.Drawing Imaging Drawing2D Text Printing System.WinForms DesignComponentModel

23 Base Class Library Namespaces System Threading Text ServiceProcess Security Resources Reflection Net IO Globalization Diagnostics Configuration Collections Runtime Serialization Remoting InteropServices

24 Base Class Library  Data types, conversions, formatting  Collections: ArrayList, Hashtable, etc.  Globalization: Cultures, sorting, etc.  I/O: Binary and text streams, files, etc.  Networking: TCP/IP sockets, HTTP, etc.  Reflection: Metadata and IL emit  Security: Permissions, cryptography  Text: Encodings, regular expressions  Multithreading and synchronization  Remoting and serialization

25 Data And XML Namespaces System.Data SQLTypes SQLClient Common OleDb System.Xml Serialization XPath XSLT

26 ADO.NET And XML  ADO.NET consumes all types of data  XML (hierarchical), relational, etc.  Powerful in-memory data cache (DataSet)  DataSet contains various data objects: tables, views, relations, constraints, etc.  Lightweight, stateless, disconnected  Supports both relational and XML access  High-performance, low overhead stream access  Great XML support including:  W3C DOM, XSL/T, XPath, and Schema

27 VS.NET – DataSet Designer

28 Windows Forms Namespaces System.Drawing Drawing2D Imaging Printing Text System.Windows.Forms DesignComponentModel

29 Windows Forms   Windows Forms is framework for building rich GUI applications   RAD (Rapid Application Development)   component-based   event-driven   Rich set of controls   Data aware components   Printing support   Unicode support   UI inheritance

30 VS.NET – Windows Forms Designer

31 Demo 1  Create simple database application with:  Windows Forms  ADO.NET  MS SQL Server  Visual Studio.NET

32 DataGrid DataSetDatabaseMicrosoft SQL Server SqlConnection SqlDataAdapter Fill Update Demo 1 – Architecture Application

33 ASP.NET Namespaces System.Web Caching Configuration ServicesUI SessionState HtmlControls WebControls Description Discovery Security Protocols

34  Framework for building Web applications and Web services in any.NET language  C#, C++, VB.NET, JScript, etc.  Automatic multiple clients support  DHTML, HTML 3.2, WML, small devices  Compilation of ASP.NET Web applications into.NET assemblies  Cached the first time when called  All subsequent calls use the cached version  Separation of code and content  Developers and designers can work independently ASP.NET

35 ASP.NET  Rich set of ASP.NET server controls  Data validation  Data bound grids  Event-driven execution model  Great Web-services support  Easy to deploy  High reliability and availability  High performance and scalability  Scalable handling of state information

36 VS.NET – Web Forms Designer

37 ASP.NET WebMatrix

38 Demo 2  Create simple Web-based database application with:  ASP.NET (Web Forms)  ADO.NET  MS SQL Server  MS Internet Information Server  Visual Studio.NET

39 DataGrid DataSetDatabaseMicrosoft SQL Server SqlConnection SqlDataAdapter Fill Update Demo 2 – Architecture Web Application

40 Web Services  Web Services are programmable components accessible remotely over the Web  Built on the standards HTTP, XML and SOAP  Each service is described in WSDL  Easy accessible from any client on any platform  “Request-response” execution model – like component-based programming over the Web  ASP.NET – Simple programming model for Web Services development  Author.ASMX files with normal class methods  ASP.NET compiles on demand, generates WSDL contract, exposes HTML test page

41 Web Service Example in C# ParcelTracker.asmx using System; using System.Web.Services; public class ParcelTrackerWebService { [WebMethod] [WebMethod] public string GetOrderStatus(int orderNumber) public string GetOrderStatus(int orderNumber) { // Implementation here // Implementation here }}

42 Demo 3  Create simple Web Service with:  ASP.NET (Web Services)  MS Internet Information Server  Visual Studio.NET

43 Shared Source CLI (Rotor)  Non-commercial CLI implementation, available as source code. Contains:  Managed execution environment for MSIL with JIT-compiler  Compiler for C# and Jscript  Set of development tools – ilasm, ildasm, cordbg, metainfo, …  Implemented entirely in C++ and C#  Compiles with MS Visual Studio.NET  Available for research, academic, teaching and other non-profit use  Works on FreeBSD, Windows and Mac OS

44 .NET Framework – Resources  Visit following web sites: . NET Framework Home Site – http://msdn.microsoft.com/netframework/ http://msdn.microsoft.com/netframework/  Microsoft.NET Framework Community – http://www.gotdotnet.com/ http://www.gotdotnet.com/  ASP.NET – http://www.asp.net/ http://www.asp.net/ .NET Windows Forms – http://www.windowsforms.net/ http://www.windowsforms.net/  O’Reilly.NET Community Site – http://www.ondotnet.com/ http://www.ondotnet.com/  Microsoft Patterns and Practices – http://msdn.microsoft.com/practices/ http://msdn.microsoft.com/practices/  Code Project – http://www.codeproject.net/ http://www.codeproject.net/

45 .NET Framework – Resources  Visit following web sites:  Mono – Open Source.NET Framework – http://www.go-mono.org/ http://www.go-mono.org/  Rotor – MS Shared Source.NET CLI – http://msdn.microsoft.com/net/sscli/ http://msdn.microsoft.com/net/sscli/ .NET Framework Course in Sofia University – http://www.nakov.com/dotnet/ http://www.nakov.com/dotnet/  Read the news groups: .NET Framework Official News Group – news://msnews.microsoft.com/microsoft.public. dotnet.framework news://msnews.microsoft.com/microsoft.public. dotnet.framework news://msnews.microsoft.com/microsoft.public. dotnet.framework  The Bulgarian Developers’ Newsgroup – news://msnews.microsoft.com/microsoft.public. bg.developer news://msnews.microsoft.com/microsoft.public. bg.developer news://msnews.microsoft.com/microsoft.public. bg.developer

46 Questions?

47 My Questions  How can we create.NET Framework applications that run on mobile devices (such as mobile phones, PDA, handhelds, …)?  Answer:  Microsoft.NET Compact Framework  Standard part of MS Visual Studio.NET 2003

48 My Questions  How can we precompile.NET assemblies to speedup their execution? Any standard tool?  Answer:  Use the tool ngen.exe  It is standard part of.NET Framework

49 My Questions  MSIL is great for decompiling. How can we protect our.NET code from reverse engineering attacks?  Answer:  Use obfuscation tools like Dotfuscator


Download ppt "Microsoft.NET Framework Overview Svetlin Nakov Software Development Consultant, Part-time Computer Science Lecturer Sofia University “St. Kliment Ohridski”"

Similar presentations


Ads by Google