drupal core code really "ugly?"

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
z_hyperion's picture

While searching for how to integrate drupal with a "light" webserver called Hiawatha, I find this comment intriguing:

http://www.hiawatha-webserver.org/forum/topic/222

In one of the comments, Hugo Leisink says that he doesn't recommend drupal because of the "ugly" code.
He says "On a simple page that showed a list of 15 items, Drupal needed more that 400 database queries."

I know drupal does these queries so it can do logging and for other status information, but I think you can disable these logging features.

I would like to know, Is there anyway to lower the number of database queries so that you can live off a "simple, speedy" drupal system? :)

Would you recommend drupal for a simple 10-page site, for example?

Anyways, just wanted to share with you guys.

Regards,

Joe

Comments

"Drupal needed more than 400

Jhef.Vicedo's picture

"Drupal needed more than 400 database queries" does not mean Drupal code is ugly. Have you seen how well its code was written? The underlying architecture was really thought of. It has in fact one of the cleanest API out there.

If you just want to build a simple site without considering scaling up, static page might do. Why use a CMS for a less than 10-pages web site? If you just want to blog, there is Wordpress.

But Drupal offers more. It is very flexible you can build anything from it. Why do you think big name companies like Google, Yahoo, Sony uses Drupal? Also a lot of government web sites were built in Drupal like recovery.ph.

I just read some of Leisink's

bitsantos's picture

I just read some of Leisink's gripes with Drupal and you can't really blame him. His complaints aren't exactly unfounded. Performance and scalability are majorly important issues with Drupal. I've been working extensively with Drupal and I have a pretty good idea of how it works under the hood. 400 DB queries to generate a page on Drupal are actually on the average, IMHO. You could get a lot more with a complex page. (MySQL query cache is your friend.)

Admittedly other CMS's (and systems built on some frameworks, or even built from scratch) would definitely be more easily scaled, but once you've understood the limitations of Drupal, and how to work with and around them, I just honestly think that you can't get more power and control from any other popular CMS out there.

As for the code, there are LOTS of places that Drupal could possibly clean up the code, but as Jhef points out, it's not exactly dirty. Inefficient? A lot of the time, it is. DRY brought to the extreme? A bit of that as well. But you'll rarely find the kind of extensive documentation and API elsewhere. Besides, we still have D7 to look forward to if you're not so happy with the code.

@bitsantos? Hope you could

Jhef.Vicedo's picture

@bitsantos?

Hope you could contribute to Drupal core. You sound smart :)

Gosh. blush Hindi naman.

bitsantos's picture

Gosh. blush

Hindi naman. Recent work has just forced me to go deeply into the core code. And regarding contributing to the core, perhaps someday, but for now I'm sure there are a lot of smarter people out there already doing a lot to continuously improve Drupal without me. :-)

[Deleted. Clicked the wrong

bitsantos's picture

[Deleted. Clicked the wrong reply link.]

Philippines

Group organizers

Group categories

Post category

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: