1 / 37

A Light Introduction to ASP.NET

A Light Introduction to ASP.NET. Kevin McManus Adapted from material by Gill Windall and Mark Sapossnek. Contents. An overview of what .NET is and some of its key features Describe the areas of .NET likely to have an impact on how web applications are developed What is Microsoft .NET?

dewitt
Download Presentation

A Light Introduction to ASP.NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Light Introduction to ASP.NET Kevin McManus Adapted from material by Gill Windall and Mark Sapossnek

  2. Contents • An overview of what .NET is and some of its key features • Describe the areas of .NET likely to have an impact on how web applications are developed • What is Microsoft .NET? • Some views • Web Services • ASP .NET versus ASP • .NET Platform and .NET Framework • Common Language Runtime (CLR) the University of Greenwich

  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!!! the University of Greenwich

  4. What is Microsoft .NET? • Initially announced as the latest release of everything Microsoft • ASP.NET, VB.NET, VisualStudio.NET • With some big ideas • the new language C# • got rid of VB at last • the Common Language Runtime (CLR) • language integration - shared libraries • possible platform independence • an attack on JRE • ability to develop and use software components over the web • XML based Web Services • simplified deployment of Windoze software • an end to DLL hell • no use of the “registry” • http://zdnet.com.com/2100-1104-991369.html • no more mixing HTML and script code in ASP the University of Greenwich

  5. Web Services • Allow remote access to software components • via standard web protocols • Use XML to exchange structured data • Microsoft .NET is just one implementation of Web Services but there are many others • The idea of Web Services is not exclusive to Microsoft “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 the University of Greenwich

  6. Web Services and Microsoft .NET There were three main angles on this: 1. Microsoft plans to provide a number of Web Services that application developers can use for a fee • Microsoft .NET Passport - authentication service offers single sign-on capability for any Web site • now Windows Live ID • Microsoft .NET My Services - set of user-centric, XML Web services to manage, protect personal information e.g. Calendar, Contact, Inbox 2. Using ASP.NET you can create Web Services that others can use 3. Using a .NET language (or ASP.NET) you can write a program that uses Web Services the University of Greenwich

  7. Programming the WebServer-Side Code • What is server-side code? • Software that runs on the server, not the client • Receives input from • URL parameters • HTML form data • Cookies • HTTP headers • Can access server-side databases, e-mail servers, files, mainframes, etc. • Dynamically builds a custom HTML response for a client the University of Greenwich

  8. Programming the WebServer-Side Code • Why server-side code? • Availability • You can reach the Internet from any browser, any device, any time, anywhere • Manageability • Does not require distribution of application code • Easy to change code • Security • Source code is not exposed • Once user is authenticated, can only allow certain actions • Scalability • Web-based 3-tier architecture can scale out the University of Greenwich

  9. Programming the WebServer-Side Technologies • Common Gateway Interface (CGI) • not language specific • Internet Server API (ISAPI) • Netscape Server API (NSAPI) • Active Server Pages (ASP) • now obsolete • Java Server Pages (JSP) • PHP Hypertext Processor (PHP) • Cold Fusion (CFM) • actually J2EE with the arrival of ColdFusion MX • ASP.NET the University of Greenwich

  10. Programming the WebActive Server Pages (ASP) • Technology to easily create server-side applications • A complete rip-off of the good work of Rasmus Lerdorf • ASP pages are written in a scripting language • usually VBScript but also Jscript or PerlScript • An ASP page contains static HTML interspersed with server-side code • ASP script is (was) commonly used to access and update a database (Access – giggle ) • 3-tier systems the University of Greenwich

  11. Programming the WebASP HTTP responseHTML, XML HTTP request (form data, HTTP header data) ASP page (static HTML + server-side logic) the University of Greenwich

  12. Introduction to .NETWhat is .NET? • A vision • web sites will be joined by web services • new smart devices will join the PC • user interfaces will become more adaptable and customizable • enabled by web standards the University of Greenwich

  13. Introduction to .NETWhat is .NET? • A platform • the .NET Framework • Visual Studio.NET • .NET Enterprise Servers • database, messaging, integration, commerce, proxy, security, mobility, orchestration, content management • .NET Building Block Services • Passport • .NET My Services (“Hailstorm”) • goal: make it incredibly easy to build powerful web applications and web services } The focus of this course the University of Greenwich

  14. Introduction to .NETWhat is .NET? • A business model • software as a service • subscription-based services • application hosting the University of Greenwich

  15. Introduction to .NETThe .NET Platform Clients Applications Web Form Web Service Protocols: HTTP,HTML, XML, SOAP, UDDI .NET Framework Tools:Visual Studio.NET,Notepad Windows and Linux and… Your InternalWeb Service .NET FoundationWeb Services Third-PartyWeb Services .NET EnterpriseServers the University of Greenwich

  16. The Microsoft .NET Platform Visual Studio .NET .NET Enterprise Servers SQL Server 2005 Win Server 2003 Exchange 2010 .NET Framework CLR, C#, ASP.NET, etc. .NET Services e.g. Microsoft Passport Operating System e.g. Windows XP, Windows 2000, Linux the University of Greenwich

  17. Web Services • A programmable application component accessible via standard web protocols • The centre of the .NET architecture • Exposes functionality over the Web • Built on existing and emerging standards • HTTP, XML, SOAP, UDDI, WSDL, … the University of Greenwich

  18. HTML, XML HTML HTML XML Generation 1Static HTML Generation 2Web Applications Generation 3Web Services Web ServicesEvolution of the Web the University of Greenwich

  19. The .NET FrameworkWhat Is the .NET Framework? • A set of technologies for developing and using components to create: • web forms • web services • windows applications • Supports the software lifecycle • development • debugging • deployment • maintenance the University of Greenwich

  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, LINQ) Library Framework Base classes (IO, string, collections, security) Common Language Runtime the University of Greenwich

  21. The .NET FrameworkThe .NET Framework and Visual Studio.NET VB C++ C# JScript … Common Language Specification ASP.NET: Web Services and Web Forms WindowsForms Visual Studio.NET ADO.NET: Data and XML .NET Framework Base Classes Common Language Runtime the University of Greenwich

  22. The .NET Framework.NET Framework Classes System.Web System.Windows.Forms Form Button Services UI Description HtmlControls MessageBox ListControl Discovery WebControls Protocols System.Drawing Caching Security Drawing2D Printing Configuration SessionState Imaging Text System.Data System.Xml OLEDB SQL XSLT Serialization Design SQLTypes XPath System Collections IO Security Runtime InteropServices Configuration Net ServiceProcess Remoting Diagnostics Reflection Text Serialization Globalization Resources Threading the University of Greenwich

  23. Common Language RuntimeGoals • Development services • deep cross-language interoperability • increased productivity • Deployment services • simple, reliable deployment • fewer versioning problems – NO MORE ‘DLL HELL’ • Run-time services • performance • scalability • availability • reliability • security • safety the University of Greenwich

  24. Common Language Runtime • Programs can run on any platform for which the CLR has been implemented • just like the JVM • The CLR is no longer only available for Microsoft operating systems • there are initiatives to port to other platforms • Mono on Linux released 24th Nov 2004 • seems to be making itself useful for .NET apps on Android • CLR gives language integration • a class written in one language can be used by a class written in another • share exactly the same libraries • one API to learn the University of Greenwich

  25. Common Language RuntimeCompilation Source Code Assembly Compiler csc.exe or vbc.exe C++, C#, VB or any .NET language DLL or EXE the University of Greenwich

  26. Common Language Runtime Program written in any .NET supported language C#, VB.NET, etc. compile Intermediate Language (IL) - like Java bytecode (.exe or .dll) Common Language Runtime Loads and executes code, garbage collects etc the University of Greenwich

  27. Code management Conversion of MSIL to native code Loading and execution of managed code Creation and management of metadata Verification of type safety Insertion and execution of security checks Memory management and isolation Garbage collection Handling exceptions across languages Interoperation between .NET Framework objects, COM objects and Win32 DLLs Automation of object layout for late binding Developer services (profiling, debugging, etc.) Common Language RuntimeServices the University of Greenwich

  28. Common Language RuntimeMultiple Language Support • Common Type System (CTS) • superset of the data types used by most modern programming languages • Common Language Specification (CLS) • subset of CTS that allows code written in different languages to interoperate • What languages? • Microsoft - C#, C++, VB.NET, Jscript • third party • Perl, Ada, Cobol, Java, Fortran, Delphi • Eiffel, Smalltalk, Scheme, Oberon, Haskell, Python,… • only practical if the language supports some sort of encapsulation the University of Greenwich

  29. Framework for building “rich clients” Built upon .NET Framework, languages Rapid Application Development (RAD) Visual inheritance (?) Anchoring and docking Rich set of controls Extensible controls Data-aware Easily hooked into Web Services ActiveX support Licensing support Printing support Advanced graphics Windows Forms the University of Greenwich

  30. Web Forms • Built with ASP.NET • logical evolution of ASP • similar development model: edit the page and go • Requires less code • actually more code but less programming • New programming model • event-driven/server-side controls • rich controls (e.g. data grid, validation) • data binding • controls generate browser-specific code • simplified handling of page state the University of Greenwich

  31. Web Forms • Allows separation of UI and business logic • separation of concerns is a good thing • cleaner, more maintainable code • no more VB  • Uses .NET languages • not just scripting • Easy to use components • XCOPY/FTP deployment the University of Greenwich

  32. Web Forms • Caching (pages, fragments, custom) • Scalable session state management • Tracing support • ASP.NET is extensible • no ISAPI / ASP dichotomy the University of Greenwich

  33. LanguagesC# • New language created for .NET • a Java rip-off • Safe, productive evolution of C++ • but not as safe as Java until M$ sort out the exception handling • and the pointers • Key concepts: • component-oriented • everything is an object • robust and durable code • preserving your investment • whatever that means • Submitted to the ECMA for standardization the University of Greenwich

  34. LanguagesVisual Basic.NET • Modernizes and simplifies Visual Basic • because the old VB was pants • no really – it was truly awful • Now provides • inheritance • threading • exception handling • Support for late binding • whatever that is • Actually just C# with a different syntax • almost the University of Greenwich

  35. Conclusion • dotNET is pretty neat really • even if it does come from M$ • A whole lot of good ideas have been gathered together without the accumulation of legacy bugware is observed in other M$ products • 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 • The best bit is probably Visual Studio with it’s tooled up approach to application development the University of Greenwich

  36. More Resources • .NET • http://www.microsoft.com/net/ • http://msdn.microsoft.com/net/ • http://www.gotdotnet.com • msnews.microsoft.com news server • microsoft.public.dotnet.general newsgroup • XML • http://msdn.microsoft.com/xml/default.asp • http://www.w3.org/XML/ the University of Greenwich

  37. Questions the University of Greenwich

More Related