E N D
What is .Net? • The hype:“Microsoft .Net is a set of Microsoft software technologies for connecting information, people, systems, and devices. It enables a high level of software integration through the use of XML Web services – small, discrete, building-block applications that connect to each other as well as to other applications over the Internet.”
What is .Net, really? • .Net is a platform that provides a standardized set of services. • It’s just like Windows, except distributed over the Internet. • It exports a common interface so that it’s programs can be run on any system that supports .Net.
Goals of .Net • Maintain Microsoft dominance…? • Tie all devices to the Internet • Software as a service • Data and applications accessible on all devices • Truly compile once, run anywhere • Scalability
How Does It All Work? • Based on 3 protocols: • HTTP • XML • SOAP • XML (eXtensible Markup Language) • Separates data and view • Good, general way of describing data
Simple Object Access Protocol • Definition:“Simple and lightweight mechanism for exchanging structured and typed information between peers in a decentralized, distributed environment.” • Based on XML and HTTP • SOAP defined through XML • XML piggybacks on top of HTTP • Because it uses HTTP, firewalls aren’t a problem
.Net Platform • .Net Framework and Visual Studio .Net • Mobile Internet Toolkit • Set of programming interfaces that enable developers to target mobile devices like smart phones and PDAs • Building Block Services (ie, Passport)
.Net Framework • Programming model for .Net • Platform for running managed code in a virtual machine • Provides a very good environment to develop networked applications and Web Services
.Net Framework Contents • Common Language Runtime • Manages running code • Verifies type safety • Provides garbage collection, error handling • Provides common type system • Provides access to system resources • Win32 API, COM, etc. • A collection of unified classes • ASP.NET • ADO.NET • Access to Windows Functions: System, System.Drawing, System.Web, System.XML...
Inside the .Net Framework Unified Class libraries Unifies Programming models across languages Factored for extensibility Designed for tools C# Visual J#... Visual Basic .NET Enterprise Services ASP.NET ADO.NET Enterprise Services The services required for mission critical applications: Transactions, Messaging, Partitions, Object Pooling and Events CLR XML and Data Access ADO .NET interfaces any database, loosely coupled data access and native XML data format. Active Directory MSMQ COM+ IIS WMI Win32 CLR Executes code, maintains security, handles component “plumbing” and dependencies XML Web Services and Scripting High-productivity environmentfor building and operating XML Web services
CLI, C#Submitted to ECMA Open Language Specification XML, SOAP- based Visual Studio .NET XML-based data access Standards Compliance VB C# C++ J#... JScript Common Language Specification Web Forms XML Web services Windows Forms Data and XML Base Class Library CLR CLI
Common Language Runtime • Manages running code • Threading • Memory management • No interpreter: Install time or run time intermediate language (IL) to native compilation • Fine-grained evidence-based security • Code access security • IL can be verified to guarantee type safety • No unsafe casts, no un-initialized variables and no out-of-bounds array indexing • Role-based security • Integrated with underlying OS
Code Source Code Language Compiler MSIL Metadata Execution Native Code JIT Compiler Compilation and Execution Cycle Compilation Before installation or the first time each method is called
Base Class Library Support Thread Support COM Marshaler Type Checker Exception Manager Security Engine Debug Engine IL to Native Compilers Code Manager Garbage Collector Class Loader CLR Internals
Simplified Development • CLR makes things easy: • Self-describing components • Hierarchical namespaces • Source code to metadata • Structured exceptions • Root object class • Garbage collector
Description Discovery Protocols .Net Unified Classes System.Web (ASP .NET) System.Windows.Forms Services UI Design ComponentModel HTMLControls WebControls System.Drawing Drawing2D Printing Caching Security Imaging Text Configuration SessionState System.Data (ADO .NET) System.XML OLEDB SQLClient XSL Serialization Common SQLTypes XPath Schema System Collections IO Security Runtime InteropServices Configuration Net ServiceProcess Remoting Reflection Diagnostics Text Serialization Threading Globalization Resources
Multi-Language Development • Object system is built in, not bolted on • Use the language of choice • No additional rules or API to learn • Advanced multi-language features • Cross-language inheritance and exceptions • Supports more than 20 languages • Perl, Python, COBOL, Jscript, Eiffel, Haskell, Pascal, ML, ADA, APL, C, Visual C++, Visual J#, Visual Basic, Visual C#, SmallTalk, Oberon, Scheme, Mercury, Oz and CAML. • All languages have approximately same performance, since all turn into MSIL first. • C# is the “flagship” language for the .NET Framework. • Tools that work in multiple languages and across languages and platforms • Debugger
Simple to Use • Component-oriented • Properties, methods and events are first class • Design-time functionality • Organization • Organized in hierarchical namespaces • Unified Type System • Everything is an object • Boxing converts value types to objects • No need for special variant type • Example: 123.toString(); will convert the integer“123” to a string “123”; without the need to declare “123” as an integer first
Summary • Microsoft .NET • Built from the ground up (unlike MFC) • Standards-based platform • Web services • Consistent programming model • The .NET Platform contains: • .NET Framework and Visual Studio .NET • Mobile Internet Toolkit • Building block services (Passport) • Common framework for all languages • Common Language Runtime and Unified classes • Simplified development and deployment
Resources • http://www.gotdotnet.com • GotDotNet is a great site for code samples, tutorials, and a great developer community. Also access to the creators of C#. • http://www.go-mono.com • Project Mono is an open source .NET implementation for Unix • http://www.dotnetmagic.com • DotNetMagic has a great set of libraries and code to make common tasks very easy to perform. • http://www.codeproject.com • Lots of code samples and resources for all programming languages. • http://msdn.microsoft.com • Great for documentation on everything .NET & Win32 related.