Saturday, August 6, 2011

What i love about PHP



 First of all i must say im relatively new to the whole PHP scene. Coming from an OOP background with mostly Java/C++ experience i must say the transition was not rough as i expected it to be. Unfortunately i have not been able to code in PHP at an industrial level but use it for many of my freelance projects which has been very productive up to now. So i would love to highlight why i love PHP and why i think others who aren't using it yet, should give it a try.

  • WAMP
                WAMP is one of the best bundled package i have seen. Right out of the box you got yourself an Apache server, mysql database and PHP core. So within a matter of minutes you are ready to write some productive code without having to deal with environment setup issues. And you have a wide variety of bundled packages to chose from which fits you needs. Need a mysql client to go through the database? No need of installing another sql client. Just type http://localhost/phpmyadmin/ and your ready to create your database schemas.

  • Its Interpreted
               All java folks know how much of a pain it is to compile your project if you are working on a large scale application. You just do a small change and stare at your command line as Maven or Ant destroys 2-5 minutes on average of your precious time. Im not emphasizing on build related problems here but the truth of the fact is there is no matter what, you do waste a portion of your time compiling code. Whats great about PHP is the fact that it is interpreted.  You just do a change, go to your browser and refresh. Thats it. Saved me a ton of time in many of my freelance projects.

              Ofcourse there are PHP compilers if anyone ever needs it. Some say it increases the performance but i have personally not been able to try it. Facebook has written a nice tool that converts PHP code to C code called HipHop.

             The information presented in this site is just out of this world. Anything and everything you will ever need when working with PHP is here so there is no hassle what so ever. When i need a function i just search it up here and the community has been very active with various people suggesting better ways of calling various functions which has been very helpful to me.

  • No need of a special IDE
             Myself and many i know just use Notepad++ for our coding with PHP.  Its just easy to use and switch between different source files. I dont think anyone ever needs an IDE when coding in PHP though there are some very useful IDEs out there as listed here.

            From PHP 5 they supported classes, object creation, constructors and the whole deal. This feature made it very easy for me in the transition phase from java to php. It was more or less a seamless transition.

  • Plethora of frameworks to choose 
           You got Zend, cake php, symphony and so many more frameworks. Its just amazing. If one does not fit your need you just move to the next one and try it out. The learning curve is also not that steep as well. The MVC architecture introduced by these frameworks make you feel at home when coming from a struts background as myself. And the DAO layer separation introduced in some frameworks is also a huge plus point for me.

Im just starting out with PHP and i believe more will be added to this list as time goes on. If any PHP pros can share their opinion on why you love the language it is highly appreciated.

Cheers Guys!!!!


4 comments:

  1. Let's not forget about the awesome community surrounding PHP. :)

    ReplyDelete
  2. @Anthony:

    Yup true that :) . I have mentioned about the community as well in the php.net heading. The community is very active which is a true inspiration to work with the language.

    ReplyDelete
  3. Some good points there Dinuka. A lot of people opt for it because it's so quick and cheap to set up in the real-world. LAMP shared-hosting is very affordable and works out of the box. You have to splash out a lot more for a Java or .net host. This makes LAMP a great option for those wishing to dabble with the language and just start small and build up.

    Also, I'd recommend CodeIgniter as a very efficient PHP framework. It's lightweight compared to Cake and Zend, but not everyone needs all the heavy functionality they offer, and can therefore opt to get some performance back.

    ReplyDelete
  4. @Andy,
    Thx alot for your views. I did not know about coeigniter but definitely will check it out soon. Lighweight options are what i opt for :). Thx again for taking the time to leave by a comment Andy.

    Cheers

    ReplyDelete