Object Oriented Programming (OOP) without classes C++, JAVA, PHP and Drupal. OOP’s Power in Drupal, an Open source application for content management system (CMS) and using Oriented Programming features without classes.
As all the OOP languages use CLASS or similar data structures for Object Oriented Programming, we have considered that without a "CLASS", OOP is not possible.
Object oriented programming (OOP) is quickly taking place over the traditional procedure oriented programming (POP). Programming languages like C# and Java are successful because of OOPs Power.
After gone through the code of "Drupal" - One of the most popular open sources content management system and framework built with PHP language, summary is - Drupal doesn’t use a single Class in its code base. Whole Drupal code base is based on just functions. As PHP, with which programming language Drupal itself is built, is also implementing many powerful OPP features, but Drupal is not using these features.
Actually, the OOP concept is not based on uses of data structures like CLASS. It is based on the fundamentals of features like Objects, Abstraction, Encapsulation, Polymorphism, Inheritance etc. If these fundamental features are included in programming then it can be considered in OOP.
There is no keyword 'class' in Drupal code. Drupal is as non-OOP as many programmers do. But that is not true. Drupal doesn’t contain any class like data structure; still it is still Object Oriented.
Drupal covers all these features without classes. Power of Drupal is hardly depends on this programming structure only. The way, how the hook system has been implemented in Drupal would never been possible with the use of Classes.
See more details about how Drupal implements Object Oriented Programming (OOP) without using Classes, visit: http://api.drupal.org
See More Articles: - http://www.offshoresoftwaredevelopmentindia.com/blog
Source
No comments:
Post a Comment