Categories
Open Source Technology Web Development Wireless

Options for sending & receiving SMS from web applications

One of my projects at the moment is to look at our options for building SMS enabled web applications (specifically for us around our Zend Framework based apps). Both for data capture (Inbound) and as an alerting / notification system (Outbound).

Thought I’d pull together some of my thoughts and reference material [not exhaustive or complete yet] in case its of use to anyone else in a similar situation. But first I’d like to thank my good friend Jem who helped identify some different angles on this…

Research Material:

As always the first place to start is Google and Wikipedia – http://en.wikipedia.org/wiki/SMS and http://en.wikipedia.org/wiki/SMS_gateways

LinkedIn Q&A is a great reference – here are a few relevant threads that I came across (you’ll probably need a Linkedin.com account to get to these) there are lots more if you search around with SMS related keywords.

Implementation Options:

There are 2 main options – and as always its the struggle between D.I.Y and DRY (Don’t Repeat Yourself – or my version DRY-OFF – DRY or others [for f sake? I just wanted it to be OFF as it sounded better; anyway I’ll shut up now!])

Roll your own

The Kannel FAQ covers this point quite well – http://www.kannel.org/faq.shtml#1.2

pros – complete control over messaging and ability to iron out any kinks in connectivity etc, potentially cheaper to run / only costs you what you use (rather than having to buy credits)

cons – more complex to setup in the first place, need to buy & setup some hardware somewhere etc

Useful article on Kannel on Ubuntu with PHP5: http://www.chipmunkninja.com/Setting-up-Configuring-and-Using-13@

Outsourced

Pros – ease of getting it up and running if the integration API (eg HTTP, XML/E-mail based) is easy to pick up

Cons  – my concern around these guys is how do you how good they are – will they disappear tomorrow? What gateways are they using, how reliable are their channels etc.

Guide to Gateways (US focused) but has some nice general considerations) http://www.developershome.com/sms/howToChooseSMSGateway.asp This site also has a really nice comparison table – which you could also use as a template for doing your own matrix/scoring comparisions of these services.

We will probably go with a combination of the 2 options – using our own system for the development of services (as we have greater control) and then making use of a partner once the message volumes go above what is finanically viable/scalable in house…

Once the technical bit is out of the way you then need to consider the usability and process flow around the app – eg if users are sending in data, queuing, acknowledging their submissions, correcting mistakes etc…

Hope to post more on this topic if I get the opportunity! If anyone has any insights or good resources on this topic then by all means please comment on this post!

Thanks

Categories
Linux Open Source Ubuntu

Running Windows via Linux to improve performance (fixing VirtualBox on Ubuntu 9.04)

Screenshot of VirtualBox running XP under Ubuntu
Recently I’ve started using Virtualisation – for those who don’t know this is running an Operating System or OS for short (such as Windows) as an application (so you could think of it as running a computer within a computer). I’ve started doing this as I’ve got frustrated with Windows slowing down after being installed for a few months. This way I can run Linux which is very stable and performs consistantly as the main Operating System (or the “Host”) and then run various “Guest” OS installations – such as Windows. You can take snapshots or save the state of the Guest machines – which is ideal if you want to go back to how your Windows install used to be (but unlike reinstalling all your applications and settings are as they were).

Generally Windows runs at the same speed as it does normally – so long as you don’t run too much stuff on the Host OS at the same time – but of course there are limitation – eg Games or software that needs access to devices that can’t be provided via VirtualBox. And of course you could run the reverse setup – if you fancy trying Linux as a Guest OS but keeping the safety net of Windows as your main Operating System.

Anyway I’m posting this as I’ve been using VirtualBox on Ubuntu Linux to run Windows XP. On a recent upgrade from Ubuntu 8.10 to the latest version 9.04 VirtualBox failed to run. This was fixed by running the command given in the error message (its nice to get a very useful error message in software!)

The command I had to run was sudo /etc/init.d/vboxdrv setup

Once VirtualBox was working again I noticed that the Host key (which is the key used in different combinations to switch between the Host and the Guest OS) was not working. Instead it was flashing the Ubuntu desktop and pulsed some circles – like radar – from the cursor. At first I didn’t twig that it was simply the new mouse settings in the latest version of Ubuntu. By default it now seems the tickbox below in System->Preferences->Mouse for “Show position of pointer when the Control key is pressed” :

Mouse Settings in Ubuntu
Mouse Settings in Ubuntu

Hey presto – the host key works again! Hopefully this is helpful for anyone else confused by this one!

Also note the position of the sliders in the above screenshot for acceleration and sensitivity – I find these settings make the touchpad on my Vaio behave in a similar way to Windows (previously my mouse felt too sluggish).

I’m now actually using Windows less and less now at home (Evolution is a decent email client and of course Firefox offer pretty much the same browsing experience – apart from some differences with fonts, and OpenOffice allows for opening the odd Office attachment). The true acid test though is how much the wife moans as previously she’s never been happy without the familarity of Windows…! (But then it is still available in a couple of clicks).

I’m sure there will be more on my adventures of using Ubuntu on the desktop in due course – if I find time I’ll share anything I think others might find useful…

Categories
Open Source Technology Web Development

Wowed by upgrade to WordPress 2.7…

Have just upgraded to the latest and greatest WordPress and was shocked as it has wowed me again in terms of user interface. The pace of improvement of this Open Source product is incredible. Just as I think wouldn’t it be good if… they’ve done it in the next release (and improved stability / fixed bugs).

They’ve introduced a turbo button which makes use of Google Gears (the offline/browser enchancement) and added more time saving shortcuts and a better post writing interface (particularly for re-using existing tags on new posts – this UI for tagging taxonomy might have to be borrowed on some of my projects…) Read their blog post here for more info on features (includes a video).

Below is the new dashboard – compare the below to WordPress 2.5 that I upgraded to back in May 08

fireshot-capture-5-olivere28099s-yard-ollie-cronke28099s-blog-e280ba-add-new-post-e28094-wordpress-blog_cronky_net_wordpress_wp-admin_post-new_php

The new dashboard is below – it now has dragable “modules”

wordpress_wp-admin

Trouble is it now makes me want to upgrade the design of my blog – but I know I have way more important things to do with my time before I faff with that again!

Categories
Open Source Web Development

Uncovering Alfresco Enterprise Content Management…

Alfresco Logo I came across Alfresco a couple of years ago at the MySQL European Customer conference – at the time they were relatively new and didn’t look that relevant. I’ve kept one eye on them since and have recently had the opportunity at work to look at alternatives to Sharepoint. Alfresco is now looking very, very interesting in this respect.

Alfresco’s features cover:

Its not that often (although admitedly it is now getting more common) you find an Open Source product that is strong on features / usability and is technically strong. The reason I say it is technical strong is due to the way it embraces and leverages Open Standards and Open Source Java components (Such as Hibernate etc – which good PHP frameworks have borrowed heavily from recently).

One of Alfresco’s people writes an interesting blog on the Business/Politics of Open Source: http://news.cnet.com/openroad/

Another Interesting Alfresco blogger is John Newton: http://newton.typepad.com/content/ He has an article on CMIS (Content Management Interoperability Services) which sounds fantastic.

Look forward to learning (and blogging) more about Alfresco if I get the opportunity…

Categories
Open Source PHP Technology Web Development Zend Framework

New Zend/AEA Framework based Intranet deployed @ work

Today we put live the new Intranet at AEA which has been Kat’s major project (should get to spend more time with her now its launched!) with some support from me and impressive efforts from the dev team.

Previously we had a static HTML Intranet which wasn’t really serving the needs of the business as well as it could. The new site is based on the AEA Framework – which I’ve blogged about a bit before. Essentially an extension of the Zend Framework glueing Silverstripe and other 3rd party components together with a single sign on approach (in this case we are also using LDAP to do logins from our current Novell infrastructure). We built on our HTML content crawler tool to hoover in the static HTML into the Content Management System.

Over time we will leverage the framework to create more efficient web 2.0 style business processes and work with PPC to combine it with other off the shelf tools that they specialise in; and hopefully push it globally across the group…

I’ve also had some exciting news this week which I will share when I can.

All exciting stuff!

Categories
Open Source PHP Technology Ubuntu

Installing Zend Core PHP on Ubuntu Linux (8.04)

Warning! Techy post – if your not into Web development you’ll want to skip this one…

I’ve been wanting to try out Zend Core (Zend’s standard PHP stack / extension or “Reliable PHP made easy”) for a while but as Ubuntu isn’t officially supported I’ve held off. A problem with some code running on the Ubuntu version of PHP 5 forced my hand – I discovered that its actually not that hard to get ZC up and running on Ubuntu. Thought I’d share in case this is helpful to anyone…

  1. Download, unpack and run the ./install command as per usual
  2. I opted to stick with the version of Apache already installed (as its slightly newer than the Zend bundled one)
  3. My experience of Zend attempting to configure Apache varied – one some boxes it almost worked, others it didn’t. If you find the installer crashing out just untick the configure Apache option and try again.
  4. Once Zend Core has completed you’ll need to tweak things abit…

PHP5 Module

The ZC installer will have probably left your Apache configured with 2 LoadModule php5_module entries (one in /etc/apache2/apache2.conf – thanks to ZC and the other Ubuntu one in /etc/apache2/mods-enabled/php5.load). So you can either do a sudo a2dismod php5 to remove the Ubuntu one or modify the Ubuntu one to the following:

LoadModule php5_module /usr/local/Zend/Core/modules/apache22/libphp5.so

In fact you can be cunning here by commenting out the Ubuntu PHP5 extension and adding the ZC one in this file – allowing you to effectively switch between the 2 different extensions should you need to.

MySQL extension – if you’re using MySQL then you’ll need to watch out for the fact that the bundled MySQL extensions look for the MySQL socket file in /tmp/mysql.sock rather than the Debian / Ubuntu location which is /var/run/mysqld/mysqld.sock

In most cases changing in php.ini:

mysql.default_socket =
to
mysql.default_socket = /var/run/mysqld/mysqld.sock

Does the trick; but alas not in all cases it seems (eg MySQL PDO). Really hacky fix to this (please do let me know if you have something better – other than editing the socket in the /etc/my.cnf file) is to run a scheduled (using crontab) symlink of /var/run/mysqld/mysql.sock to /tmp/mysql.sock

To do this run: sudo crontab -e
and add the following line:

 5 * * * * ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

And for now that works for me. If you want a copy of some of the relevant config files / snippets (including the extra bit that ZC adds to the apache2.conf) then I have zipped them up for ease.

Zend Core itself looks like a good product – being able to access to php.ini options via web based tool is pretty useful, as is knowing you are working on a consistent & tested version of PHP. Its a shame MySQL doesn’t offer a similar free / unsupported version of their MySQL Enterprise in a similar way really…

Categories
Open Source PHP

Upgraded to WordPress 2.5.1…

This blog is now running the latest version of WordPress which offers an overhauled admin area one of the first enhancements you notice is a nice new dashboard with metrics.

WordPress 2.5.1 dashboard screenshot

Widgets management in WordPress 2.5

I’ve discovered the dynamic sidebar (which allows widgets to be added using the visual admin interface rather than editing code in the template files) and switched on the tags widget in this version (I’ve been tagging articles for a while they’ve just never shown up). See the bottom screenshot – what you can’t see is the nice drag and drop re-ordering of the widgets in the sidebar.

Some playing around was needed to get the tags looking reasonable in the sidebar. By default tags are just rendered in text or flat mode. However by changing the line 1362 in widgets.php from

wp_tag_cloud();
to:
wp_tag_cloud($args = array('format' => 'list'));

The tag cloud will then render as a HTML list which looks a bit better (until I can get around to doing some styling and turn it into a true tag cloud – where the tag words get bigger the more popular they are).

Categories
Open Source PHP Technology Web Development

MediaWiki is brilliant! Oh and so is FishEye!

Really impressed with the latest release of MediaWiki (the software that runs Wikipedia). Just upgraded the Wiki we use at work from 1.9 to 1.12 – the upgrade was pretty much problem free – some new features I’ve found useful:

  • Will now email you pages that change on your watchlist – if you give it your email address in the preferences section
  • Nice WYSIWYG editor – using the latest FCKEditor Plugin which is now hugely easier to setup (was an absolute pain and a hack to get it working before)
  • Discovered the Geshi syntax highlighting – thanks to Lorna‘s (from iBuildings) Blog

If you are looking for Wiki software (and don’t have the budget for Confluence – which looks very nice indeed) then check it out – mega easy to install and dead easy to use once you install the FCKeditor plugin (as Wiki text can be a bit of a barrier to adoption).

FishEye

Setup FishEye this week – if you have SVN or CVS then you have to check this out – has instantly made my life easier – and I think it will really help the growing dev team at AEA too…

Categories
Open Source PHP Ubuntu Web Development Zend Framework

Zend Framework to be bundled with Ubuntu Hardy (8.04)

Interesting & good news – Zend Framework is being bundled as part of Ubuntu Linux: http://devzone.zend.com/article/3232–Zend-Framework-to-be-part-of-Ubuntu

Direct link to article: http://andigutmans.blogspot.com/2008/02/zend-framework-to-be-part-of-ubuntu.html

Also found an interesting presentation on version 1.5 of the Zend Framework.

Categories
Open Source PHP Web Development

Trying out Web Forum Software (written in PHP)

Update: We have now gone for Vanilla forum which is really nice. PHP4 but has a really nice interface, next step Framework integration!

This is more for notes to myself for now – that I installed bbPress (by the same developers as WordPress that this blog runs on) and Phorum 5. To see if they are any good / worth using at work (eg will they integrate well with other web tools/the Zend/AEA Framework, how well are they written and documented, whats the licensing etc).

Dev site links and notes:
bbPress Logo

bbPress: https://blog.cronky.net/bbpress/

This integrates quite nicely with WordPress (uses the same users) would be good if it could use more of the WordPress installation stuff (eg templating). Also has a nice Poll plugin (although code for this looks a bit hacky).

Cons: PHP4 based, Doesn’t look very mature from its version number, GPL license might cause issues when integrating.

Phorum 5: http://sucrose.cronky.net/phorum/

Particularly interested in this one as it looks good / feature rich but it is also BSD licensed making it more flexible to customise and incorporate into other frameworks without having to re-release an Open Source version.

Cons: Again PHP 4 based.

Silverstripe Forum Module (need to install on dev box)

The other thing to consider is whether a dedicated tool like one of the above offers compelling advantages over the Silverstripe Forum module (although the Forum module is a bit alpha in our experience so far – but then it is at v0.1.2!)

Some benefits of the SS module include PHP5 / MVC implementation, that we are already using SS for CMS anyway…