Thursday, July 12, 2007

Object oriented programming (OOP) without classes…!!!

Nowadays, object oriented programming (OOP) is quickly taking place over the traditional procedure oriented programming (POP). Success of the modern programming languages like C# and Java is obviously because of OOPs Power.

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.

With the same idea in my mind, I’d briefly gone through the code base of “Drupal” - One of the most popular open source content management system and framework built with PHP language. I often read and heard many praise about the power of Drupal, but after the first look at the code base, I amazed that Drupal doesn’t use a single Class in it’s 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, I could not understand why Drupal is not using these features!

As I’d not seen the keyword ‘class’ in Drupal code base, I evaluated Drupal as non-OOP as many programmers do. And that was my mistake! Even though, Drupal doesn’t contain any class like data structure, it is still Object Oriented. I realized this fact after details study of Drupal.

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.

Drupal covers all these features without classes. I also realized that the 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/api/HEAD/file/developer/topics/oop.html

Wednesday, July 11, 2007

A Good Themes For drupal

Abac

Theme for Drupal 5.x., CSS-based (tableless), two column layout, big place for logo (banner) 215x165px, the footer ("contacts") is placed under title.

Author: garamond.

VersionDateLinks
5.x-1.42007-Mar-19

Aberdeen

A fresh design that balances simplicity, soft, neutral background colors, plenty of whitespace and big nice typography.

List of features

•Standards-compliant XHTML 1.0 Strict and CSS (No CSS hacks).
•Liquid CSS layout (tableless) - the whole layout increases or decreases proportionally as dimensions are specified in ems. Try changing the font size to see this working.
•Supports one, two and three columns.
••Cross-browser compatible. Works fine in Firefox 2.0 and IE 6.
•Cute icons (all GPL or created by myself).
•Coded with SEO in mind, the order of the columns are 2dn, 3rd and 1st - usually the 1st is intended for navigation, the other two for content, Google likes that.
•Slinding doors tabs for primary links that blend with main content area.

VersionDateLinks
5.x-1.72007-Mar-12