Development

Drupal Themeing, and other projects

November 13th, 2008  |  Published in Consulting, Development, Web/Tech

I’m learning Drupal bit by bit - one of the first tasks was to learn how to make a new theme. It’s one of those things which is actually fairly straightforward-seeming … until you hit a snag. And then it’s opaque.

One thing I learned is that it is incredibly sensitive to typos. One space accidentally inserted between the “<?” and the “php” led to a completely blank page. Ah well. I’m certainly learning what mistakes can lead to what kinds of issues, which is good. Eventually that becomes second nature.

But, in any event, by the end of an hour or so of hacking, I’d turned a template that I found online at Open Web Design into a Drupal template. I felt accomplished! I’m going to do a few more, and see how sophisticated with it I can get.

One thing I ran into (and haven’t been able to solve yet) is that it’s not easy to have navigation that requires more than just the standard <ul><li> tags. Adding <span> tags, for instance (which makes possible some more interesting looking navigation buttons) seems, at least at first, far from trivial.

I’m making a list of little(ish) projects that I want to do - sort of like problems I think I want to know how to solve.

  • Drupal and google docs single sign on. There is already a SSO Module for Drupal 5.x, and someone submitted a patch for it, but it’s still up for review. I’d also have to cough up $50/year to get a google account that has the SSO API, but it might be worth it.
  • Drupal sidebar connecting with the NPR API - perhaps to provide a targeted news stream?
  • Doing a google map mashup of data in Drupal
  • Working with getting flickr photostreams to show in Drupal

I’m still looking for a good project to try out in Cake. Unfortunately, the module Drake, which is meant to be a bridge allowing you to run Cake applications within Drupal, seems moribund. There is only a development snapshot for the 5.x branch, and no one seems to be picking it up for 6.x. Sigh. There is, for sure, another whole blog entry about Drupal modules.

Cake vs. Symfony

November 6th, 2008  |  Published in Development, Software

In my new explorations of PHP web application development, it seemed a good idea to get a look at both CakePHP and Symfony. Both of them seem to be PHP’s answer to Ruby on Rails.

The approaches are similar and different to each other. I set up both on my laptop, and tried out some really simple app development. In Cake, the database build is separate from the application building (you do it yourself), whereas in Symfony, you use Symfony to build the database with schema files written in YAML. Then, you build forms and such using the schema as a foundation.

They both use the MVC pattern, and both use object oriented PHP, which is great. I got a lot further with Cake in one evening of playing with both than I did with Symfony. At this point, I really prefer Cake - it feels like it jives with my own coding sensibilities better. I also don’t like the overhead of learning YAML. I can imagine, though, that the Symfony approach can be powerful.

Looking at Ohloh, Cake is more popular than Symfony (on Ohloh, who knows about in general), but Symfony has a lot more developers (81 vs 17). They both have good documentation and active communities.

For now, unless something strange happens, I’ll settle on Cake - although I’ll not be spending too much time on it, since I’m working hard to grok Drupal. But perhaps a cool project will manifest, and I can use it.

Update: I learned that Yahoo and delicious have a huge investment in Symfony (which, I guess, might be why they have so many more developers.)

Drupal and WYSIWYG editors

October 16th, 2008  |  Published in Consulting, Development, Uncategorized

I think that if I had to pick only one thing that would help people understand the character of Drupal, it would be the WYSIWYG editor that comes standard with an out-of-the-box Drupal installation. That would be NONE. There is no standard WYSIWYG editor that comes with Drupal. You have to figure out how to find one, and install and configure it yourself.

So if you want to start adding content to your new site, and you need a little formatting, or a picture, etc., well, unless you know a bit of HTML, you are S.O.L.

On the other hand, this is actually, from my perspective, a really good thing (can you tell I’m becoming a Drupalista?) There are several to choose from, and they differ both in difficulty to get installed and working, as well as features. Want something barebones? There’s one for you. Want something with all of the bells and whistles? There’s one for you, too.

There is a great review of five of the major ones.

I’ve been getting to know a few of them (and, yes, they can be a pain to install, and they depend, generally, on other libraries that you have to install as well.) I don’t have a favorite yet, but I’m thinking I don’t need to have one - just to know which ones are well-maintained, and what the differences are in feature set. Then I can choose the one that makes the most sense.

The joy of Drupal (and other tales)

October 8th, 2008  |  Published in Consulting, Development, Open Source

I’ve been working with Drupal a fair bit over the last few weeks, with the ultimate goal to basically be able to really work with it to create sites. I converted my (very simple) consulting site to Drupal, without any bells and whistles. I’m working now on a site that needs some bells and whistles, like translated pages and a WYSIWYG editor (ah, the WYSIWYG editor thing in Drupal is going to get its own blog entry, I’m sure).

My next step is to try and create a simple theme (so I understand how theming works,) and write a module (so I understand how modules work.) There are still lots of things that are mysteries to me, but perhaps I’ll learn more at Bay Area Drupal camp this weekend.

I’ve also been digging a lot into the new(ish) social network software Elgg, and beginning to develop a members-only site with it for a client. In my estimation, it’s amazingly promising, as a platform for interesting private sites. And, since it has OpenID (which seems to have bugs, though), OpenDD, and OpenSocial, it’s not such a bad idea for public sites either (although I’d still not suggest that nonprofits spend the time to do this.) Maybe someone will use it to create the Facebook killer (I kind of doubt it, but I can hope, can’t I?)

As well, I’m still honing my WordPress skills, mostly in the realm of dealing with themes and moving the darn things around and upgrading from ancient versions. I’ve done some theme hacking, but haven’t yet written a plugin (I can’t think of one to write that hasn’t been written yet.)

And, on top of all of that, I’m re-writing in PHP some core functions of a web-database/CMS framework I wrote in Perl a gazillion years ago (and still is in use for an application called EASE.) That’s been fun. What’s also fun in retrospect is that the framework (the erstwhile Xina) was written basically using the MVC architectural pattern before I knew it existed!

It feels like I’m beginning to focus on a core set of tools and technologies (PHP, Drupal, WP, Elgg,) and that in a few months, I’ll be up to speaking PHP fluently, like I spoke Perl a while back. And I’m looking forward to getting to work on the kinds of projects that I’ve been watching as a spectator in the last year.