Post Archives
Archive for the ‘ASP.NET’ Category

PHP for ASP.NET Developers

January 2nd, 2011 1 comment

ASP.NET is very nice to use for developing web applications but also comes with a few cons.  The biggest drawbacks of ASP.NET (including ASP.NET MVC) are that it’s more expensive to host than PHP (and you can’t use certain programming concepts if you want to host on shared servers because they require full trust) and you pretty much need to use Visual Studio to do the development (although you could use the Express edition if you’re doing something basic).

Because of these drawbacks some people (like myself) have looked at other options (of which PHP is one).  In the recent years PHP has matured into a pretty decent OO programming language, but raw PHP is still very low level and doesn’t give you much guidance or have much of a framework for implementing your applications.  This of course requires you to be far more skilled in PHP and application architecture in general and would take much more time.  Having a good IDE is also improtant for productivity.

Luckily there is a very nice solution to this problem.

  1. Use an IDE – There are two mature (and FREE) IDEs you can use to develop PHP.  They are Eclipse PDT and NetBeans.  NetBeans kind of comes with everything there (e.g. SVN and Mercurial support), but I still find that Eclipse PDT is the better option, especially if you’re doing much deployment via FTP (with the Aptana Plug-In).  Eclipse PDT also has much better SVN support than NetBeans when you add the Subclipse or Subversive plugins.
  2. Use a PHP Framework – There are far too many PHP frameworks around, and sadly most are not up to scratch or what one would be used to coming from the ASP.NET environment.  However, there are two awesome frameworks which have a good combination of performance, good architecture and are most similar to ASP.NET.  They are Yii Framework and Zend Framework.  Yii Framework seems to have borrowed may concepts from ASP.NET and is an absolute pleasure to use.  It even solves problems which are still a bit of a pain in ASP.NET (e.g. paging in lists).  It is also significantly faster than Zend Framework and hence is my preferred choice.  Zend Framework is more feature rich than Yii Framework, but it has a degree of complexity and doesn’t perform all that well in shared hosting environments.  If you want to use some Zend Framework features with Yii you can easily do so, so you can get the best of both worlds.

That’s pretty much it… By combining those two concepts you can do pretty much the same thing in PHP as you can in ASP.NET without the associated expense.

Categories: ASP.NET, PHP Tags: