Introducing the Microsoft® .NET Framework Tautvydas Dagys 2009
What is .NET Framework?
With .NET framework you can create Console applications. Windows GUI applications (Windows Forms/WPF). ASP.NET applications. XML Web services/WCF. Windows services. Mobile Applications Office Add-inns Silverlight applications
Architecture of .NET?
Common Language Runtime (CLR)
Additional CLR services Memory management Thread management Exception handling Garbage collection Security
Base Class Library Is a collection of reusable types Is a foundation on which .NET applications, components, and controls are built Is object oriented Custom code can derive functionality from base classes Custom code can implement provided interfaces All types are organized into namespaces
Base Class Library types: Represent base data types and exceptions. Encapsulate data structures. Perform I/O. Access information about loaded types. Invoke .NET Framework security checks. Provide data access, rich client-side GUI, and server-controlled, client-side GUI.
.NET Framework main namespaces System System.Data System.Xml System.Web Globalization Text Security Collections Resources Reflection Net IO Threading Diagnostics ServiceProcess Configuration Design ADO.NET SqlClient Xslt/XPath XmlDocument Runtime InteropServices Remoting Serialization SessionState Caching Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Printing System.WinForms ComponentModel Reader/Writers
Common Type System Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution. Provides an object-oriented model that supports the complete implementation of many programming languages. Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.
What are Assemblies? Building blocks of .NET Framework applications Collection of types and resources are built to work together and form logical unit of functionality Fundamentas unit of deployment, version control, reuse, activation scoping, and security permissions To the runtime, a type does not exist outside the context of an assembly. In simple words: execs, dlls One Visual Studio Project > one Assembly
Runtime Hosts ASP.NET (WebServer) Browser Office applications Shell exceutables (console, GUI)
ASP.NET Supports creating Web Apps Mobile Web Apps MVC apps Web Services
ADO.NET * Types for supporting MS SQL and other database access
Win Forms / Windows Presentation Foundation Full set of libraries for creating classic or media rich client applications
.NET Versions Version 1.0 Version 1.1 Version 2.0 Version 3.0 Version 3.5 Version 3.5 SP1 Version 4.0 Currently in Beta
What was new in .NET Framework 3.0? The programming model, runtime, and tools for building long-running, persistent, workflow- and rules-based applications Windows Presentation Foundation (WPF) Windows Workflow Foundation (WF) Windows Communication Foundation (WCF) A framework for building user interfaces for applications and media-rich experiences An interoperable framework for building connected applications, with a focus on service orientation and Web services
What is Microsoft .NET Framework 3.5? The 5th version of the Microsoft .NET Framework Fully supported in Visual Studio 2008 Builds incrementally on .NET Framework 3.0 SP1, which was built on .NET Framework 2.0 SP1 Microsoft Visual Studio 2008 .NET Framework 3.5 .NET Framework 3.0 SP1 .NET Framework 2.0 SP1 18
What’s new in .NET Framework 3.5? WPF WF WCF Language Integrated Query (LINQ) for SQL-like data querying Integrated support for ASP.NET AJAX and new Web Services standards …. 19
What’s new in .NET Framework 3.5? WPF WF WCF LINQ provides SQL-like data-querying capabilities Language extensions to C# and Microsoft Visual Basic® that add native data querying capabilities, using a syntax like SQL Support is deeply integrated throughout .NET Framework 3.5 runtime, compiler, and class libraries Lets you write code in any LINQ-enabled language to query and filter objects, SQL databases, DataSets, and XML by using a SQL-like syntax Enables increased programming productivity and simpler, easier-to-maintain code 20
LINQ Examples
What’s new in .NET Framework 3.5? WPF WF WCF Support for building Web 2.0-style applications Integrated ASP.NET AJAX support with JavaScript Object Notation (JSON) Enabling support for Web programming models such as Plain Old XML (POX), Representational State Transfer (REST) and syndication feed format such as Really Simple Syndication (RSS) and ATOM. 22
What’s new in .NET framework 3.5 SP1 ADO.NET Entity Framework (ORM) ASP.NET Dynamic Data
.NET Interoperability Mono project : .NET port for Linux
Tools Text Editor + Compiler Opensource solutions, like Resharper Visual Studio
Questions and answers