You are on page 1of 36

The Microsoft Application Platform

The Need for .NET What Is The Microsoft Application Platform? The .NET Framework The Windows Server System Building Block Services Clients for the .NET Framework

This lesson introduces the components that make up the Microsoft application platform, which is designed to simplify development.

The Need for .NET


Microsoft .NET: Solves many problems with existing technology Provides applications that support interoperable XML Web services Provides applications that support smart clients

.NET and the Microsoft application platform were designed to facilitate working with the Internet by integrating Internet standards and supporting Web services. The .NET Framework also makes it easier to access your data and write Web applications that run on a wide variety of browsers and devices. The .NET runtime supports simplified and reliable installation and upgrades for ease of use and increased reliability.

Problems with existing technologies


Many of todays Web applications have interactive user interfaces that are built by using dynamic HTML (DHTML) and Microsoft ActiveX technology. Although most of these applications communicate effectively, many have some or all of the following problems: Each application is a distinct piece of code in a large number of devices. Solutions are large groups of applications, devices, and services. Integration is too hard, too expensive, too slow, and too rigid when accomplished.

Interoperable Web services


Interoperability is the key to the next generation of applications. Virtual organizations need Web applications that can interact with other applications. The applications should expose a programmable interface that interacts with other services on the Web. For example, airlines, hotels, and rental car

companies can expose their services as Web services. A travel agent can use these services to find the best combination of prices and services for customers.

Support for smart clients


Technology has also advanced rapidly, resulting in lower costs for computer hardware and connectivity to the Internet. Because todays business world demands instant access to data, devices such as mobile phones, personal digital assistants (PDAs), and laptop computers are now standard. Applications developed for .NET take advantage of recent advances in technology by supporting smart clients and can run on multiple operating systems.

What Is the Microsoft Application Platform?


Inte t rne

M icrosoftOffice Syste Syst m e

V l St d isua Stu io udio V

.N F me ork ET Fra e ram w

Wind s Serve in ows rver W dow Se r Syst m e Syst m

.NETbu ing ET ilding .N uild blockse s b lock rvice

The Microsoft application platform consists of the following core technologies: Microsoft Visual Studio .NET Framework Windows Server System Microsoft Office System Building block services

Microsoft Visual Studio provides a high-level development environment for building applications on the .NET Framework. It provides key enabling technologies to simplify the creation, deployment, and ongoing evolution of secure, scalable, highly available Web applications and Web services. These applications can be deployed on several platforms, including the Windows Server System, and can use available .NET building block services as well as functionality from the Microsoft Office System.

The .NET Framework


.N Fram w ET Fra e ork m W dow U in ow I ind s ASP.N ET

AD ET: Data&X L O.N a ta M .N Fram w cla libra ET Fra e ork class ss ry m Com onLan geRuntim m ngua e gua

The .NET Framework is a language-neutral component library and execution environment. It enables you to build integrated, service-oriented applications that meet the needs of todays Internet businesses by gathering information from and interacting with a wide variety of sources, regardless of the platforms or languages in use. The .NET Framework consists of the following components: Common Language Runtime .NET Framework class library Microsoft ADO.NET (data and XML) Microsoft ASP.NET

Common Language Runtime


The Common Language Runtime (CLR) simplifies application development, provides a robust and secure execution environment, supports multiple languages, and simplifies application deployment and management. The environment is called a managed environment in which common services, such as garbage collection and security, are automatically provided.

NET Framework class library


The .NET Framework provides a unified, object-oriented, hierarchical, extensible set of class libraries for developers. Previously, C++ developers used the Microsoft Foundation Classes, Visual Basic developers used classes provided by the Visual Basic runtime, and other languages used their own class libraries and frameworks. In essence, the .NET Framework unifies the

disparate frameworks that Microsoft previously provided. developers no longer need to understand multiple frameworks.

As

result,

In addition, by creating a common set of application programming interfaces (APIs) across all programming languages, the .NET Framework enables crosslanguage inheritance, error handling, and debugging. Therefore, all programming languages, from JScript to Microsoft Visual C++, become equals, and developers are free to choose the language that they want to use.

ADO.NET: Data and XML


ADO.NET is the next generation of ActiveX Data Object (ADO) technology. ADO.NET is tightly integrated with XML, enabling developers to transfer datasets (in-memory data caches) between the various components of an enterprise solution.

ASP.NET
ASP.NET builds on the programming classes of the .NET Framework, providing a Web application model in the form of a set of controls and infrastructure that makes it easy to build Web applications. Developers have access to a set of ASP.NET Web controls that encapsulate common Hypertext Markup Language (HTML) user interface features such as text boxes and dropdown menus. These controls run on the Web server and project their user interface as HTML to a browser. On the server, the controls expose an object-oriented programming model that brings the power of object-oriented programming to the Web developer. ASP.NET also provides infrastructure services, such as session state management and process recycling, which further reduces the amount of code that a developer must write and increases application reliability. ASP.NET also uses these same concepts to enable developers to deliver software as a service. By using Web services, developers can simply write their business logic and let the ASP.NET infrastructure deliver the service through SOAP.

The Windows Server System


The Windows Server System is an integrated server infrastructure that includes: Windows Server 2003 BizTalk Server Exchange Server SharePoint Portal Server Operations Manager Project Server SQL Server Systems Management Server

The Windows Server System is the comprehensive Microsoft family of server applications for building, deploying, and managing scalable, integrated, Webbased solutions. Designed with mission-critical performance in mind, the Windows Server System provides scalability, reliability, and manageability for the global, Web-enabled enterprise. These products are built specifically for interoperability by using open Web standards such as XML. By using XML standards, Microsoft is providing a new development platform infrastructure that will help developers quickly create and deploy distributed applications on Internet time.

Windows Server System


The following are descriptions of the various members of the Windows Server System:
Microsoft

Windows Server 2003: This is the most secure and reliable server platform Microsoft has ever released. As the foundation for the Windows Server System, the server platform provides a unifying layer of common services across the IT, application, and information worker infrastructures. Windows Server 2003 builds on the strengths of Microsoft Windows 2000 technology, integrating standards-based directory, Web application, communication, file, and print services with high reliability, efficient management, and

support for the latest advances in networking hardware.


Microsoft

Application Center: This enables Web applications built on Windows Server 2003 to achieve mission-critical availability (99.999 percent uptime) through software scaling while reducing operational complexity and costs.
Microsoft

BizTalk Server: This is a standards-based platform for developing and managing application integration within and between organizations by using XML as the common document format.
Microsoft

Commerce Server: This is the comprehensive system for quickly building scalable, personalized business-to-consumer (B2C) and businessto- business (B2B) ecommerce solutions on Windows 2003. Microsoft Content Management Server: This dramatically reduces the time required to build and deploy content-driven Web sites that deliver high scalability, reliability, and performance. Content Management Server empowers content providers to manage their own content and provides site users with a targeted and personalized experience tailored to their individual profiles and browsing devices.
Microsoft

Exchange Server: This complete messaging and collaboration application offers unmatched interoperability, ease of use, and low-cost administration to organizations of all sizes.
Microsoft

Host Integration Server: This comprehensive integration platform provides the best way to quickly embrace Internet, intranet, and client/server technologies while maximizing investments in existing legacy systems.
Microsoft

Internet Security and Acceleration Server: This provides you with secure and easily managed Internet connectivity and expedites delivery of Web content through a scalable, reliable Web cache.

Microsoft

Operations Manager: This delivers enterprise-class operations management by providing comprehensive event management, proactive monitoring and alerting, reporting, and trend analysis. It helps reduce the day-today support costs associated with running applications and services in a Windows-based IT environment.
Microsoft

Project Server: This provides an extensible technology infrastructure to securely develop and deploy best practices for project management across your organization.
Microsoft

SharePoint This is the flexible portal offering that enables information workers to easily and quickly find, share, and publish information. Together, Office SharePoint Portal Server and Windows SharePoint Services give users the ability to organize information, readily access that information, manage documents, and enable efficient collaboration, all in a familiar, browser-based and Microsoft Office integrated environment.
Microsoft

SQL Server: This brings improved decision-making abilities to all levels of your enterprise with scalable business solutions, powerful data warehousing, and integration with Microsoft Office.
Microsoft

Systems Management Server: This delivers cost-effective, scalable change and configuration management for desktops and servers based on Windows and helps administrators to distribute security updates for all Microsoft products throughout the enterprise. Built on industrystandard management protocols, Systems Management Server is compatible with complementary management tools from Microsoft and other companies.

Building Block Services


Building block services: Allow the user to control the data Use Microsoft Passport Network

The building block services are a set of Web services that move control of user data from applications to users. These services enable personalization and consistency across applications, services, and devices. Microsoft has developed private and secure services built around identity, notification, and storage that can act as building blocks for other Web services and .NET experiences. Microsoft Passport is the.NET initiative that makes it easy to integrate various applications.

Microsoft Passport
Passport is a core component of the .NET initiative that allows businesses to develop and offer distributed Web services across a wide range of applications, devices, and complementary services, all based on a common Internet experience. The Microsoft Passport single sign-in (SSI) service helps your business to deliver a fast, convenient way for consumers to sign in and make transactions securely on your site, by allowing them to use one sign-in name and password at all participating Web sites. In addition, because Passport sign-in names are assigned to individuals and not to computers, members can access Passport sites at any time from a wide range of devices. Implementing Passport on your site enables you to do the following:
Increase

traffic by simplifying the sign-in and registration process.

Improve

customer retention by delivering personalized content based on core Passport profile data.
Increase

your sales purchase process.


Offer

by

simplifying

the

easier, more secure sign-in and purchasing to millions of Passport members.

Clients for the .NET Framework


The .NET Framework supports the following smart devices: Laptop computers Workstations Handheld computers PDAs Smart mobile phones Game consoles Tablet PCs

To support the .NET Framework, Microsoft is building device software that will enable consumers to use a family of complementary devices instead of only a single device or client. Microsoft is building software for everything from telephones and PDAs to other sets of devices and clients, such as laptop computers, workstations, handheld computers, smart mobile phones, game consoles (Microsoft Xbox), and the Tablet PC. Microsoft is currently working on the following software products for these devices: Embedded Windows XP, Windows CE 4.0, the .NET Framework, and the .NET Compact Framework.

Smart devices
All of these devices are known as smart devices because they remember who the user is and use the Web rather than the server as a platform for computing. Smart devices enable you to access, analyze, and act on data anywhere, anytime. They use the network intelligently and are responsive to bandwidth constraints, provide support for both online and offline use of applications, and recognize which services are available. Smart devices are programmable and customizable, with automatic updates and zero administration. Smart devices present and gather information in the most appropriate form for that device, such as converting text to speech on a mobile phone or recognizing handwriting on a Tablet PC. Smart devices can consume Web services and discover which services are available because they use XML, SOAP, and Universal Description, Discovery, and Integration (UDDI).

Growth of smart devices will increase even more during the next few years as these devices become integrated with the ultimate smart Internet device, the PC.

Inside the .NET Framework


Common Language Runtime The .NET Framework Class Library ADO.NET Namespaces ASP.NET Namespaces

The .NET Framework consists of the following components:


Common .NET

Language Runtime (CLR) namespaces namespaces

Framework class library

ADO.NET ASP.NET

Common Language Runtime


.N Fra ew Cla Libra Supp ET m w ort e ork ss Lib ry Support ra Thre dSupp ad ort Threa Support TypeChecke Typ e cker r Secu Eng curity Engine ine rity M to N tive SIL a Compile pilers rs CodeM nager a ge r Cla Loade ss dr e CO M rsha r M a le Exce ptionM nag r a ge e D bugEngine e Garb ge rba e ag Colle ctor

Runtimes are not new to programming. Many other programming languages have used runtimes, including Visual Basic (VBRUN through version 4.0 and then MSVBVM through version 6.0), Visual C++ (MSVCRT), Microsoft Visual FoxPro, and JScript, in addition to third-party languages such as SmallTalk, Perl, and Java. The critical role of the .NET Framework, and what really sets it apart from other runtimes, is that it provides a unified environment across all programming languages. This environment is also referred to as a managed environment.

CLR simplifies the development process


Despite its name, the CLR has a role not only at run time, but also during a components development. While the component is running, the CLR is responsible for managing memory allocation, starting up and terminating threads and processes, enforcing security policy, and satisfying any dependencies that the component has on other components. During development, the runtimes role changes slightly. Because it automates much functionality (such as memory management), the CLR makes the developers work easier. In particular, the CLR ensures code correctness and type safety. The CLR also dramatically reduces the amount of code a developer must write to transform business logic into a reusable component. The following are some of the programming features that were formerly required by operating systems but are now rendered unnecessary by the CLR:
System

registration is not needed because applications are completely selfdescribing.

Globally

unique identifiers (GUIDs) are not needed because classes are organized by using a hierarchical naming scheme with humanreadable names.
Interface

Definition Language (IDL) files are no longer required because the system and languages use the same representations.
HRESULTs

are no longer used because the CLR uses structured exception handling.
IUnknown

is no longer required because its functionality is provided by the root System.Object.


Adding

and releasing object references is no longer necessary because the CLR knows which objects are being used and can clean up unused objects whenever necessary.
The

Component Object Model (COM) CoCreateInstance method becomes an additional operator.

The .NET Framework Class Library


Syste m
Collect s ctions Colle ion Config t uration Configuraion D g ics ia nost Glob liza ion a t IO Nt e Refle ion flect ction Re source s Re Security curit y

Runtim e
Service rviceProce Process ss Te xt Threa ing ad ding Int rop rvice e Se s Re ot m ing Seria tion rializaion Se lizat

The .NET Framework class library is a collection of reusable classes, or types, that tightly integrate with the CLR. The library is made up of several namespaces. As an example, examine the System namespace.

System namespace
The System.IO namespace is found below the System namespace and contains input/output (I/O) services. The System.Collections namespace provides sorted lists, hash tables, and other ways to group data. The System.Net namespace provides Transmission Control Protocol/Internet Protocol (TCP/IP) and sockets support. The design goals of the .NET Framework class library were to:
Enable

factoring and extensibility.

Implement

Web standards and practices as the foundation.


Unify

application models.

Increase

developer productivity by supplying a single hierarchical and intuitive programming model.


Enable

cross-language add

inheritance or modify

and .NET

debugging.
Make

it easy to Framework features.

Allow

creation of secure applications.

Functionality
The .NET Framework class library provides a vast amount of functionality, including the following:
Managing Providing Drawing

collections of objects database access security and encryption

to the screen

Providing

ADO.NET Namespaces
ADO.NET implements the following namespaces: System.Data namespace System.Xml namespace

The .NET Framework provides a new set of ADO.NET classes to handle data. ADO.NET provides improved support for the disconnected programming model. It also provides rich XML support.

System.Data namespace
The System.Data namespace consists of classes that constitute the ADO.NET object model. At a high level, the ADO.NET object model is divided into two layers: the connected layer and the disconnected layer. The System.Data namespace includes the DataSet class, which represents multiple tables and their relations. These datasets are completely self-contained data structures that can be populated from a variety of data sources. One data source could be XML, another could be OLE Database (OLEDB), another could be Oracle, and a fourth data source could be SQL Server.

System.Xml namespace
The System.Xml namespace provides support for XML. It includes an XML parser and a writer, both of which are compliant with World Wide Web Consortium (W3C) standards. The System.Xml.Xsl namespace provides support for Extensible Stylesheet Language Transformations (XSLT). Implementation of the XML Path Language (XPath) allows data graph navigation in XML. The System.Xml.Serialization namespace provides the entire core infrastructure for Web services, including features such as moving back and forth from objects to an XML representation, and support for SOAP.

ASP.NET Namespaces
Syste .W b m eb e Se rvice s Services
D script escripion t Discove iscovery ry Prot ocols

U I
Htm t t lCon rols mlCont

Wb e rols W Contro ls

Cach ching ing Configura tion Con figura

Se curity Security Se ssionState t SessionStae

The Internet is quickly evolving, from Web sites that deliver simple user interface (UI) pages to browsers, to the emerging generation of programmable Web sites that directly link organizations, applications, services, and devices. ASP.NET is a programming framework built on the CLR that you can use on a server to build powerful Web applications. ASP.NET Web Forms provide an easy way to build dynamic Web UIs. Web services, created by using ASP.NET, provide the building blocks for constructing distributed Web-based applications. Web services are based on open Internet standards, such as HTTP and XML. The CLR provides built-in support for creating and exposing Web services by using a programming abstraction that is consistent and familiar to both ASP and Visual Basic developers. The resulting model is both scalable and extensible. This model is based on open Internet standards (HTTP, XML, SOAP, SDL) so that it can be accessed and interpreted by any client or Internetenabled device. Some of the more common ASP.NET namespaces are described in the following section.

System.Web
The System.Web namespace implements lower-level services such as caching, security, configuration, and other services that are shared between Web services and Web UI.

System.Web.Services
The System.Web.Services namespace includes classes that handle XML Web services such as protocols and discovery.

System.Web.UI
The System.Web.UI namespace provides two classes of controls: HtmlControls and WebControls. The HtmlControls give you direct mapping of HTML tags, such as input. WebControls enable you to structure controls with templates (for example, a grid control).

*****************************

Introduction to .NET Languages


What Are the Benefits of Language Neutrality? Selecting a Language Reducing Programming Errors The CLR Execution Model Demonstration: Using Multiple Languages

* ****************************illegal for non-trainer use******************************

In Visual Studio, a single-user interface supports multiple languages. In this lesson, you will learn about the benefits of the language-neutrality features of the .NET Framework. You will also look at criteria for selecting the language that is most suitable for creating .NET-based applications.

What Are the Benefits of Language Neutrality?


The benefits of language neutrality include: Code sharing and reusability Same API access for all languages Implementation inheritance Exception handling across languages

The language neutrality of the .NET Framework provides many benefits to developers. Some of the most powerful benefits are described in this topic.

Code sharing and reusability


In the past, developers often had problems sharing code because some developers on a team would work in C++ while others would work in a different language such as Visual Basic. Depending on how the C++ code was written, it might or might not have been accessible by Visual Basic developers. The .NET Framework eliminates this problem because any .NET-compatible language can call any .NET class and can even extend that class for its own purposes. Reusing code now becomes automatic.

Same API access for all languages


An object model API is usually language independent and defines a set of objects, properties, and interfaces. A database API defines how to code an application to connect to and pass commands to a database. The .NET Framework makes the same set of APIs available to programmers, regardless of the coding language they use.

Implementation inheritance

Inheritance means that if you make a change to a class, that change is reflected in all subclasses. This automatic update saves you time and effort. A class or component written in one language can be extended in another language.

Exception handling across languages


Traditionally, a languages error handling model relied on either the languages unique way of detecting errors and locating handlers for them, or on the errorhandling mechanism provided by the operating system. In the .NET Framework, the CLR facilitates the design of error-tolerant software by providing a platform for uniform error handling. The CLR handles exceptions for all .NET-compatible languages. It does not matter which language was used to generate the exception or which language will be called upon to handle the exception.

Selecting a Language
Base onProgra mingExpe nce sed ram ing erie Ba d onProg mm Exp rience
V a Ba V isu l sic, BScrip t Visu l J+ , Jav , JScrip isua + va, t V a J+ , Ja a JScript C, C+ + C, C+ + V alBasic20 5 isu l sic 00 Visua Ba 2 05 J# J# C# C#

Ba d onM rain Ex ingApp t se igra g isting p ions lica ig t


Visu l Basicx.0 isual sic V a Ba x.0 VisualJ+ , Java V a J+ Ja a isu l + v + JScript t JScrip C, C+ + C, C+ + Visu l Basic6.0 isua sic .0 V a Ba 6 Visua Basic20 5 isu l sic 0 V al Ba 00 J# J# JScript(.N t(.NET) JScrip ET) C# C# M na edC+ (W 32 andsoon) a a d + in 2 nd n M n ge C+ (W 3 , a so o ) + in

Choosing a programming language depends on your language experience and the scope of the application you are building. Whereas small applications are often created using only one language, it is not uncommon to develop large applications using multiple languages. All languages that support the .NET Framework provide similar functionality. In all of these languages, objects derive from the System.Object class. All of these languages support attributes, events, methods, and properties.

Selecting a language
By default, simple value types, enums, and structs are passed by value in all languages. Similarly, arrays, classes, and interfaces are passed by reference. Furthermore, because all languages compile to the same MSIL code, they are all capable of providing roughly the same level of performance. Consider the following guidelines when selecting the .NET language that will work best for you:
If

you are a Visual Basic or Microsoft Visual Basic Scripting Edition (VBScript) developer, transitioning to Visual Basic 2005 would be easiest for you. The Visual Basic Upgrade Wizard makes it particularly easy to migrate existing code from Visual Basic 6.0 to Visual Basic 2005 Applications created by using earlier versions of Visual Basic must be

upgraded to Visual Basic 6.0 before migrating to Visual Basic 2005.


If

you are a J++, JScript, or Java developer, transitioning to Visual J# 2005 or C# would be easiest for you. Existing JScript applications can be migrated to JScript 2 Existing Java or Visual J++ applications can be migrated to J#. For new applications, C# might be a better choice because some project types are not available for J#, for example, Smart Device Projects.
If

you are a C or C++ developer, transitioning to C# or Managed C++ would be easiest for you. For new or .NET applications, C# might be a better choice because some project types are not available for Managed C++, for example, Smart Device Projects. For specialized applications, such as device drivers, C++ is the best choice.

New Features in Visual Basic and C#


Visual Basic and C# have many significant improvements in.NET Framework 2.0, including generic types and partial classes. Visual Basic now includes the My namespace for speedy development, while the newest version of C# includes iterators, anonymous methods, and support for refactoring.

Visual C++ .NET


Managed C++ can access the same Windows Forms engine that C# can. This feature includes full support of the Toolbox, Properties window, and Server Explorer, which allows you to drag or perform a cut-and-paste on controls and components directly in your Windows Forms application. Existing C++ code compiles for .NET without the need to rewrite it in a new language. Visual C++ 2005 supports intermixed managed and unmanaged code and data to provide maximum performance and control. Visual C++ .NET offers developers extremely powerful features for targeting the .NET-connected technologies. Existing C++ code is easily recompiled for .NET without modification, and developers are able to immediately begin using the powerful .NET Framework classes with familiar C++ syntax. New and existing components and applications written in C++ are easily exposed to .NET, enabling a multitude of cross-language possibilities and solutions. Powerful interop features specific to Visual C++ ensure that C++ applications can continue to leverage their roots on the Windows platform as they are moved forward to the .NET CLR.

Visual J# .NET
Visual J# supports most of the features of Visual J++ 6.0, including Microsoft extensions. It also has the ability to convert some Java binaries to run in the CLR. The Visual J# Binary Converter Tool transforms Java bytecode into MSIL code. It works for most Java Development Kit (JDK) 1.1.4level libraries and applications, but not all. The preferred method of porting is to recompile the Java-language source as Visual J#. Visual J# is designed to provide class library support functionality equivalent to most of the JDK level 1.1.4 packages that were included in Visual J++ 6.0. Visual J# also supports the Windows Foundation Classes (WFC) libraries and the following com.ms. packages: com.ms.lang, com.ms.dll, com.ms.com, com.ms.win32, com.ms.util, and com.ms.jdbc.odbc.

Reducing Programming Errors


Features that reduce programming errors include: Garbage collection Constructors and destructors Variable initialization Syntax checking Type checking Type conversion Namespaces Structured exception handling

The .NET Framework maximizes programmer efficiency by providing new functionality that reduces programming errors.

Garbage collection
The .NET Framework eliminates concern over memory management because garbage collection takes care of this for you. The CLR checks at regular intervals for objects that are no longer used and puts them in the recycle bin. The CLR does not use reference counting to govern object lifetime. Instead, a background garbage collection task traces object references and identifies objects that can no longer be reached by running code. With garbage collection, you no longer have to worry about circular references. If objects in a group contain references to each other, but all references outside the group have been set to null or Nothing, garbage collection automatically reclaims the memory. Therefore, you do not need to be concerned about memory leaks. An additional advantage of traced garbage collection is that allocation of new objects in memory is extremely fast. Performance is further improved by the elimination of the COM AddRef and Release mechanisms, and objects require less memory.

Constructors and destructors


Constructors are procedures that control initialization of new instances of a class. Conversely, destructors are methods that you use to free system resources when a class leaves scope or is set to null or Nothing. When used together, constructors and destructors support the creation of powerful and predictable class libraries.

Variable initialization
Variables can now be initialized during declaration. This results in simplified, compact code.

Syntax checking
Visual Studio, the shared development environment, provides excellent support for writing programs. It uses IntelliSense extensively to help programmers write valid code. IntelliSense displays syntax tips for statements as you type them and provides code completion on keywords.

Type checking
Type checking, performed at compile time, catches statements that use an improper data type before they can cause subtle execution errors at run time.

Type conversion
The process of changing a value from one type to another type is called type conversion. Type conversions can be either widening or narrowing. Widening conversions never fail and can be accomplished with no loss of information. Narrowing conversions might fail and always involve some kind of information loss.

Namespaces
Namespaces prevent naming conflicts by organizing classes, interfaces, and methods into hierarchies.

Structured exception handling


Structured exception handling helps you create and maintain programs with robust, comprehensive error handlers. Structured exception handling is code designed to detect and respond to errors during execution by combining a control structure (similar to Select Case or switch) with exceptions, protected
blocks of code, and filters.

Using the try...catch...finally statement, you can protect blocks of code that have the potential to raise errors. You can nest exception handlers, and the variables declared in each block will have local scope.

The CLR Execution Model


So urce co e d Visu l Basic isual sic V a Ba Com ile mp r Co pile C# C# Com iler mp r Co pile Assem ly IL mb Asse bly IL co e d C+ + C+ Com iler mp r Co pile Assem ly IL mb Asse bly IL code d co e JIT com ile mp r JIT co pile Un an ge nm ag d U m na ed co pon nt m o en co p ne t

M n ge Assem ly IL a a d Asse b IL m bly co de cod de co e

Com onLan u ge mm n ng age Co mo La gua Runime nt e Ru tim Naiv cod at e de N tiveco e

Op rat g syst mservice pe tin ste rv s O eraingsy emse ices

The base unit of a .NET-based application is called an assembly. An assembly is the unit of versioning and deployment. Typically, you compile your source code into an .exe file or a DLL. (However, you can also create modules, which can later be linked to an .exe file or a DLL.) These are the simplest forms of assemblies. Compilers generate assemblies containing MSIL code. However, apart from the MSIL code, the compiler inserts metadata into the assembly. Metadata is a collection of information that describes all of the types, classes, methods, fields, and events contained within the assembly. This is similar to the idea of a type library. However, unlike a COM server that may or may not have a type library resource embedded in it, an assembly and its metadata are inseparable. This means that the assembly is self-describing.

Single-file and multifile assemblies


In many cases, an assembly can be thought of as a single .exe file or DLL. In some situations, a single assembly makes deployment much simpler because all required components are bundled together. However, a number of assemblies (for example, DLLs) can be linked together in one assembly known as a multifile assembly. To achieve this, you use the assembly linker tool, AL.exe. In some situations, for example, in Web-based applications, the fact that assemblies are contained within separate files can be a great advantage because only those modules that are required can be downloaded.

The CLR execution model


Before the MSIL code can be executed, it must be converted into native binary instructions. The compilation is typically carried out by a just-in-time (JIT) compiler. Source code written in C#, J#, Managed C++, Visual Basic or another language that targets the CLR is first transformed into MSIL code by the appropriate language compiler. Before execution, this MSIL code is compiled into native code by a JIT compiler for whatever processor the code will run on. The JIT compiler does not compile the entire code at one time. The default is to JITcompile each method when it is first called, but it is also possible to preJIT the IL code by using the Native Image Generator (NGEN.exe). With this option, all methods are compiled before the application is loaded, so you can avoid the overhead of JIT compilation on each initial method call. Note that all languages targeting the CLR should exhibit roughly the same performance. Although some compilers might produce better MSIL code than others, large variations in execution speed are unlikely.

*****************************illegal for non-trainer use******************************

Microsoft Developer Tools Roadmap


Visual Studio 2005 Visual Studio Orcas
V al Stu isu dio 20 05
SQL Se r inte tion rve gra Im rove prod p d uctivity a com unity support nd m Exte dsupportfor nde W bservice e s O fficep rogram ab m ility

W ow inte ra ind s g tion w W FX ith in N wU tools e I a de nd signe rs

V a Stud isu l io rca O s

La a e nce e ts ngu ge nha m n En nce office ha d progra m bility m a

Visual Studio 2005 includes tighter integration with Microsoft SQL Server 2005 as well as productivity improvements and extended support for Web services. Future versions will include support for the next version of the Windows operating system, new UI tools, and additional language enhancements.

Visual Studio 2005


.NET Framework 2.0

Generics Enhanced ASP.NET Improved ADO.NET

Edit and Continue Enhanced IntelliSense and Auto-correct Microsoft Office integration Improved language features

Visual Studio 2005 includes a number of significant enhancements over Visual Studio .NET 2003, including support for.NET Framework 2.0, support for edit and continue debugging, improved IntelliSense and Auto-correct, and tighter integration with Microsoft Office, as well as a number of language-specific improvements.

.NET Framework version 2.0


Visual Studio 2005 now targets version 2.0 of the .NET Framework, which includes new framework classes, members, and documentation and support for 64-bit platforms. Significant improvements include:
Generics,

which enable developers to build flexible, reusable code. You can build classes, methods, structures, and interfaces by specifying generic type parameters. The .NET Framework uses generics to enable strongly typed collections in the System.Collections.Generic namespace.
An

enhanced ADO.NET, which includes support for features such as userdefined types, bulk copy operations, asynchronous processing, and a provider-independent API.
An

improved ASP.NET, which includes many new controls, caching improvements, and tools

for quickly building robust Web sites such as Master Pages, Themes, and Skins.

Edit and continue


In previous releases of Visual Studio, programmers in the process of debugging an application had to stop debugging to make any changes to their code. In Visual Studio 2005, programmers can make code changes and resume debugging immediately without having to restart the application.

Microsoft Office integration


With Visual Studio 2005 comes a new version of Visual Studio, known as Visual Studio Tools for Office (or VSTO), which enables developers to create powerful, customized solutions for Office applications.

C# improvements
C# improvements include:
Refactoring Anonymous

types

Visual Basic improvements


Visual Basic improvements include:
The New

My namespace operators

Visual Studio Orcas


Windows integration (WinFX)

Improved presentation Service-oriented messaging Work-flow based task automation

Query expressions (LINQ

The next version of Microsoft Visual Studio, codename Orcas, will include modifications of Windows Vista, support for a set of managed APIs known collectively as WinFX, and new language enhancements.

WinFX
WinFX is the name of the managed successor to the Microsoft Win32 API and will be introduced with Windows Vista. (The WinFX runtime components will also be installable in Windows XP and Windows Server 2003.) WinFX has three principal components:
Windows

Presentation Foundation (WPF) adds vector graphics to Windows Forms. With WPF, programmers will be able to build forms declaratively by using a new XML-based language, the Extensible Application Markup Language (XAML).
Windows

Communication Foundation (WCF) offers a unified programming model for communications between applications either on a single machine or across multiple machines. WCF places various communication technologies under a unified API, includiong Web services, remoting, message queuing, and distributed transactions, for building robust and extensible Service-Oriented Architectures.

Windows

Workflow Foundation (WWF) is a new technology for running and managing workflows. Workflows can be defined declaratively using XAML or programmatically using any .NET language.

Query expressions
Language Integrated Query (LINQ) expressions, will be built into the language (both Visual Basic and C#) for querying relational data as well as XML data without embedding SQL into the code.

You might also like