NYCPHP Meetup

NYPHP.org

[joomla] Joomla vs Drupal, a coders perspective

Gary Mort garyamort at gmail.com
Fri Jul 30 11:21:59 EDT 2010


I thought since I've been working with Joomla a bit, I'd post some
comparisons from a usability/coding standpoint:

1) Joomla has components.  Components are mini applications which do things.
Drupal has modules. Modules are mini applications which do things.

2) Joomla has modules.  Modules are little blocks of content that are
displayed on the screen, dynamically or statically generated content.
Drupal has blocks.  Blocks are....little blocks of content that are
displayed on the screen, dynamically or statically generated content.

3) Joomla has plugins, plugins respond to "events" in the system.
 Components, modules, and plugins can invoke other plugins, so they can add
their own "events" to the default set of events.
Drupal has "hooks"  Hooks are functions that are invoked based on the end of
the function name.  Modules, blocks, and hooks can invoke other hooks[PHP
when executed has a global array of all functions...in drupal, a "hook"
would have a specific ending name, such as
mycoolcomponent_generate_tracking_hook..... when the "master"
generate_tracking_hook is run, it will search the array of all functions for
other functions that end in generate_tracking_hook and it will call them]

4) Joomla has templates used to designate display style.
Drupal has themes used to designate display style.

Joomla has a single template system....one template is active and used for
display.  Drupal uses a multiple theme system, every theme gets a
ranking/score and when a display view is being called, Drupal will work
through all the themes to determine which one has a view that matches and
displays it.   Sort of like template overrides, but with more depth[and
themes can be designated as "subthemes" so that they use other themes
automatically.]

5) Joomla has adopted an object oriented style of coding.....  Drupal
follows a function/array oriented style of code*2.  In Joomla you might
have:
$user
$user->type
$user->name
$user = JApplication::getUser($id)

In Drupal you would have
$user[]
$user['type']
$user['name']
$user = application_get_user($id)

6) Joomla does not "eat their own dogfood"...they rely on many external
third party apps for development[JoomlaForge, phpBB, etc]
Drupal does eat their own dogfood.  All their projects are managed using a
Drupal module called Projects, which includes Version Control hooks, issue
tracking, component packaging, API documentation generation, etc

7) Installation/configuration
Joomla has an installer system that most components utilize to
install/configure components by uploading an archive file and letting Joomla
automatically install it.
Drupal requires manually upload and unzip into specific directories....plus
often configuration by editing config files.

8) Upgrade/maintenance
Joomla does not automatic maintenance
Drupal will autmatically check modules, including the core files, against
the latest published ones and even offer you alternatives[ie published
version is X and is installed, beta version X.1 has been released]..  You
can automatically extract and install updates to code.

9) Scheduled tasks
Joomla does not do scheduling
Drupal includes a cron task out of the box

10) Input forms
Joomla has built in functions for generating fields for input*2
Drupal has a rich set of functions to generate complete forms, along with
the ability to override field definitions[for example, it is SIMPLE to
extend Drupal to support HTML5 field definitions by overriding the current
html field generation]

Looking over it all, Joomla has a "cleaner" style of coding to me and is
overall better.  What it does not have is the maturity of drupal. Many many
Joomla components re-invent their own "plugin" system because they do not
know that they can merely extend the Joomla plugin system to do the same
thing.  Joomla's API documentation is produced manually
occasionally....Drupal's is produced automatically every night from the
current codebase.    Joomla's developer docs are scattered in 3 or 4
different places, plus finding docs for different versions is a pain.
 Drupal not only maintains documentation automatically, you can easily
browse documentation by version[4, 5, 6, 7] and when viewing documentation
you will see what versions of Drupal that doc applies to.

Drupal is a much richer, mature environment.  Where it fails is that to make
minor modifcations[add some blocks to the screen] really require a web
implementor to do.  Wheras in Joomla, clients can easily add and configure
new modules to the screen[on the website I setup for fundraising for my
brothers memorial.....his niece who is not a computer person was able to
download, install, configure and publish a fundraising tracking thermometer
with the only help from me being "here is a link to one you can use"....  on
Drupal?  Not a chance...]

I prefer empowering the users[ok, honestly I prefer not getting called to
implement crap like the thermometer], so I prefer Joomla.  But I see a lot
in Drupal that Joomla should be learning from.

*1: Drupal 7 is migrating to object orientation in many ways
*2: Joomla 1.6 adds a rich Form API...which ironically seems to be
struggling from the fact that rather than reviewing how Drupal does things
and avoiding pitfalls already encountered and worked around in Drupal
someone decided to roll it himself and is making many mistakes that Drupal
already dealt with
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/joomla/attachments/20100730/00bf48ab/attachment.html>


More information about the Joomla mailing list