Monday, August 28, 2006

Comparison between web technologies to build web applications

Compiled by Nauman Malik, Suave Solutions, Lahore, Pakistan
Release Date 08/28/2006

Part-1 ASP.net vs. PHP
In this comparison we will consider PHP and ASP.net strengths and weaknesses to build scaleable, maintainable, efficient, secure and easily portable web applications. This is an independent view based on personal research and facts gathered from different sources. This comparison has no concern with any software vendor or company.

Features

ASP.net

PHP

Backward-compatible with previous versions

No backward compatibility with ASP, completely based on new architecture

Compatible with older versions but not fully due to inclusion of new features with respect to OOP in PHP 5

Flexibility to choose programming language

.Net provides application framework compatible with scripting languages like VBScript, JScript, Perlscript, and Python, as well as compiled languages such as VB.net, C#, C, Cobol, Smalltalk, and Lisp

PHP itself is a scripting language with strong string manipulation libraries and other technologies.

Object-oriented programming

Yes

(true inheritance, polymorphism, and encapsulation are supported along with .Net class libraries )

Not a pure OOP language

PHP 5 is still with few shortcomings

Database connectivity

Yes

(ODBC with database abstraction and other proprietary drivers can be used as well)

Yes

(ODBC, Perl’s DBI library and other proprietary drivers available)

Layered Architecture

Yes

Clear separation between presentation and logic, which can be extended to business objects (middle/business layer) to database connectivity frameworks.

Moderate to Weak

Application can be divided into layers but it all depends on coding style and it is flexible for developers to write code as they want even without using the OOP techniques.

Development Environment

Highly Integrated

Integrated development environment with sophisticated debugging.

Good controls available for Rapid Application development.

Ajax support available

Moderately Integrated

Zend Studio by Zend Technologies and other environments.

Number of free code libraries available and produced by individual developers and commercial software vendors.

Efficiency and Speed

Strong to Moderate

ASP.net is expensive with respect to memory usage due to long code paths. Good memory servers can provide efficient access based on the concurrent number of users

Strong

More efficient memory usage and faster execution due to smaller code path.

Libraries are available to provide pre compiled versions of PHP pages.

Licensing Price (Platform)

Not Free

Licensing price for production environments.

Can be solved using host applications on shared or dedicated servers.

Free

No licensing for production environment

Application & Web Servers

IIS 5, IIS 6 and IIS 7

Apache and other commercially available servers

Server Security Concerns

Moderate

IIS with bad record of vulnerability.

Hybrid server approaches available but examples not available on commercial basis

Strong

Apache Server with good track record of security features

Licensing Price (Development)

Free

No licensing required for development

Free

No licensing for development

Cross-platform applicability (Server)

Moderate to Weak

Windows Servers, IIS only, Easy to configure and manage

Strong

On all major platforms

Open Source

No

Yes

Reporting Engines

Strong Compatibility with Crystal Reports and other Reporting Engines.

Freeware and paid libraries available with limited features and support.


Reference

http://www.oracle.com/technology/pub/articles/hull_asp.html
http://www.sitepoint.com/article/php-top-10-net-myths-exposed
http://weblogs.asp.net/bleroy/pages/193608.aspx
http://www.promoteware.com/Module/Article/ArticleView.aspx?id=10 (Good to read)