Building a Web Form in ASP.NET and PHP: a Comparison
(Page 1 of 4 )
While there are important differences between PHP and ASP.NET, both are used to build websites. Because of this, both need to enable developers to build web forms, among other tasks. This article compares building a web form in PHP with building the same form in ASP.NET to help those familiar with one set of tools to learn how to use the other set.
Let me get one thing straight: ASP.NET is a framework or platform, while PHP is a server side scripting language. Therefore, one cannot compare ASP.NET to PHP directly. However, since ASP.NET is a server-side web technology, it employs server-side scripting languages too, like PHP. The most common server-side languages used in ASP.NET are Visual Basic.NET and C#.
You can find a lot of PHP developers -- more than ASP.NET developers (in 2009-2010), in fact. There are many reasons why this is the case. This article is purposely written as an introductory tutorial for those that have already learned how to develop websites in PHP and need to learn ASP.NET as well. It might appear easy to create certain web functionality in PHP, but it can be very hard to find an equivalent method in ASP.NET.
If you are ready, let's get started.
Developing Software in ASP.NET
Let's tackle the most important aspect. If you are developing ASP.NET websites, there are certain things you need to have, assuming you've already learned to develop with PHP. First, you need a Windows operating system, such as XP Home with Service Pack 3, Windows 7, XP Professional, etc. Of course, this is simply common sense; since ASP.NET is a Microsoft web technology, you need a Microsoft-based operating system when you start developing applications.
The Microsoft Windows operating system can cost additional money, because you need to purchase a license, and some developers have opted to install an invalid version of Windows in their computer. However, using an invalid Windows installation might have an impact on the .NET framework. If you use an invalid version of Windows, you will not be able to obtain updates for it.
This means that if you are already developing websites in PHP and also plan to become a serious ASP.NET developer, you need a genuine Windows operating system. You'll need to be prepared to spend some cash, because Microsoft software is not open source.
Here's another difference to keep in mind. In PHP, you can run XAMPP as a test server in a LAMPP configuration (Linux -Apache - MySQL and PHP). The good thing about XAMPP is that it will run in both Windows and Linux operating systems. But if you plan to test ASP.NET websites in the local host, you need a full installation of Visual Web Developer Express 2008 (as of 2009- 2010, Microsoft may release a newer version in the future) in your Windows operating system.
Next: Starting with Hello World >>
More ASP.NET Articles
More By Codex-M