Uncategorized

Microsoft .NET Framework OverView



You can download the paper presentation from here

So what is .NET?
 .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.

 A vast collection of software development technologies cobbled together into a single framework.
 Microsoft’s application development platform, which enables developers to easily create windows applications, web applications, and web services using a collection of different programming languages, and without having to worry about low-level details like memory management and processor-specific instructions.
.NET Framework
 A Platform for running Dot Net based application
 It includes a large library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the framework.
The Core of .NET Framework: FCL & CLR
 Common Language Runtime
 Garbage collection
 Language integration
 Integrated security
 Framework Class Library
 Provides the core functionality:
ASP.NET, Web Services, ADO.NET, Windows Forms, IO, XML, etc.
.NET Framework
Common Language Runtime

 CLR manages code execution at runtime
 Memory management, thread management, etc.
.NET Framework
Base Class Library
 Object-oriented collection of reusable types
 Collections, I/O, Strings, …
.NET Framework
Data Access Layer
 Access relational databases
 Disconnected data model
 Work with XML
.NET Framework
ASP.NET & Windows Forms
 Create application’s front-end – Web-based user interface, Windows GUI, Web services, …
.NET Framework
Programming Languages
 Use your favorite language
.NET Framework
Common Language Specification
.NET Framework
Visual Studio .NET
.NET Framework
Standards Compliance
Code Compilation and Execution
Common Language Runtime
 Manages running code – like a virtual machine
 Threading
 Memory management
 No interpreter: JIT-compiler produces native code – during the program installation or at run time
 Fine-grained evidence-based security
 Code access security
 Code can be verified to guarantee type safety
 No unsafe casts, no un-initialized variables and no out-of-bounds array indexing
 Role-based security
.Net Environments
 Windows Forms Application: Win Forms (for client machine based applications)

 Web Application: ASP.Net (for browser based applications)

 Console Application (quick and dirty apps)

 Windows Mobile Applications (using the compact framework)

Windows Forms Application
 You write your software to produce an executable (MyApp.exe)
 User runs the executable on their local machine
 User must have the .Net Framework installed locally
 The application runs in local memory, typically from the local hard drive
 Good:
 Fast
 Responsive
 Easy to develop for (pure event driven environment)
 Easy access to local resources (file system, system events, etc)
 No need for an internet connection
 Very rich and easy to use controls

Web Application: ASP.Net
 Server: IIS (Internet Information Services) serves up webpages created by the .Net Framework
 Your software only ‘runs’ on the web server – so only the web server needs the .Net Framework installed on it.
 The web server serves up pages containing HTML and Javascript when requested by someone via a browser.
 Events are captured as round-trips requests between the browser and the web-server.
 Good:
 No Framework needed on the client machine
 Only need a browser to request those pages
 Cross platform (Windows, Mac, Linux) and cross-browser (IE, Firefox, Safari, etc)
 Wide reach anywhere with an internet connection
 Very easy to re-deploy an upgrade of your software

Console Application
 Compiles very quickly into a single executable
 Great for very simple applications that need no user interface
 VB-script batch file for .Net
 Good:
 Great for playing around and testing things while learning
 Very fast

Windows Mobile Applications
 Compact Framework – different to the core framework
 Same Visual Studio environment
 Same .Net languages (VB.net and C#)
 Good:
 Same Visual Studio and VB.Net / C# that you are used to
 Most of the Base Class Library
 All the advantages of the Windows Mobile platform

Example of MSIL Code
.method private hidebysig static void Main() cil managed
{
.entrypoint
// Code size 11 (0xb)
.maxstack 8
IL_0000: ldstr “Hello, world!”
IL_0005: call void [mscorlib]System.Console::WriteLine(string)
IL_000a: ret
} // end of method HelloWorld::Main
.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
 Object system is built in, not bolted on
 No additional rules or API to learn
Common Language Specification (CLS)
 Any language that conforms to the CLS is a .NET language
 A language that conforms to the CLS has the ability to take full advantage of the Framework Class Library (FCL)
 CLS is standardized by ECMA“ 11
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 ASP+ pages
 Everything really is an object
 Primitive types aren’t magic
 Unified type system == Deep simplicity
 Improved extensibility and reusability
C# Language – Example
using System;

class HelloWorld
{
public static void main()
{
Console.WriteLine(“Hello, world!”);
}
}
Assemblies
 DLL or EXE file
 Smallest deployable unit in the CLR
 Have unique version number
 No version conflicts (known as DLL hell)
 Contains IL code to be executed
 Security boundary – permissions are granted at the assembly level
 Type boundary – all types include the assembly name they are a part of
 Self-describing manifest – metadata that describes the types in the assembly
Metadata in Assembly
Applications
 One or more assemblies
 Assemblies conflict resolution
 Using metadata
 Local (preferred)
 Global Assembly Cache (GAC)
 Different applications may use different versions of an assembly
 Easier software updates
 Easier software removal
Visual Studio .NET
 Development tool that contains a rich set of productivity and debugging features
 Supports managed and unmanaged applications
 Supports C#, C++, VB.NET, …
 Many useful tools and wizards
 Windows Forms Designer
 ASP.NET Web Forms Designer
 Web Services support
 SQL Server integration with ADO.NET and XML
 VS.NET is not part of the .NET Framework
 Not necessary to build or run managed code
 The .NET Framework SDK includes command line compilers
VS.NET – Single Development Environment & Skill Set
 From Visual Studio.NET you can:
 Write code
 Design user interface
 Study documentation
 Debug
 Test
 Deploy
 Same tools for all languages
 Same tools for all platforms
Visual Studio .NET
The .NET Framework Library
.NET Framework Namespaces
Base Class Library Namespaces
Base Class Library
 Data types, conversions, formatting
 Collections: ArrayList, Hashtable, etc.
 Globalization: Cultures, sorting, etc.
 I/O: Binary and text streams, files, etc.
 Networking: HTTP, TCP/IP sockets, etc.
 Reflection: Metadata and IL emit
 Security: Permissions, cryptography
 Text: Encodings, regular expressions
Data And XML Namespaces
ADO.NET And XML
VS.NET – DataSet Designer
Windows Forms Namespaces
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
 ActiveX® Support
 Printing support
 Unicode support
 UI inheritance
Windows Forms
VS.NET – Windows Forms Designer
Demo
 Create simple database application with:
 Windows Forms
 ADO.NET
 MS SQL Server
 Visual Studio .NET
ASP.NET Namespaces
ASP.NET
 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
VS.NET – Web Forms Designer
Web Services
 Technical definition – “A programmable application component accessible via standard Web protocols”
 Built on XML and SOAP
 Expose functionality from Web Sites
 Almost like component programming over the Web
 Functionality exposed using XML/HTML
 Standard Web Services include
 Calendar
 MSN Passport
.NET Framework on Linux
 Mono Project
 Open Source C# compiler, CLR and Framework Class Library
 Runs on various platforms and hardware:
 Linux, Unix, FreeBSD, Windows – JIT-compiler for x86
 s390, SPARC, PowerPC – interpreter for these hardware architectures
 Supports also:
 ADO.NET and XML
 Windows Forms (not fully)
 ASP.NET
 Web Services
.NET Framework on Linux (2)
 Mono Project
 Runs .NET portable executables on Linux, e.g.
mono myapp.exe
 Compiles .NET applications to portable executables, e.g.
mcs myapp.cs
 The obtained .exe file can taken and run on Windows
 DotGNU Portable.NET
 Build and execute .NET applications on GNU/Linux, Windows, Solaris, NetBSD, FreeBSD, and MacOS X
Summary
 .NET Framework is a code execution platform – the environment which .NET programs run
 .NET Framework consists of two primary parts: Common Language Runtime and .NET Class Libraries
 The CLS (Common Language Specification) allows different languages to interact seamlessly.
 The CTS (Common Type System) allows all languages to share base data types.
Summary (2)
 .NET languages are compiled to MSIL by their respective compilers
 MSIL code is compiled to machine code by the JIT compiler
 All .NET languages have equal access to the FCL (Framework Class Library) which is a rich set of classes for developing software
 Base Class Library is set of basic classes: Collections, I/O, Networking, Security, etc.
 ADO.NET provides .NET applications with access to relational databases
Summary (3)
 .NET has great XML support including: DOM, XSLT, XPath, and XSchema
 Windows Forms provides GUI interface for the .NET applications
 ASP.NET allows creating web interface to .NET applications
 Web Services expose functionality from web sites and make it remotely accessible through standard XML-based protocols
 Visual Studio .NET is powerful development IDE for all .NET languages and technologies
.NET Framework – Resources
 Visit following web sites:
 .NET Framework Home Site – http://msdn.microsoft.com/netframework/
 The Microsoft .NET Framework Community – http://www.gotdotnet.com/
 ASP.NET – http://www.asp.net/
 .NET Windows Forms – http://www.windowsforms.net/
 Code Project – http://www.codeproject.net/
 Mono – Open Source .NET Framework – http://www.go-mono.org/
 Rotor – Shared Source .NET CLI – http://msdn.microsoft.com/net/sscli/
 Read the news groups:
 news://msnews.microsoft.com/microsoft.public.dotnet.framework

Share

Thanks for reading my blog. If you like what I write, why not subscribe to my feed?

If you are busy, I can send the latest post to your email. Just subscribe to my email updates.

 

Enter your email address:

Delivered by FeedBurner

Discussion

No comments for “Microsoft .NET Framework OverView”

Post a comment