Posted in May 2007

New PHP trends

As a web language PHP is without a doubt is the most popular server language that is in the use. As PHP.net statistics shows by April, 2007 there have been 20,016,421 domains using PHP for their web sites. So you can get a brief idea how popular the language has become.

History

PHP was founded in 1995 by Rasmus Lerdorf, because he needed to build a tool that would track the access to his web page. He used C to create his tools and then he released his tools to open source community under the name PHP/FI (PHP Form Interpreter).

In the first release it had many syntax similarities with Perl and in 1997 PHP 2 was released with some new features. In 1998 PHP 3 was released with many flexible features in it. And even in that stage it’s said to have occupied 10% of web servers.

PHP 4 came in year 2000 and it brought a new look to PHP language. A new object oriented look which I think resulted in initiating many new web trends such as CMS and Frameworks. It also had many new features such as new session features which helped coding with PHP. In 2004, PHP 5 was released with enhanced OOP abilities which gave PHP the strength to compete with any other web language. Unfortunately it seems that most of the web products already had a good based in PHP 4 when PHP 5 came and even now most of the products and web services are using PHP 4 as standard without using the enhanced features in PHP 5.

Some of the new OOP features in PHP 5 are listed here.

  • Abstract classes
  • Final Keyword
  • Constant Keyword
  • try, catch…throw syntax in error handling
  • HTTP_*_VARS are depricated

So if you are a Java or C++ programmer no doubt you will see this is lot familiar. And with that it goes without saying that PHP is a lot tougher language than it sounds.

Evolving world of PHP

I am really glad about the moment I chose to use PHP as my primary web language when I think back. It’s not only because of advanced features of PHP 4 or 5. It’s because of the rapidly evolving community around PHP. Apache the most popular server, and PHP goes hand in hand giving all the functionality a programmer would need in web world without any waste of money. And there’re more than enough tools for a PHP programmer to use, from basic PHP modules to advanced CMS or frameworks. I’ve used ASP.net also for some time, but I can safely say I didn’t get that homely feeling around ASP.net as I had in PHP.

Lately I have started to work with PHP frameworks, mainly cakePHP and CodeIgniter. These frameworks seem to have taken after the steps of Ruby on Rails and still have the space to develop. But it’s very enjoyable to work with them, especially with cakePHP as I have been using it now for some time.

As an example, to access a database and get all data in a table with cakePHP you only need this sentence.
$this->Module->findAll() ;
So you can understand how cool it is to work with cake.

I’m hoping to post my experiences with cakePHP in another post and some tips I found when working with cakePHP.

SoC Preparations

My Hackergotchi

About 3 weeks after the acceptance into my SoC project I thought of putting a note saying what’s going on with the project.

Actually there’s a fair amount of work going on with SoC already. Even though we are not to start coding until May 28, there are things that have to be done before coding starts.

We have been given extra 2 months ahead of coding in order to better preparing for the project and get to know the community. It’s really good to have some time to understand ethics, ways and workings of new environment. that we are working with in next 3 months and may be for quite some time after that. So most of the organizations seem to using this extra time wisely and getting to know about their SoC students and making them comfortable with the community.

Talking about Gnome, it’s really great to work with them. Gnome got 29 projects selected for this year SoC and they are giving a great support to their students. After getting selected first thing I did was chat with my mentor and other guy who will be doing the other part of the project. ( Since the scope of this project seemed too long for SoC time line, Gnome divided the work load into two, thereby giving me most of GUI and may be some widget works and giving Phenatic most of inner works such as subversion integration, adding functions to send patches, more widgets.etc). So we had a sort of group discussion with 4 of us(Me, my mentor, Phenatic and his mentor) in IRC. Then I subscribed to Gnome SoC and Developer mailing lists. Gnome-soc mailing list is the place where all the Gnome SoC students can express their problems, progress in their projects and also can be used as a meeting place. After that I sent my blog and Hackergotchi to Gnome and hope it’ll be integrated into Planet Gnome soon. Yeah, above is my Hackergotchi ( I know it seems funny). And if any one interested in the FoieGras project you can reach us through IRC, gimp.net #doc or #gnome chanels.

I also requested for a new SVN account in Gnome because it’ll make my works easier to have a separate account when doing the coding. There are some strict policies into getting a new account in Gnome and they seem to take security of the accounts very seriously and I agree with that. And also we have to give a sort of a report of what we have done in every week to Gnome starting from this Monday. Yeah, Gnome is taking a head start into the SoC projects and I think it’s a good thing, to keep in touch and correct mistakes ASAP before being too late.

And finally, in personal matters I’ve been doing some python and working with pyGTK which will be used to do the GUI parts of the project. And also I bought a wireless router so I can completely move into Ubuntu. (By the way, if you haven’t tested Fiesty, it has some good features, give it a try.). Hmm, Eventful days these are with nearing the start of SoC projects.