No Good Deed Goes Unpunished

Bob, first of all, glad to hear your son Channing is doing well. It was a shock to read about Chase a year ago. It doesn’t seem that long at all!
Unfortunately I have to disagree with your arguement against Open Source.
When a project is successful it’s used by people and the maintainers are hopefully motivated to work at it. Even if the project developers lose interest in a project sometimes those projects are taken up by others. The author of b2 disappeared off the Internet (he’s back, sort of now!) and now there’s several branches of b2, including this website, all with enhanced features.
If a project stagnates and isn’t maintained, it’s usually because people aren’t using it. There are many exceptions of course, and some popular tools go unmaintained, but what happens when a company goes bust? What happens when the company won’t support your old version of the software? At least you, or your development team has access to the source of the open source project.

I don’t believe Microsoft can easily subvert OSS projects by simply pumping money into them and leading them off in a tangent. People will notice.
You cite the Apache project. The new Apache 2 has been out for quite a while. How many complex sites are using it? It doesn’t have much support from 3rd party developers. So much for the mighty influence of IBM.
Where’s Ximian now? What have they done in the Gnome world to lead that desktop environment?
They might have a chance if they got a controlling role in Red Hat or some other major Linux distributor, but even then there’s too many people. Alan Cox is quite independent of Red Hat even though they pay his salary.
Open Source will be around for a long time I’m glad to say!

Template Engines

Here’s an interesting article, Template Engines from the author of bTemplate.

In short, the point of template engines should be to separate your business logic from your presentation logic, not separate your PHP code from your HTML code.

That’s the short definition of what a template should do. I think it should also:

  1. Provide application and server security. It could be argued that PHP safe_mode provides a level of security against third-party code.
  2. Make it simple to maintain the template.

In my experience, Smarty syntax is clearer in a html template. Mixing php and html grates on my brain but obviously it’s a subjective matter that many people are happy with.
Nevertheless, if you’re sitting on the fence about using templates, read the above article. See what the author does in his examples, and make up your own mind if they’re useful or not. You might find yourself using Smarty afterwards anyway!

b2 plugin support

On the b2 forums there are plenty of hacks and enhancements to b2. While there are guidelines to writing hacks they’re informal, and many hacks rely on changing existing code.
I’m using the Smarty plugins support to provide a consistent and documented way of writing plugins.
I created a simple “googleit” function already. It’s integrated into the post.tpl template of this blog and provides the “Search” link you see below.
Using Smarty plugins is easy. You create your function, call it a predictable name (smarty_function_name() where name is “googleit” for example), put it into a file and drop that file into the plugins directory.

The usual advantage of using Smarty caching applies here too. Once it’s cached the plugin isn’t loaded again until it’s called so you can drop as many plugins as you like into the plugin directory without suffering any speed loss!