A glance at PHP Frameworks

FURTHER UPDATE:
Yii doesn't have REST support, going to check out (get it?) Symfony tonight.

UPDATE:
Looks like the documentation for Yii was written in latex! I am intrigued... Wow, I haven't posted for a while. I've been looking at PHP frameworks for work. Here's a summary of my thoughts so far – early days so not a lot of depth to this:

Recess

It's RESTful. It's also dead.

Symfony

Could be ok. Seems big and bloated. It's definitely not dead and is a real contender to Zend Framework. Can't find anything about it being RESTful.

Zend Framework

It's not dead but it should be. Horrible. If Zend weren't behind this I think people would vote with their feet and walk (or perhaps run) away.

Solar

I first looked at this years ago. I liked how light it felt. It's still in development so I will spend some time looking at it again, however it might be too light and it does rely on a PEAR library (DB_Table – not updated since 2008) which makes me want to run away screaming.

Akelos 2

A unashamed Ruby on Rails port (not sure this is a good thing – why don't I just use Ruby on Rails?). To be released first quarter 2010.

Konstrukt

It's minimalist. It's RESTful. There seems to have been recent development. I will definitely look more closely at this.

Lithium

Based on CakePHP, and only runs on 5.3. Only at version 0.2 so it's not really ready to go. However there is definitely recent work on it, so it might be good in the future.

Yii

It's got a full stack, has recently released version 1.1.0, and claims to be good for high performance sites. Probably worth looking at but it doesn't get me particularly excited.

Adventure PHP Framework!

What a name. I added the exclamation mark in the title as it seems appropriate. I guess I better look into this one as it's still alive, but the whacky-tobaccy feel is putting me off.

Kohana

Lightweight which always piques my interest, but seems to be long dead.

Habari profile hotkey shortcut

I've added a ticket and a patch file to add an admin menu hotkey for a "normal" user (who can 'manage_self' but can't 'manage_users') to access their profile page.

The shortcut key is 'P', unless the user can 'manage_plugins' or 'manage_plugins_config' in which case the shortcut key is 'R' (to avoid conflict with the existing shortcut key for plugins of 'P').

It will be interesting to see what the response to this is. I also mentioned it on habari dev but so far only arthus has replied. He suggested a profile hotkey shortcut for all users, including admin. Perhaps this is a better way to go, and sticking to a consistent key ('R'? 'P' is taken...) no matter who the user...however I like the idea of using the key 'P' for a "normal" user who is never going to have admin privileges and will only ever be able to edit their own profile.

Notify All plugin

I've finished my second plugin, Notify All. I've left the owner as Habari Community as I built it from Comment Notifier.

I've released it at 0.9 because I've removed some functionality that wasn't logical.

Originally I had a plugin configuration option "send_help_email", and with this a "help_email" (address) configuration option. So the admin has the choice of whether a help email is sent to the existing users, and new users, to explain that they will receive email notifications, and they can turn this off in their profile page. However, this is only sent if the admin has allowed the user to have control over whether they receive email notifications.

It sounds good but there are logic problems. This is what happens:
  1. Admin activates the plugin. On activation, all users can control whether they receive email notifications.
  2. Plugin sends help email to all existing users.
  3. Admin then immediately switches off users' control over email notifications.

So existing users get an email saying they can change the notification settings in their profile, but actually they can't.

This is also a problem if later the admin turns off users' control over email notifications, but it's worse in the situation above. I have to think about when, in the code, I should attempt to send the help emails for existing users (it's not really a problem for new users). Anyway, I'll probably save this for version 1.0 or 1.1.

The other functionality I want to add is setting whether to send HTML or plain text emails. Right now it's plain text, but to get the body of the post or comment in the email, I've had to use PHP's strip_tags to remove all HTML tags (probably only going to be in posts, but they certainly can turn up in comments too). I'll add this for version 1.0.

Where I am using this plugin there have been problems with the emails - they were turning up on the mail client with the headers and content all displayed in the email. This is using Microsoft Exchange Server. The culprit (maybe?) seems to be the headers I've added:

"MIME-Version" => "1.0"
"Content-type" => "text/plain; charset=utf-8"
"Content-Transfer-Encoding" => "8bit"

My initial work around was to remove these headers and send only the From header.

[Update: I can see what the problem is now. Each line of the email being sent from habari/PHP (including the headers) is being sent as having TWO line breaks (so a line of text, then an empty line). Explanation and solution (use PHP_EOL instead of \r\n to separate headers) at the bottom of this page.]

Bumping plugin for Habari

Finally finished my first habari plugin, bumping. Michael (twofish) helped me polish it. It was a slog at the start as I ended up following a habari request line by line through the core code. I read a lot of core code before I worked out what was going on. The whole hook/sink thing, which I hadn't really encountered too much before in my programming, took a little while to understand, although it is a fairly simple concept. The documentation didn't really make it seem simple.

Anyway, it certainly was very worthwhile going through the code, so I'm not complaining, and I've found developing with habari much easier with my second plugin.

Vim as IDE

I have been configuring vim to have the same functionality that a typical IDE has...so I never have to use anything except vim again. Also to be able to demonstrate the IDE-like functionality to anyone who rolls their eyes when I say I only want to use vim (oh if only habari had a vim plugin for writing posts!). These are the ways I have updated vim:
  • snipmate
  • nerdtree
  • exuberant ctags
  • clever word completion
  • phpdocumentor
  • phpcodesniffer (sort of)
  • pretty good colour layout for terminal
  • php manuals
  • CVS/svn commands
  • even xdebug although it's whacky and i don't think i'd actually use it
← Previous  1 2 3 4 5 … 10 Next →

About

User

Remember me on this computer?