ASP06presentation

advertisement
ASP & .NET
Microsoft's Solution for Dynamic Web
Development
Mohammad Ali Choudhry
Milad Armeen
Husain Zeerapurwala
Campbell Ma
Seul Kee Yoon
Introduction
●
ASP - Active Server Pages
●
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 2000. Succeeded by
.NET Framework in Jan 2002
Sample Code
<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 was difficult.
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 Windows
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.
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.
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.
●
Even though ASP.NET takes its name from Microsoft's old web
development technology, ASP, the two differ significantly. Microsoft has
completely rebuilt ASP.NET, based on the Common Language Runtime
(CLR) shared by all Microsoft .NET applications.
●
Programmers can write ASP.NET code using any of the different
programming languages supported by the .NET Framework, usually C#,
Visual Basic.NET, or JScript .NET, but also including open-source languages
such as Perl and Python. 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.
●
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.
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.
• ASP .NET Controls: Object Oriented input controls and
new data grid control.
• Event Aware Controls: Expose events processed by
ASP .NET. Example: Load, Click and Change events.
ASP.NET vs ASP
• Components: NGWS framework stores all metabase and
configuration information in XML files.
• Configuration: ASP+ can be configured with plain text.
Files can be uploaded while the application is running
• Deployment: No need to restart server. ASP .NET simply
redirects all new requests to the new code.
• 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.
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
.NET versus open source
alternative 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
ASP.NET versus 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?
.NET market
[ Top 1000 Application Servers Survey, August 2006 ]
Download