Professional Documents
Culture Documents
Introduction to .NET
.NET Internet Standards
.NET depends on four Internet standards:
HTTP, the communication protocol between Internet Applications XML, the format for exchanging data between Internet Applications SOAP, the standard format for requesting Web Services UDDI, the standard to search and discover Web Services
Data access Functionality of the Win 32 API that is accessible through a simple object model The VB language has been upgraded C# Memory management ASP.NET Programming languages have been moved closer together Assembly
VD
Page 1
Future applications will access Web Services via standard Web Formats (HTTP, HTML, XML, and SOAP), with no need to know how the Web Service itself is implemented. Web Services are main building blocks in the Microsoft .NET programming model.
Standard Communication
Official Web standards (XML, UDDI, SOAP) will be used to describe what Internet data is, and to describe what Web Services can do. Future Web applications will be built on flexible services that can interact and exchange data, without the loss of integrity.
Internet Storages
.NET offers secure and addressable places to store data and applications on the Web. Allowing all types of Internet devices (PCs, Palmtops, Phones) to access data and applications. These Web Services are built on Microsoft's existing NTFS, SQL Server, and Exchange technologies.
Internet Identity
.NET supports many different levels of authentication services like passwords, wallets, and smart cards. These services are built on existing Microsoft Passport and Windows Authentication technologies.
Internet Messaging
.NET supports integration of messaging, e-mail, voice-mail, and fax into one unified Internet Service, targeted for all kinds of PCs or smart Internet devices. These services are built on existing Hotmail, Exchange and Instant Messenger technologies.
Internet Calendar
.NET supports Internet integration of work, social, and private home calendars. Allowing all types of Internet devices (PCs, Palmtops, Phones) to access the data. These services are built on existing Outlook and Hotmail technologies.
.NET Framework
.NET Framework
The .NET Framework is a common environment for building, deploying, and running Web Services and Web Applications. The .NET Framework contains common class libraries - like ADO.NET, ASP.NET and Windows Forms - to provide advanced standard services that can be integrated into a variety of computer systems. The .NET Framework is language neutral. Currently it supports C++, C#, Visual Basic, JScript (The Microsoft version of JavaScript) and COBOL. Third-party languages - like Eiffel, Perl, Python, Smalltalk, and others - will also be available for building future .NET Framework applications. The new Visual Studio.NET is a common development environment for the new .NET Framework. It provides a feature-rich application execution environment, simplified development and easy integration between a number of different development languages.
VD
Page 3
A subset of Common Type System Assembly can be tagged with[assembly: System.CLSCompliant(true)] Compiler issues a warning if non compliant types are used. Solves the cross language access problem in COM (e.g. C++ has types that is not supported by VB) (Private) types, methods may still be marked with [CLSCompliant(false)]
VD
Page 4
Windows Forms
Components needed to create windows applications WIN32 at last hidden with real OOP! Visual Inheritance Same controls used from all languages Consistent naming of properties, methods and behaviour!!!! Forms + Listboxes, Buttons etc WIN32 specific Builds pretty much on intrinsic WIN32 functionality Makes it difficult to support.
Create your database Use Visual Studio to create Datalink and typed dataset out of your database. open OleDbConnection OleDbDataAdapter for SQL command Use the adapter to fill out your custom dataset with the requested information Modify your dataset Create update command with the OleDbCommandBuilder Update the database with the adapter (given your dataset)
VD
Page 5
XML Support
XML Is used everywhere Store / Retrieve Datasets in XML XMLTextReader, XMLTextWriter XMLDataDocument W3C Document Object Model (DOM) XMLNode XPath, XslTransform XMLSerialization ...
VD
Page 6
Namespace
Description
This namespace includes all the essential support you need for your programming, including base types (String, Int32, Date Time, Boolean, etc.), essential environmental support, and math functions, to name a few all the support necessary to be able to create code, and run it, on the fly The System.Collections namespace contains interfaces and classes that define various containers, such as lists, queues, bit arrays, hash tables and dictionaries. All the classes you need to diagnose your application, including event logging, performance counters, tracing, and process management APIs. This namespace includes fundamental support for Globalization, used throughout the rest of the Framework Includes fundamental Stream support which can be used by anyone, and then specifically targets the File System (via File and Directory manipulation classes), Serial Ports, and Decompression Used to allow an application to be translated into multiple languages, and then display the appropriate text based upon the current users language selection This namespace includes support for encodings, and String builder
System
System.CodeDom
System.Collections
System.Diagnostics
System.Globalization
System.IO
System.Resources
System.Text
Vastly simplified development Seamless integration of code written in various languages Evidence-based security with code identity Assembly-based deployment that eliminates DLL Hell Side-by-side versioning of reusable components Code reuse through implementation inheritance Automatic object lifetime management Self describing objects
VD
Page 8
The CLR is the execution environment provided by the Microsoft .NET Framework. It provides many services such as
o o o o o o o o
Automatic garbage collection Code access security Simplified versioning Simple and reliable deployment Deep cross-language interoperability Debugging across different languages Performance Scalability
Because the CLR manages the code execution, all the code that is targeted for the CLR is known as managed code. Managed code emits metadata along with the executable. This metadata is used to describe the types (classes) and members used in the code, along with all the external references used in executing the code. The CLR uses this metadata to load the classes during execution and resolve method invocations during runtime. The CLR provides automatic garbage collection of the objects that have been loaded into memory. All objects that are created via the new operator are allocated memory on the heap. A program can allocate as many objects as are required by the program logic. However, when an object is no longer required, there must be some mechanism to free up the memory that was occupied by the object. This is accomplished in the CLR via a program called garbage collector, which collects all objects in memory that have no references. This program runs as a low-priority thread in the background process and collects all unreferenced objects. Because memory management is automatic, the chances for memory leaks in the program are minimized. However, the time when garbage collector would actually release the objects from the memory is not known. VD Page 9
COM+ Services
VD
Page 10
.NET Software
Languages supported by .NET Framework
The table below lists all the languages supported by the .NET Framework and describes those languages. The languages listed below are supported by the .NET Framework up to the year 2003. In future there may be other languages that the .NET Framework might support.
Language
Description/Usage
APL is one of the most powerful, consistent and concise computer programming languages ever devised. It is a language for describing procedures in the processing of information. It can be used to describe mathematical procedures having nothing to do with computers or to describe the way a computer works. C++ is a true OOP. It is one of the early Object-Oriented programming languages. C++ derives from the C language. VC++ Visual C++ is the name of a C++ compiler with an integrated environment from Microsoft. This includes special tools that simplify the development of great applications, as well as specific libraries. Its use is known as visual programming. C# called as C Sharp is a fully fledged Object-Oriented programming language from Microsoft built into the .NET Framework. First created in the late 1990s was part of Microsofts whole .NET strategy. COBOL (Common Business Oriented Language) was the first widelyused high-level programming language for business applications. It is considered as a programming language to have more lines of code than any other language. Component Pascal is a Pascal derived programming language that is Page 11
APL
C++
C#
Cobol
Component
VD
Eiffel
Forth
Fortran
Haskell
Java Language
Microsoft JScript
Mercury
Mondrian
VD
Page 12
Oberon
Oz
Pascal
Perl
Python
RPG
Scheme
Small Talk
Standard ML
VD
Visual J# .NET
Microsoft Visual J# .NET is a development tool for Java-language developers who want to build applications and services on the Microsoft .NET Framework. Visual J# .NET joins more than 20 previously announced languages with its ability to target the .NET Framework and first-class XML Web services. Visual J# .NET provides:
The easiest transition for Java-language developers into the world of XML Web services. Dramatically improved interoperability of Java-language programs with existing software written in a variety of other programming languages. The opportunity for Microsoft Visual J++ customers and other Java-language programmers to take advantage of existing investments in skills and code while fully utilizing the Microsoft platform today and into the future.
Visual J# .NET includes technology that enables customers to migrate Java-language investments to the .NET Framework. Existing applications developed with Visual J++ can be easily modified to execute on the .NET Framework, interoperate with applications created with other supported languages on the .NET Framework, and incorporate new technologies supported in the .NET Framework such as Microsoft ASP.NET, Microsoft ADO.NET, and Microsoft Windows Forms. Further, developers can use Visual J# .NET to create entirely new applications based on the .NET Framework.
DCOM doesn't use port 80, which is reserved for HTTP traffic; this causes DCOM calls to be blocked by firewalls. SOAP calls use port 80, which makes it possible to call procedures that exist behind firewalls.
HTTP
HTTP (Hypertext Transfer Protocol) is the set of rules images, sound, video, and other multimedia files) on the user opens their Web browser, the user is indirectly application protocol that runs on top of the TCP/IP protocols for the Internet). for transferring files (text, graphic World Wide Web. As soon as a Web making use of HTTP. HTTP is an suite of protocols (the foundation
HTTP is standardized by the World Wide Web Consortium (W3C). HTTP is called a stateless protocol because each command is executed independently, without any knowledge of the commands that came before it. This is the main reason that it is difficult to implement Web sites that react intelligently to user input. This shortcoming of HTTP is being addressed in a number of new technologies, including ActiveX, Java, JavaScript and cookies.
XML
XML(Extensible Markup Language), a specification developed by the W3C. XML is a pareddown version of SGML, designed especially for Web documents. It allows designers to create their own customized tags, enabling the definition, transmission, validation, and interpretation of data between applications and between organizations.
SOAP
SOAP(Simple Object Access Protocol), a lightweight XML-based messaging protocol used to encode the information in Web service request and response messages before sending them over a network. SOAP messages are independent of any operating system or protocol and may be transported using a variety of Internet protocols, including SMTP, MIME, and HTTP.
VD
Page 15
UDDI
UDDI(Universal Description, Discovery and Integration). A Web-based distributed directory that enables businesses to list themselves on the Internet and discover each other, similar to a traditional phone book's yellow and white pages. UDDI is a public registry, where one can publish and inquire about web services.
The Goal
The goal that Microsoft has set itself is ambitious, to say the least, both in technical and strategic terms. The new .NET platform has not evolved from the DNA 2000 technology currently available; rather, it is a totally new technology which is likely to shake up more than a few deep-rooted ideas. .NET is an entirely new platform and technology which introduces a host of new products, whose compatibility with existing technology is not always guaranteed. It offers support for 34 programming languages, which share a hierarchy of classes providing basic services. .NET applications no longer run in native machine code, having abandoned Intel x86 code in favor of an intermediate language called MSIL which runs in a sort of virtual machine called the Common Language Runtime (CLR). In addition, .NET makes intensive use of XML, and places a lot of emphasis on the SOAP protocol. Thanks to SOAP, Microsoft is hoping to bring us into a new era of programming which, rather than relying on the assembly of components or objects, is based on the reuse of services. SOAP and Web Services are the cornerstones of the .NET platform. Microsoft .Net (Microsoft dotNet) aims to reduce the cost of software development by creating re-useable code that can be used by all applications in the environment, regardless of operating system or programming language. You may develop (or purchase) a Microsoft .Net (Microsoft dotNet) web based application that takes new sales orders over the Internet. Dot net will allow you to call the logic behind the application from any other program. For example Microsoft Excel or Word macros could directly call the web based application to create new sales order. A customer could easily and securely develop their own application interface that directly and securely places a new sales order on your website. Microsoft VD .NET Framework is a computing platform for developing distributed Page 16
.NET is multi-language
With the .NET platform, Microsoft will provide several languages and the associated compilers, such as C++, JScript, VB.NET (alias VB 7) and C#, a new language which emerged with .NET. Third party vendors working in partnership with Microsoft are currently developing compilers for a broad range of other languages, including Cobol, Eiffel, CAML, Lisp, Python and Smalltalk. Rational, vendor of the famous UML tool Rose, is also understood to be finalizing a Java compiler for .NET.
.NET Summary
The Microsoft .NET Framework is a software component which can be added to the Microsoft Windows operating system. It provides a large body of pre-coded solutions to common program requirements, and manages the execution of programs written specifically for the framework. The .NET Framework is a key Microsoft offering, and is intended to be used by most new applications created for the Windows platform.
The pre-coded solutions in the namespaces form the framework's class library and cover a large range of programming needs in areas including the user interface, data access, cryptography, numeric algorithms, and network communications. The functions of the class library are used by programmers who combine them with their own code to produce applications. Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. This runtime environment, which is also a part of the .NET Framework, is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine, so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security guarantees, memory management, and exception handling. The class library and the CLR together compose the .NET Framework. The framework is intended to make it easier to develop computer applications and to reduce the vulnerability of applications and computers to security threats. First released in 2002, it is included with Windows Server 2003 and Windows Vista, and can be installed on most older versions.
VD
Page 18