ASP.NET or LAMP for Web Development?

This was inspired by a form post over in startupping, where people were discussing doing projects in ASP.NET or PHP (specifically, LAMP: Linux, Apache, MySQL, and PHP).

I do both ASP.NET (.NET 2.0, C#, SQL Server) & PHP development (LAMP). PHP is pretty easy to pick up (especially if you”ve programmed in classic ASP), and there”s a lot of information, libraries, etc. out for it. For an IDE you could use Zend Studio ($99-$300), PHP Designer ($50 ), or free ones like SciTE or PSPad (both are good).

If you just want to try out some PHP development, I”d suggest getting a cheap hosting account from GoDaddy, Dreamhost, or somewhere else. Or even e-rice.net ($10/year). While you could install Linux locally & play around with shell access & administering Linux, Apache, MySQL, and PHP, you could end up spending a lot of time being a Linux sysadmin — time that you could have instead spent strengthening your PHP & MySQL skills. One step up from a cheap hosting account would be to run LAMP as a virtual machine by downloading the free VM player and ready-to-go LAMP packages.

Once you get beyond coding some basic stuff, you may want to look into better PHP frameworks to help accelerate your development. I like Code Igniter, but here”s a list of other frameworks you can read about.

FWIW, I develop in both environments b/c I have a range of clients & projects w/ different needs. One of my current projects is a site that includes a lot of features (social networking, wiki, CMS, data management), but the client wanted to leverage existing open source libraries & avoid building everything from scratch. So LAMP was a natural way to go. Other clients are Microsoft shops, so they want .NET apps built that their existing IT staff can take over.

Like any project, I think deciding on a technology involves many factors — how skilled are you in it? Do you want to learn a new technology? What does the technology cost? Are there things about this technology (language features, environmental features, pre-existing libraries & applications) that will help the project to be more successful?

Lastly, if it”s costs that you”re concerned about, IMO Microsoft projects aren”t as expensive online casino as some may think. You don”t need to spend a lot of money on the IDE — there are cheap or free IDEs you can develop in, or (if you qualify) you can enroll in the MS Empower for ISVs program for $375, which gets you an MSDN Universal license w/ OSes & dev tools. The .NET framework is free, and you can run IIS on XP Pro. SQL Server Express is free & has (almost) all the features that you”d be using in SQL Server Workgroup/Standard/Enterprise. I have a client that didn”t have a very large database, so their production site runs on SQL Express.

Also, if you”re using a hosting provider for your site (which you usually should), choosing a Windows OS & SQL Server for your hosting account isn”t usually significantly more expensive than Linux.

Still, obviously LAMP is cheaper (free, unless you pay $$ for a better IDE), and Microsoft costs can add up if you”re looking at big server farms or are buying your OS & SQL Server licenses outright (for some reason). But of course switching frameworks has its own cost in terms of time & mistakes made while learning. If I were building something simple from the ground up, I might just choose the platform I was strongest in.

0