Object Oriented Programming with PHP

The term object-oriented involves thinking about processes as entities; in other words, the way we think about day-to-day objects. Object oriented programming is widespread today, and many universities teach object-oriented programming in beginning programming classes. Currently, Java and C++ are the most prevalent languages used for object-oriented programming. Object-oriented programming is not just a matter of using different syntax. It’s a different way of analyzing programming problems. In object-oriented programming, the elements of a program are objects. The objects represent the elements of the problem your program is meant to solve. Object-oriented programming developed new concepts and new terminology to represent those concepts.

But what about OOP in web scripts like PHP? Web scripts typically execute quickly and then go away. So you may think do we really need OOP concept in the web scripting? PHP wasn’t developed as an object oriented language. PHP began life as a simple set of scripts. However, PHP couldn’t be left untouched by this growing global phenomenon of OOP and its numerous advantages forced it to be reckoned by the language. Over the course of its life, PHP has evolved, more and more object-oriented features. First, you could define classes, but there were no constructors. Then, constructors appeared, but there were no destructors. Slowly but surely, as more people began to push the limits of PHP's syntax additional features were added to satisfy the demand. Object oriented programming became possible with PHP 4. With the introduction of PHP 5, the PHP developers have really beefed up the object-oriented features of PHP, resulting in both more speed and added features. Much of this improvement is invisible — changes introduced with the Zend 2 engine that powers PHP 5, that make scripts using objects run much faster and more efficiently than they did in PHP 4. PHP typically has a less thoroughgoing implementation of OOP than languages like c++, java, etc. There are still some concepts missing as function overloading and multiple inheritances.

OOP concept has really changed the way we used to program in PHP. Because of OOP, the code redundancy has been greatly reduced and using this technique we are able to make simple programs on the fly. This concept has helped to develop and maintain large scale projects easily. Features like inheritance, encapsulation and abstractions have helped speed up the development process of products using PHP. As of PHP5, it supports single inheritance, constructors and destructors, encapsulations, static functions, object interface, etc. So, OOP is certainly developing as an integral part of PHP programming.

Pdf version of the Django book

Pdf version of online Django book

If you prefer the pdf format to html then download the pdf format of the django book here:

The book is actually compiled from the content available in the Djangobook.com

What is Django and why I love it?

Django is the High level python Web framework for the rapid web development. Django is based on the MVC ie Model View Controller (actually the developer of the Django calls it MTV ie Model Template View).

While Ruby on Rails(ROR) was the subject of the discussion among the web developers, Django was developed to make the web development easy with the power of the python. The framework is highly inspired by the features of the Ruby on Rails, but it should be mentioned that it’s not the port of the ROR for python. Django has its own descent architecture and design. As per my experience Django is more Productive and scalable than the RoR. So its true for me too that if ruby is on rails then the Python is on jet. An excellent comparison between the Django and Rails in terms of the performance is available at wiki.rubyonrails.org/rails/pages/Framework+Performance. The best part of the Django is its well maintained site www.Djangoproject.com. This site provides lots of the information about the web development with Django.

An up-to-date list of dozens of sites that use Django is located at code.Djangoproject.com/wiki/DjangoPoweredSites.

Visit the link below for the short but excellent introduction of the Django http://www.ibm.com/developerworks/linux/library/l-Django/?ca=dgr-btw01DjangoAndPython

If you find this stuff useful then don’t forget to digg this post so that it is easily available for others too.