ASP &.NET. Microsoft's Solution for Dynamic Web Development. Mohammad Ali Choudhry Milad Armeen Husain Zeerapurwala Campbell Ma Seul Kee Yoon

Size: px
Start display at page:

Download "ASP &.NET. Microsoft's Solution for Dynamic Web Development. Mohammad Ali Choudhry Milad Armeen Husain Zeerapurwala Campbell Ma Seul Kee Yoon"

Transcription

1 ASP &.NET Microsoft's Solution for Dynamic Web Development Mohammad Ali Choudhry Milad Armeen Husain Zeerapurwala Campbell Ma Seul Kee Yoon

2 Introduction Microsoft's Server-side technology. Uses built-in objects. Application, ASPError, Request, Response, Server, and Session. ASP written in VB script, but can use other languages using installable engines. Latest version ASP-3.0 in Nov Succeeded by ASP.NET in Jan 2002

3 Sample Usage <html> <body> <% response.write("hello World!") %> </body> </html> Simplicity and Speed over CGI and Perl. Browser only sees HTML code. Runs only on Microsoft platform. Partitioning the Interface and Engine is difficult.

4 Microsoft.Net Framework A software component which can be added to the Microsoft Windows operating system. It provides a large body of pre-coded solutions to common program requirements, and manages the execution of programs written specifically for the framework. The.NET Framework is a key Microsoft offering, and is intended to be used by most new applications created for the W indows platform. The pre-coded solutions in the namespaces form the framework's class library and cover a large range of programming needs in areas including the user interface, data access, cryptography, web application development, numeric algorithms, and network communications. The functions of the class library are used by programmers who combine them with their own code to produce applications.

5 Microsoft.Net Framework It brings into the operating system features and responsibilities that previously had been provided individually by programming languages and tools from various sources. The incorporation of the features into the operating system offers a number of advantages, including: Assuring the availability of framework features to all programs written in any of the.net languages. Providing to programmers a common means of accessing framework features, regardless of programming language. Guarantees of a common behavior within the framework, regardless of programming language. Allowing the operating system to provide some guarantees of program behavior that it otherwise could not offer. Reducing the complexity and limitations of program-to-program communication, even when those programs are written in different.net languages.

6 ASP.NET ASP.NET is a set of web application development technologies marketed by Microsoft. Programmers can use it to build dynamic web sites, web applications and XML web services. It is part of Microsoft's.NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP and ASP.NET differ significantly. Microsoft has completely rebuilt ASP.NET, based on the Common Language Runtime (CLR) shared by all Microsoft.NET applications. ASP.NET has performance benefits over other script-based technologies because the server-side code is compiled to one or a few DLL files on a web server.

7 ASP.NET Encourages the programmer to develop applications using an event-driven GUI paradigm, rather than in conventional webscripting environments like ASP and PHP. The framework attempts to combine existing technologies such as JavaScript with internal components like "Viewstate" to bring persistent (inter-request) state to the inherently stateless web environment. ASP.NET uses the.net Framework as an infrastructure. The.NET Framework offers a managed runtime environment (like Java), providing a virtual machine with JIT and a class library. Data access provides one example, and comes tightly coupled with ASP.NET. A developer can make a page to display a list of records in a database, for example, significantly more readily using ASP.NET than with traditional web technologies like ASP or PHP. Can cut down on development time by providing a rich set of features.

8 ASP.NET vs ASP Compatibility: Run along side ASP, uses new file extension.aspx. Language Support:.NET Framework, ADO.NET, C#, C++, VB and some 25 more languages. COM Object : Next Generation Windows Services (NGWS). No DLL registering. Event Aware Controls: Expose events processed by ASP.NET. Example: Load, Click and Change events. ASP.NET Controls: HTML Server Controls: Traditional HTML Tags W eb Server Controls: New ASP.NET tags Validation Server Controls: For input validation

9 ASP.NET vs ASP Caching: ASP+ allows objects and output to be cached. Programmer decides what needs to be cached. Scalability: ASP+ includes maintaining session state across server, monitors processes and multi-processor balancing.

10 ASP.NET versus PHP Advantages Compiled code as opposed to scripted, pre-compiled code increases web-site speed. Strong Object-oriented design Built in security tools to help defend against Cross-site scripting (XSS), SQL injection, session hijacking, hidden field tampering, etc Examples: ValidateRequest, ViewStateUserKey, ViewState Ease of development with.net framework. Visual Studio 2005 provides a nice WYSIWYG IDE to aid for faster development. Disadvantages OS dependent means Windows only Proprietary technology Memory usage high depending on configuration

11 .NET vs Mono Mono is an open source technology sponsored by Novell to allow UNIX developers to build and deploy.net applications for different platforms. Advantages Framework is more complete than Mono which is limited to only.net 1.1 API Visual Studio 2005 more refined then open source toolkits Disadvantages OS dependent where as Mono supports many platforms Proprietary technology

12 .NET vs JSP Advantages: Ease of development with.net framework. Visual Studio 2005 provides a nice WYSIWYG IDE to aid for faster development. Reusability of code (web controls make it easy) Performance Disadvantages: OS dependent means Windows only.net is a rewrite and introduces risk as with any firstgeneration technology while JSP (J2EE) have proven track record Java, which is better than C# due to market-share Free!

13 .NET market [ Top 1000 Application Servers Survey, August 2006 ]