Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "A Light Introduction to ASP.NET Kevin McManus Adapted from material by Gill Windall and Mark Sapossnek."— Presentation transcript:

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

2 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 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)

3 Introduction to ASP.NET © K.M. 2/11/2007 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!!!

4 Introduction to ASP.NET © K.M. 2/11/2007 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

5 Introduction to ASP.NET © K.M. 2/11/2007 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

6 Introduction to ASP.NET © K.M. 2/11/2007 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

7 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 7 Programming the Web Server-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

8 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 8 Programming the Web Server-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

9 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 9 Programming the Web Server-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

10 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 10 Programming the Web Active 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

11 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 11 Programming the Web ASP HTTP request (form data, HTTP header data) HTTP response HTML, XML ASP page (static HTML + server-side logic)

12 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 12 Introduction to.NET What 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

13 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 13 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 Introduction to.NET What is.NET? } The focus of this course

14 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 14 A business model software as a service subscription-based services application hosting Introduction to.NET What is.NET?

15 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 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 ClientsApplications Protocols: HTTP, HTML, XML, SOAP, UDDI Tools: Visual Studio.NET, Notepad

16 Introduction to ASP.NET © K.M. 2/11/2007 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

17 Introduction to ASP.NET © K.M. 2/11/2007 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, …

18 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 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 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 19 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.NET Framework What Is the.NET Framework?

20 Introduction to ASP.NET © K.M. 2/11/2007 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

21 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 21 Common Language Specification Common Language Runtime VBC++C# ASP.NET: Web Services and Web Forms JScript… Windows Forms.NET Framework Base Classes ADO.NET: Data and XML Visual Studio.NET The.NET Framework The.NET Framework and Visual Studio.NET

22 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 22 System.Data Design OLEDB SQLTypes SQL System Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess SecurityRuntime InteropServices Remoting Serialization System.Xml XPath XSLTSerialization System.Web ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing The.NET Framework.NET Framework Classes System.Windows.Forms FormButton MessageBoxListControl

23 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 23 Common Language Runtime Goals 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

24 Introduction to ASP.NET © K.M. 2/11/2007 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 24 th 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

25 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 25 Source Code C++, C#, VB or any.NET language csc.exe or vbc.exe Compiler Assembly DLL or EXE Common Language Runtime Compilation

26 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 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 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 27 Common Language Runtime Services 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.)

28 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 28 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 Common Language Runtime Multiple Language Support

29 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 29 Windows Forms 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

30 Introduction to ASP.NET © K.M. 2/11/2007 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

31 Introduction to ASP.NET © K.M. 2/11/2007 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

32 Introduction to ASP.NET © K.M. 2/11/2007 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

33 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 33 Languages C # 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

34 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 34 Languages Visual 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

35 Introduction to ASP.NET © K.M. 2/11/2007 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

36 Introduction to ASP.NET © K.M. 2/11/2007 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/

37 Introduction to ASP.NET © K.M. 2/11/2007 the University of Greenwich 37 Questions


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

Similar presentations


Ads by Google