Introduction to ASP.NET Kevin McManus  Adapted from material by Gill Windall and Mark Sapossnek
Contents <ul><li>An overview of what .NET is and some of its key features </li></ul><ul><li>Describe the areas of .NET lik...
What is Microsoft .NET?   that new language C# Microsoft putting XML into everything the next version of Visual Basic the ...
What is Microsoft .NET? <ul><li>Initially announced as the latest release of everything Microsoft </li></ul><ul><ul><li>AS...
Web Services  <ul><li>Allow remote access to software components </li></ul><ul><ul><li>via standard web protocols </li></u...
Web Services and Microsoft .NET <ul><li>There are three main angles on this: </li></ul><ul><li>1. Microsoft plans to provi...
Programming the Web Server-Side Code <ul><li>What is server-side code? </li></ul><ul><ul><li>Software that runs on the ser...
Programming the Web Server-Side Code <ul><li>Why server-side code? </li></ul><ul><ul><li>Availability </li></ul></ul><ul><...
Programming the Web Server-Side Technologies <ul><li>Common Gateway Interface (CGI) </li></ul><ul><ul><li>not language spe...
Programming the Web   Active Server Pages (ASP) <ul><li>Technology to easily create server-side applications </li></ul><ul...
Programming the Web ASP HTTP request (form data, HTTP  header data) HTTP response HTML, XML ASP page (static HTML +   serv...
Introduction to .NET What is .NET? <ul><li>A vision </li></ul><ul><ul><li>web sites will be joined by web services </li></...
<ul><li>A platform </li></ul><ul><ul><li>the .NET Framework </li></ul></ul><ul><ul><li>Visual Studio.NET </li></ul></ul><u...
<ul><li>A business model </li></ul><ul><ul><li>software as a service </li></ul></ul><ul><ul><li>subscription-based service...
Introduction to .NET The .NET Platform Web Form .NET Framework Windows and Linux and… Web Service .NET Foundation Web Serv...
The Microsoft .NET Platform   Visual Studio .NET .NET Enterprise Servers SQL Server 2005 Win Server 2003 .NET Framework CL...
Web Services <ul><li>A programmable application component accessible via standard web protocols </li></ul><ul><li>The cent...
Web Services Evolution of the Web Generation 2 Web Applications HTML Generation 1 Static HTML HTML HTML, XML Generation 3 ...
<ul><li>A set of technologies for developing and using components to create: </li></ul><ul><ul><li>web forms </li></ul></u...
The Microsoft .NET Framework   XML based Web Services Web Forms  ASP.NET Windows Forms Library classes for accessing data ...
The .NET Framework The .NET Framework and Visual Studio.NET Common Language Specification Common Language Runtime VB C++ C...
The .NET Framework .NET Framework Classes System.Data Design OLEDB SQLTypes SQL System  Globalization Diagnostics Configur...
Common Language Runtime Goals <ul><li>Development services </li></ul><ul><ul><li>deep cross-language interoperability </li...
Common Language Runtime <ul><li>Programs can run on any platform for which the CLR has been implemented </li></ul><ul><ul>...
Common Language Runtime Compilation Source Code C++, C#, VB or any .NET language csc.exe or vbc.exe Compiler Assembly DLL ...
Common Language Runtime Program written in any .NET supported language C#, VB.NET, etc. Intermediate Language (IL) - like ...
<ul><li>Assembly </li></ul><ul><ul><li>logical unit of deployment </li></ul></ul><ul><ul><li>contains manifest, metadata, ...
Common Language Runtime Assemblies <ul><li>Microsoft Intermediate Language </li></ul><ul><ul><li>MSIL or IL </li></ul></ul...
Common Language Runtime Execution Model CLR VB Source code Compiler C++ C# Assembly Assembly Assembly Operating System Ser...
Common Language Runtime Services <ul><li>Code management </li></ul><ul><li>Conversion of MSIL to native code  </li></ul><u...
<ul><li>Common Type System (CTS) </li></ul><ul><ul><li>superset of the data types used by most modern programming language...
Common Language Runtime Applications <ul><li>An application consists of one or more assemblies </li></ul><ul><li>How does ...
Common Language Runtime Security <ul><li>Evidence-based security (authentication) </li></ul><ul><li>Based on user identity...
Windows Forms <ul><li>Framework for building rich clients </li></ul><ul><li>Built upon .NET Framework, languages </li></ul...
Web Forms <ul><li>Built with ASP.NET </li></ul><ul><ul><li>logical evolution of ASP </li></ul></ul><ul><ul><li>similar dev...
Web Forms <ul><li>Allows separation of UI and business logic </li></ul><ul><ul><li>separation of concerns is a good thing ...
Web Forms <ul><li>Caching (pages, fragments, custom) </li></ul><ul><li>Scalable session state management </li></ul><ul><li...
<ul><li>Similar to ADO, but better factored </li></ul><ul><li>Language-neutral data access </li></ul><ul><li>Supports two ...
Languages   C # <ul><li>New language created for .NET </li></ul><ul><ul><li>a Java rip-off </li></ul></ul><ul><li>Safe, pr...
Languages   Visual Basic.NET <ul><li>Modernizes and simplifies Visual Basic </li></ul><ul><ul><li>because the old VB was p...
Conclusion <ul><li>dotNET is pretty neat really </li></ul><ul><ul><li>e ven if it does come from M$ </li></ul></ul><ul><li...
More Resources <ul><li>.NET </li></ul><ul><ul><li>http://www.microsoft.com/net/ </li></ul></ul><ul><ul><li>http://msdn.mic...
Upcoming SlideShare
Loading in …5
×

As Pdotnet

1,766 views
1,718 views

Published on

Published in: Education
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
1,766
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
36
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
  • This course will focus on server-side .NET technologies.
  • An ASP page receives input from a HTTP request, and then dynamically generates a new HTML page that is returned to the client. ASP can also return XML or other types of data.
  • .NET will enable the next generation of applications.
  • Microsoft is providing a suite of products and services to facilitate building this next generation. This course focuses on the .NET Framework and Visual Studio.NET.
  • Each blue box represents a separate computer (or cluster of computers).
  • The definition of a Web service is “a programmable application component accessible via standard Web protocols.” In other words, it is a component that can be called remotely from a client application, over the Internet. Web Services will allow people, companies, customers, suppliers, doctors, patients, etc. to interact using different computers, different operating systems, and different applications. For example, you could use the same Web Service to store your personal and work calendar information. You could access this information from different applications and view and change it in different ways.
  • The .NET Framework provides a set of technologies that makes creating, deploying, using and maintaining applications (including Web applications and Web Services) much easier and more robust.
  • The .NET framework exposes numerous classes to the developer. These classes allow the development of rich client applications and Web-based applications alike. The classes are shown here, divided into four areas. ASP.NET provides the core Web infrastructure, such as Web Forms for UI-based development and Web Services for programmatic interface development. User interface development on the Windows platform can be done using Windows Forms. ADO.NET and XML provide the functionality for data access. The core base classes provide infrastructure services such as security and transaction management. You can create code in any of a large number of languages. This code will integrate in a deep, seamless manner via a standard called the Common Language Specification. Visual Studio.NET provides tools that increases your productivity when creating applications.
  • This is but a brief illustration of the breadth of classes provided by the .NET Framework. We will explore many of these classes during this course. All of these classes are available to ALL languages.
  • The Common Language Runtime provides the underlying infrastructure for the .NET Framework. It provides very little application-visible functionality itself (security being a notable exception), but provides services to make development, deployment and execution much better in almost every way.
  • As a developer you can write code in the language of your choice. Your code is compiled into an Assembly, which is represented as a DLL or EXE.
  • IL is always compiled, never interpreted.
  • When an assembly starts running, the JIT (Just In Time) compiler in the Common Language Runtime converts the IL in the assembly to efficient machine code. It is this code that is actually executed.
  • The CLR provides many sophisticated services.
  • The CTS supports many types of data. It allows each language to implement its own unique features. The CLS allows different languages to interoperate in a deep manner. For example, you can create a class in C# that derives from a class written in Eiffel, and is called from a Perl program.
  • When we execute an application, how are the required assemblies located? Quite simply; the class loader (part of the CLR) will search the current directory for any assemblies. Assemblies should be kept within the same directory as the application that requires them. This allows different versions of the software to be installed on the machine without interfering with each other. However, if required, it is possible to share an assembly using the global assembly cache.
  • Before code in an assembly is run, the CLR looks at the identity of both the user and the code. You can specify policies that determine which code can be executed, and the priviledges that code will have when it runs.
  • Windows Forms is a framework for building rich Windows client applications, and can be written in any language that supports .NET. Windows Forms provide the developer with many features, such as: The simplicity that Visual Basic 6 programmers are used to. Easy deployment. Windows Forms (as .NET applications) automatically takes advantage of the versioning and deployment features of the .NET Framework. Windows Forms offers an architecture for controls and control containers based on concrete implementation of the control and container classes. This significantly reduces control-container interoperability issues. Security. Windows Forms takes full advantage of the security features of .NET. This means that Windows Forms can be used to implement everything from an untrusted control running in the browser to a fully trusted application installed on a user&apos;s hard drive. Web Services Support. Windows Forms offer full support for quickly and easily connecting to Web Services. Rich Graphics. Controls. Windows Forms offer a rich set of controls that encompass all of the controls offered by Windows and new features such as new &amp;quot;flat look&amp;quot; styles for Buttons, Radio Buttons and Checkboxes. Data Awareness. Windows Forms offer full support for the ADO.NET data model. ActiveX Controls. Windows Forms offer full support for ActiveX controls. You can easily host ActiveX controls in a Windows Forms application. You can also host a Windows Form control as an ActiveX control. Licensing. Windows Forms take advantage of the .NET Framework enhanced licensing model. Printing. Windows Forms offer a printing framework that enables applications to provide comprehensive reports. Accessibility. Windows Form controls implement the interfaces defined by Microsoft Active Accessibility (MSAA), making it straightforward to build applications that support accessibility aids such as screen readers.
  • The first incarnation of ASP proved very successful. As part of the .NET Framework, Microsoft supports ASP.NET. ASP.NET is a logical evolution of ASP that addresses many of the issues previously associated with ASP. ASP.NET is now compiled and not interpreted. This of course can go some way towards improving efficiency and also means that code can now support strongly typed variables other than VARIANTS. This makes ASP.NET much more flexible and easier to code. A great deal of work has also been done to make sure that ASP.NET development has become cleaner and more productive.
  • ADO.NET evolves from ADO, and is designed to deal with the issues of state, scalability and XML compatibility. Although existing ADO developers will find all of the old ADO classes inside the ADO.NET data model, they will also find that a few new classes have been introduced, including the DataSets, DataReaders and DataSetCommands classes.
  • C# is a new language designed to take advantage of most of the features of the .NET Framework. C# was designed from the ground up to support component concepts like events, methods and properties. In C#, everything is an object, which allows the creation of very clean designs. C# was designed to make it easy to create robust and maintainable software. C# should allow you to preserve your existing investment by integrating easily with your existing code.
  • VB.NET is a modernized version of Visual Basic. It is integrated with the .NET Framework, but still provides language constructs, features and syntax that is familiar to Visual Basic developers.
  • As Pdotnet

    1. 1. Introduction to ASP.NET Kevin McManus Adapted from material by Gill Windall and Mark Sapossnek
    2. 2. Contents <ul><li>An overview of what .NET is and some of its key features </li></ul><ul><li>Describe the areas of .NET likely to have an impact on how web applications are developed </li></ul><ul><li>What is Microsoft .NET? </li></ul><ul><ul><li>Some views </li></ul></ul><ul><ul><li>Web Services </li></ul></ul><ul><ul><li>ASP .NET versus ASP </li></ul></ul><ul><ul><li>.NET Platform and .NET Framework </li></ul></ul><ul><ul><li>Common Language Runtime (CLR) </li></ul></ul>
    3. 3. What is Microsoft .NET? that new language C# Microsoft putting XML into everything the next version of Visual Basic the next version of ASP the next version of Visual Studio Microsoft trying to kill Java being able to run everything across the Net it’s a good thing it’s rubbish!!!
    4. 4. What is Microsoft .NET? <ul><li>Initially announced as the latest release of everything Microsoft </li></ul><ul><ul><li>ASP.NET, VB.NET, VisualStudio.NET </li></ul></ul><ul><li>With are some big changes </li></ul><ul><ul><li>the new language C# </li></ul></ul><ul><ul><ul><li>got rid of VB at last </li></ul></ul></ul><ul><ul><li>the Common Language Runtime (CLR) </li></ul></ul><ul><ul><ul><li>language integration - shared libraries </li></ul></ul></ul><ul><ul><ul><li>possible platform independence – Mono CLR </li></ul></ul></ul><ul><ul><ul><li>an attack on JRE </li></ul></ul></ul><ul><ul><li>ability to develop and use software components over the web </li></ul></ul><ul><ul><ul><li>XML based Web Services </li></ul></ul></ul><ul><ul><li>simplified deployment of Windoze software </li></ul></ul><ul><ul><ul><li>an end to DLL hell </li></ul></ul></ul><ul><ul><ul><ul><li>no use of the “registry” </li></ul></ul></ul></ul><ul><ul><ul><ul><li>http://zdnet.com.com/2100-1104-991369.html </li></ul></ul></ul></ul><ul><ul><li>no more mixing HTML and script code in ASP </li></ul></ul>
    5. 5. Web Services <ul><li>Allow remote access to software components </li></ul><ul><ul><li>via standard web protocols </li></ul></ul><ul><li>Use XML to exchange structured data </li></ul><ul><li>Microsoft .NET is just one implementation of Web Services but there are many others </li></ul><ul><li>The idea of Web Services is not exclusive to Microsoft </li></ul>“ Last Wednesday, Microsoft released a new software development program called Visual Studio.Net. …. it represents the company's big leap into Web services, which many hope will trigger the next generation of corporate computing innovation. Microsoft spent $2 billion developing Visual Studio.Net and C#, but just about every other technology company on the planet -- including IBM and Sun Microsystems -- is also placing big bets on Web services.” ZDNet Feb 2002
    6. 6. Web Services and Microsoft .NET <ul><li>There are three main angles on this: </li></ul><ul><li>1. Microsoft plans to provide a number of Web Services that application developers can use for a fee </li></ul><ul><ul><li>Microsoft .NET Passport - authentication service offers single sign-on capability for any Web site </li></ul></ul><ul><ul><ul><li>now Windows Live ID </li></ul></ul></ul><ul><ul><li>Microsoft .NET My Services - set of user-centric, XML Web services to manage, protect personal information e.g. Calendar, Contact, Inbox </li></ul></ul><ul><li>2. Using ASP.NET you can create Web Services that others can use </li></ul><ul><li>3. Using a .NET language (or ASP.NET) you can write a program that uses Web Services </li></ul>
    7. 7. Programming the Web Server-Side Code <ul><li>What is server-side code? </li></ul><ul><ul><li>Software that runs on the server, not the client </li></ul></ul><ul><ul><li>Receives input from </li></ul></ul><ul><ul><ul><li>URL parameters </li></ul></ul></ul><ul><ul><ul><li>HTML form data </li></ul></ul></ul><ul><ul><ul><li>Cookies </li></ul></ul></ul><ul><ul><ul><li>HTTP headers </li></ul></ul></ul><ul><ul><li>Can access server-side databases, e-mail servers, files, mainframes, etc. </li></ul></ul><ul><ul><li>Dynamically builds a custom HTML response for a client </li></ul></ul>
    8. 8. Programming the Web Server-Side Code <ul><li>Why server-side code? </li></ul><ul><ul><li>Availability </li></ul></ul><ul><ul><ul><li>You can reach the Internet from any browser, any device, any time, anywhere </li></ul></ul></ul><ul><ul><li>Manageability </li></ul></ul><ul><ul><ul><li>Does not require distribution of application code </li></ul></ul></ul><ul><ul><ul><li>Easy to change code </li></ul></ul></ul><ul><ul><li>Security </li></ul></ul><ul><ul><ul><li>Source code is not exposed </li></ul></ul></ul><ul><ul><ul><li>Once user is authenticated, can only allow certain actions </li></ul></ul></ul><ul><ul><li>Scalability </li></ul></ul><ul><ul><ul><li>Web-based 3-tier architecture can scale out </li></ul></ul></ul>
    9. 9. Programming the Web Server-Side Technologies <ul><li>Common Gateway Interface (CGI) </li></ul><ul><ul><li>not language specific </li></ul></ul><ul><li>Internet Server API (ISAPI) </li></ul><ul><ul><li>Netscape Server API (NSAPI) </li></ul></ul><ul><li>Active Server Pages (ASP) </li></ul><ul><ul><li>now obsolete </li></ul></ul><ul><li>Java Server Pages (JSP) </li></ul><ul><li>PHP Hypertext Processor (PHP) </li></ul><ul><li>Cold Fusion (CFM) </li></ul><ul><ul><li>actually J2EE with the arrival of ColdFusion MX </li></ul></ul><ul><li>ASP.NET </li></ul>
    10. 10. Programming the Web Active Server Pages (ASP) <ul><li>Technology to easily create server-side applications </li></ul><ul><li>ASP pages are written in a scripting language </li></ul><ul><ul><li>usually VBScript but also Jscript or PerlScript </li></ul></ul><ul><li>An ASP page contains static HTML interspersed with server-side code </li></ul><ul><li>ASP script is commonly used to access and update a database </li></ul><ul><ul><li>3-tier systems </li></ul></ul>
    11. 11. Programming the Web ASP HTTP request (form data, HTTP header data) HTTP response HTML, XML ASP page (static HTML + server-side logic)
    12. 12. Introduction to .NET What is .NET? <ul><li>A vision </li></ul><ul><ul><li>web sites will be joined by web services </li></ul></ul><ul><ul><li>new smart devices will join the PC </li></ul></ul><ul><ul><li>user interfaces will become more adaptable and customizable </li></ul></ul><ul><ul><li>enabled by web standards </li></ul></ul>
    13. 13. <ul><li>A platform </li></ul><ul><ul><li>the .NET Framework </li></ul></ul><ul><ul><li>Visual Studio.NET </li></ul></ul><ul><ul><li>.NET Enterprise Servers </li></ul></ul><ul><ul><ul><li>database, messaging, integration, commerce, proxy, security, mobility, orchestration, content management </li></ul></ul></ul><ul><ul><li>.NET Building Block Services </li></ul></ul><ul><ul><ul><li>Passport </li></ul></ul></ul><ul><ul><ul><li>.NET My Services (“Hailstorm”) </li></ul></ul></ul><ul><ul><li>goal: make it incredibly easy to build powerful web applications and web services </li></ul></ul>Introduction to .NET What is .NET? } The focus of this course
    14. 14. <ul><li>A business model </li></ul><ul><ul><li>software as a service </li></ul></ul><ul><ul><li>subscription-based services </li></ul></ul><ul><ul><li>application hosting </li></ul></ul>Introduction to .NET What is .NET?
    15. 15. Introduction to .NET The .NET Platform Web Form .NET Framework Windows and Linux and… Web Service .NET Foundation Web Services Your Internal Web Service Third-Party Web Services .NET Enterprise Servers Clients Applications Protocols: HTTP, HTML, XML, SOAP, UDDI Tools: Visual Studio.NET, Notepad
    16. 16. The Microsoft .NET Platform Visual Studio .NET .NET Enterprise Servers SQL Server 2005 Win Server 2003 .NET Framework CLR, C#, ASP.NET, etc. .NET Services e.g. Microsoft Passport Operating System e.g. Windows XP, Windows 2000, Linux
    17. 17. Web Services <ul><li>A programmable application component accessible via standard web protocols </li></ul><ul><li>The centre of the .NET architecture </li></ul><ul><li>Exposes functionality over the Web </li></ul><ul><li>Built on existing and emerging standards </li></ul><ul><ul><li>HTTP, XML, SOAP, UDDI, WSDL, … </li></ul></ul>
    18. 18. Web Services Evolution of the Web Generation 2 Web Applications HTML Generation 1 Static HTML HTML HTML, XML Generation 3 Web Services XML
    19. 19. <ul><li>A set of technologies for developing and using components to create: </li></ul><ul><ul><li>web forms </li></ul></ul><ul><ul><li>web services </li></ul></ul><ul><ul><li>windows applications </li></ul></ul><ul><li>Supports the software lifecycle </li></ul><ul><ul><li>development </li></ul></ul><ul><ul><li>debugging </li></ul></ul><ul><ul><li>deployment </li></ul></ul><ul><ul><li>maintenance </li></ul></ul>The .NET Framework What Is the .NET Framework?
    20. 20. The Microsoft .NET Framework XML based Web Services Web Forms ASP.NET Windows Forms Library classes for accessing data and XML (ADO.NET, SQL, XML, XSLT) Library Framework Base classes (IO, string, collections, security) Common Language Runtime
    21. 21. The .NET Framework The .NET Framework and Visual Studio.NET Common Language Specification Common Language Runtime VB C++ C# ASP.NET: Web Services and Web Forms JScript … Windows Forms .NET Framework Base Classes ADO.NET: Data and XML Visual Studio.NET
    22. 22. The .NET Framework .NET Framework Classes System.Data Design OLEDB SQLTypes SQL System Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Runtime InteropServices Remoting Serialization System.Xml XPath XSLT Serialization System.Web Configuration SessionState Caching Security Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing System.Windows.Forms Form Button MessageBox ListControl
    23. 23. Common Language Runtime Goals <ul><li>Development services </li></ul><ul><ul><li>deep cross-language interoperability </li></ul></ul><ul><ul><li>increased productivity </li></ul></ul><ul><li>Deployment services </li></ul><ul><ul><li>simple, reliable deployment </li></ul></ul><ul><ul><li>fewer versioning problems – NO MORE ‘DLL HELL’ </li></ul></ul><ul><li>Run-time services </li></ul><ul><ul><li>performance </li></ul></ul><ul><ul><li>scalability </li></ul></ul><ul><ul><li>availability </li></ul></ul><ul><li>reliability </li></ul><ul><li>security </li></ul><ul><li>safety </li></ul>
    24. 24. Common Language Runtime <ul><li>Programs can run on any platform for which the CLR has been implemented </li></ul><ul><ul><li>just like the JVM </li></ul></ul><ul><li>The CLR is no longer only available for Microsoft operating systems </li></ul><ul><ul><li>there are initiatives to port to other platforms </li></ul></ul><ul><ul><li>Mono on Linux released 24 th Nov 2004 </li></ul></ul><ul><li>There are many .NET languages </li></ul><ul><ul><li>Microsoft </li></ul></ul><ul><ul><ul><li>C# , C++, VB.NET, JScript </li></ul></ul></ul><ul><ul><li>Third Party </li></ul></ul><ul><ul><ul><li>Cobol, Fortran, Perl, Python, Smalltalk </li></ul></ul></ul><ul><li>CLR gives language integration </li></ul><ul><ul><li>a class written in one language can be used by a class written in another </li></ul></ul><ul><ul><li>share exactly the same libraries </li></ul></ul><ul><ul><li>one API to learn </li></ul></ul>
    25. 25. Common Language Runtime Compilation Source Code C++, C#, VB or any .NET language csc.exe or vbc.exe Compiler Assembly DLL or EXE
    26. 26. Common Language Runtime Program written in any .NET supported language C#, VB.NET, etc. Intermediate Language (IL) - like Java bytecode (.exe or .dll) compile Common Language Runtime Loads and executes code, garbage collects etc
    27. 27. <ul><li>Assembly </li></ul><ul><ul><li>logical unit of deployment </li></ul></ul><ul><ul><li>contains manifest, metadata, MSIL and resources </li></ul></ul><ul><li>Manifest </li></ul><ul><ul><li>metadata about the components in an assembly (version, types, dependencies, etc.) </li></ul></ul><ul><li>Type metadata </li></ul><ul><ul><li>completely describes all types defined in an assembly: properties, methods, arguments, return values, attributes, base classes, … </li></ul></ul>Common Language Runtime Assemblies
    28. 28. Common Language Runtime Assemblies <ul><li>Microsoft Intermediate Language </li></ul><ul><ul><li>MSIL or IL </li></ul></ul><ul><ul><li>all languages compile to IL (managed code) </li></ul></ul><ul><ul><li>IL is always compiled to native code before being executed </li></ul></ul><ul><ul><ul><li>Just In Time (JIT) compilation </li></ul></ul></ul><ul><li>Resources </li></ul><ul><ul><li>data, images, audio, etc. </li></ul></ul>
    29. 29. Common Language Runtime Execution Model CLR VB Source code Compiler C++ C# Assembly Assembly Assembly Operating System Services MSIL Common Language Runtime JIT Compiler Compiler Compiler Native code Managed Code Managed Code Managed Code Unmanaged Code CLR Services Ngen
    30. 30. Common Language Runtime Services <ul><li>Code management </li></ul><ul><li>Conversion of MSIL to native code </li></ul><ul><li>Loading and execution of managed code </li></ul><ul><li>Creation and management of metadata </li></ul><ul><li>Verification of type safety </li></ul><ul><li>Insertion and execution of security checks </li></ul><ul><li>Memory management and isolation </li></ul><ul><li>Garbage collection </li></ul><ul><li>Handling exceptions across languages </li></ul><ul><li>Interoperation between .NET Framework objects, COM objects and Win32 DLLs </li></ul><ul><li>Automation of object layout for late binding </li></ul><ul><li>Developer services (profiling, debugging, etc.) </li></ul>
    31. 31. <ul><li>Common Type System (CTS) </li></ul><ul><ul><li>superset of the data types used by most modern programming languages </li></ul></ul><ul><li>Common Language Specification (CLS) </li></ul><ul><ul><li>subset of CTS that allows code written in different languages to interoperate </li></ul></ul><ul><li>What languages? </li></ul><ul><ul><li>Microsoft - C#, C++, VB.NET, Jscript </li></ul></ul><ul><ul><li>third party </li></ul></ul><ul><ul><ul><li>Perl, Ada, Cobol, Java, Fortran, Delphi </li></ul></ul></ul><ul><ul><ul><li>Eiffel, Smalltalk, Scheme, Oberon, Haskell, Python,… </li></ul></ul></ul><ul><ul><ul><li>only practical if the language supports some sort of encapsulation </li></ul></ul></ul>Common Language Runtime Multiple Language Support
    32. 32. Common Language Runtime Applications <ul><li>An application consists of one or more assemblies </li></ul><ul><li>How does one assembly bind to another? </li></ul><ul><ul><li>based upon metadata and policy </li></ul></ul><ul><ul><ul><li>local (preferred) </li></ul></ul></ul><ul><ul><ul><li>Assembly Global Cache (AGC) (accurate garbage collection?) </li></ul></ul></ul><ul><li>Multiple versions of an assembly may exist on the same machine </li></ul><ul><ul><li>easier software deployment, updates and removal </li></ul></ul><ul><ul><li>multiple versions of an assembly can even be used by the same application </li></ul></ul><ul><ul><ul><li>like this is a new thing? </li></ul></ul></ul>
    33. 33. Common Language Runtime Security <ul><li>Evidence-based security (authentication) </li></ul><ul><li>Based on user identity and code identity </li></ul><ul><li>Configurable policies </li></ul><ul><li>Imperative and declarative interfaces </li></ul>
    34. 34. Windows Forms <ul><li>Framework for building rich clients </li></ul><ul><li>Built upon .NET Framework, languages </li></ul><ul><li>Rapid Application Development (RAD) </li></ul><ul><li>Visual inheritance </li></ul><ul><li>Anchoring and docking </li></ul><ul><li>Rich set of controls </li></ul><ul><li>Extensible controls </li></ul><ul><li>Data-aware </li></ul><ul><li>Easily hooked into Web Services </li></ul><ul><li>ActiveX support </li></ul><ul><li>Licensing support </li></ul><ul><li>Printing support </li></ul><ul><li>Advanced graphics </li></ul>
    35. 35. Web Forms <ul><li>Built with ASP.NET </li></ul><ul><ul><li>logical evolution of ASP </li></ul></ul><ul><ul><li>similar development model: edit the page and go </li></ul></ul><ul><li>Requires less code </li></ul><ul><ul><li>actually more code but less programming </li></ul></ul><ul><li>New programming model </li></ul><ul><ul><li>event-driven/server-side controls </li></ul></ul><ul><ul><li>rich controls (e.g. data grid, validation) </li></ul></ul><ul><ul><li>data binding </li></ul></ul><ul><ul><li>controls generate browser-specific code </li></ul></ul><ul><ul><li>simplified handling of page state </li></ul></ul>
    36. 36. Web Forms <ul><li>Allows separation of UI and business logic </li></ul><ul><ul><li>separation of concerns is a good thing </li></ul></ul><ul><ul><ul><li>cleaner, more maintainable code </li></ul></ul></ul><ul><ul><ul><li>no more VB  </li></ul></ul></ul><ul><li>Uses .NET languages </li></ul><ul><ul><li>not just scripting </li></ul></ul><ul><li>Easy to use components </li></ul><ul><li>XCOPY/FTP deployment </li></ul><ul><li>Simple configuration (XML-based) </li></ul>
    37. 37. Web Forms <ul><li>Caching (pages, fragments, custom) </li></ul><ul><li>Scalable session state management </li></ul><ul><li>Tracing support </li></ul><ul><li>ASP.NET is extensible </li></ul><ul><ul><li>no ISAPI / ASP dichotomy </li></ul></ul><ul><li>Automatic process rollover </li></ul><ul><li>Forms-based authentication </li></ul>
    38. 38. <ul><li>Similar to ADO, but better factored </li></ul><ul><li>Language-neutral data access </li></ul><ul><li>Supports two styles of data access </li></ul><ul><ul><li>disconnected </li></ul></ul><ul><ul><li>forward-only, read-only access </li></ul></ul><ul><li>Supports data binding </li></ul><ul><li>DataSet: a collection of tables </li></ul><ul><li>Can view and process data relationally (tables) or hierarchically (XML) </li></ul>ADO.NET ActiveX Data Objects
    39. 39. Languages C # <ul><li>New language created for .NET </li></ul><ul><ul><li>a Java rip-off </li></ul></ul><ul><li>Safe, productive evolution of C++ </li></ul><ul><ul><li>but not as safe as Java until M$ sort out the exceptions </li></ul></ul><ul><li>Key concepts: </li></ul><ul><ul><li>component-oriented </li></ul></ul><ul><ul><li>everything is an object </li></ul></ul><ul><ul><li>robust and durable code </li></ul></ul><ul><ul><li>preserving your investment </li></ul></ul><ul><ul><ul><li>whatever that means </li></ul></ul></ul><ul><li>Submitted to the ECMA for standardization </li></ul>
    40. 40. Languages Visual Basic.NET <ul><li>Modernizes and simplifies Visual Basic </li></ul><ul><ul><li>because the old VB was pants </li></ul></ul><ul><li>Now provides </li></ul><ul><ul><li>inheritance </li></ul></ul><ul><ul><li>threading </li></ul></ul><ul><ul><li>exception handling </li></ul></ul><ul><ul><li>Support for late binding </li></ul></ul><ul><ul><ul><li>whatever that is </li></ul></ul></ul><ul><li>Actually just C# with a different syntax </li></ul><ul><ul><li>almost </li></ul></ul>
    41. 41. Conclusion <ul><li>dotNET is pretty neat really </li></ul><ul><ul><li>e ven if it does come from M$ </li></ul></ul><ul><li>A whole lot of good ideas have been gathered together without the accumulation of legacy bugware is observed in other M$ products </li></ul><ul><li>Although .NET initially looked like another attempt by Mr Evil to take over the world it is remarkably open and standard compliant compared with other M$ offerings </li></ul><ul><li>The best bit is probably Visual Studio with it’s tooled up approach to application development </li></ul>
    42. 42. More Resources <ul><li>.NET </li></ul><ul><ul><li>http://www.microsoft.com/net/ </li></ul></ul><ul><ul><li>http://msdn.microsoft.com/net/ </li></ul></ul><ul><ul><li>http://www.gotdotnet.com </li></ul></ul><ul><ul><li>msnews.microsoft.com news server </li></ul></ul><ul><ul><ul><li>microsoft.public.dotnet.general newsgroup </li></ul></ul></ul><ul><li>XML </li></ul><ul><ul><li>http://msdn.microsoft.com/xml/default.asp </li></ul></ul><ul><ul><li>http://www.w3.org/XML/ </li></ul></ul>

    ×