| View previous topic :: View next topic |
Jenniferlinn
Joined: 24 Dec 2008 Posts: 23 Location: UK
|
Posted: Fri Jan 02, 2009 12:28 pm Post subject: PHP vs ASP vs ASP.NET |
|
|
|
PHP - Hypertext Pre-processor
PHP is an open source server-side scripting language that is very similar in syntax to C languages. Although originally designed to run under Linux using the Apache Web server, it has been ported to work using virtually every operating system and any standards-compliant Web server software. From this it can be derived three of the primary advantages of PHP. Firstly, it is a cross platform technology and consequently PHP applications can be very portable - depending, of course, upon any additional components they are built to incorporate, such as vendor specific databases etc. This portability incurs an additional benefit by virtue of the fact that most Web hosting providers support PHP, making it fairly easy to change hosts if necessary.
Secondly, because PHP bears so much resemblance to C programming languages, it is very easily picked up by developers familiar with this syntax - one that is shared by Java, JavaScript and Perl, amongst others. Thirdly, being open source, PHP is constantly evolving and, more importantly, bug fixes are being regularly implemented to the core libraries, which are freely available.
In addition to these benefits, there are certain programming requirements that may make PHP an appealing choice for developers. Firstly, there are built-in libraries for the direct creation and manipulation of image and PDF documents. This means, for example, that if an application calls for dynamically-created menu images with anti-aliased text, or the exporting of pages to Acrobat format, PHP may be the ideal technology to do it. Although these features are theoretically available to competing technologies, they usually require the installation of third party custom components to do so.
Another situation that may make PHP the best choice of server scripting is where connecting to either mySQL or Postgres databases is required. Although mySQL and Postgres are available to ASP via an ODBC connection, this usually needs to be configured externally by the system administrator. Fortunately, this limitation has been overcome in ASP.NET, where a mySQL data provider is available for direct database connections akin to that used by MS SQL Server.
ASP - Active Server Pages
Microsoft introduced ASP with Windows NT Server 4 as the convention for dynamic Web applications running under their IIS Web server. Because it utilised VBScript, which is itself a variation of the Visual Basic language, ASP was immediately accessible to developers familiar with programming in the Microsoft IDE - Visual Studio. While the scripting language has evolved over time, not much has introduced into ASP to bring it into line with competing technologies. Consequently, there is no integrated support for features like image manipulation as found in PHP. The opportunity is there, however, to extend ASP by writing (or installing) third party COM objects in the form of DLL files. These can be written to perform any action the server itself is capable of doing. The down side, of course, is that this involves interaction with the desktop in order to configure these services - a feature not always available to Web developers.
The upside to ASP is that Microsoft servers are almost ubiquitous in the corporate environment. Additionally, MS SQL Server is also very widely used and, not surprisingly, is well supported in ASP. Although virtually any data source can be made available via ODBC, SQL Server and file DSN access is available at the code level.
ASP.NET
The debate over whether to use ASP or PHP is slowly becoming redundant as .NET builds in momentum. Instead, the predominant argument in years to come will be over whether to use Java or .NET technologies (or both!). The only link between ASP and ASP.NET, really, is that they both use VBScript. Or, in the case of .NET, it can use VBScript - as well as about 20 other languages!
The reason why ASP.NET is in another league to ASP and PHP is that it operates on an entirely different architectural structure. The latter are interpreted scripting languages whereas .NET is a compiled framework. This means, firstly, that Web pages run much, much faster. It also means that source code is safer and more robust. Additionally, ASP.NET introduces a new concept in Web programming - the notion of code-behind pages. With code-behind, each page of HTML is driven by its own compiled programmatical directives. Consequently, the HTML - or presentation layer - is largely separated from the business logic of the application. Although this sort of separation can be achieved in PHP and ASP, it is not an integral part of the technology, as it is in ASP.NET.
Other benefits of ASP.NET are its full-featured integrated support for XML and Web services. There is also a very comprehensive range of security and cryptography libraries available to .NET, making it especially useful for ecommerce and enterprise data applications. On the downside, though, even the experienced programmer can find working with .NET confusing. Irrespective of one's familiarity with the programming language(s) used, the shift in paradigm for the Web developer can be a major stumbling block in ASP.NET. Hosting can also be an issue for ASP.NET applications, as it is not as widely supported by hosting providers as ASP or PHP - and definitely not at competitive rates. _________________ UK Calling Cards |
|
| Back to top |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|