my window on the web

Web Development

Book review: OpenCart 1.4 Template Design Cookbook by Tahsin Hasan

OpenCart 1.4 Template Design Cookbook thumbnailOpenCart isn’t a system I’ve used before but Packt Publishing asked me to review OpenCart 1.4 Template Design Cookbook by Tahsin Hasan for them so I thought it’d be a good opportunity to learn more about an ecommerce shopping cart system. I spend a lot of time working on PHP/MySQL applications, including Drupal and CodeIgniter, but I haven’t used OpenCart before, so I’m coming to this book and application completely new.

OpenCart is a complete ecommerce shopping cart solution, with features including multi-currency support, product ratings and reviews, downloadable products and a discount coupon system, and it is of course customisable and templatable. OpenCart 1.4 Template Design Cookbook promises to help you get to grips with the basics of template design, as well as styling search results and customising the design of the administration panel to match either yours or your clients’ brand.

'Close Account' options for web applications

Exit It's very rare that I come across a web app which allows me to close my account. Granted, it's not a feature you want to encourage people to use but if people want to stop using your app then they'll probably just abandon the account anyway. From a user's perspective I like to feel in control so being able to close an account, even if I don't chose to do so, can be quite reassuring. However, I think there are also some advantages for developers and stakeholders to benefit from by implementing a 'close account' feature.

First of all, you probably don't want to lose users - you want them to keep using your app and tell all of their friends. But sometimes things don't always work out this way, and although you may be getting lots of people sign up to your app, are they coming back to use it weeks or months down the line? Knowing how many new accounts doesn't really help unless you also know how many are leaving. Adding a 'close account' feature will give you an insight into how long people decide to keep using your app before they walk (and they'll probably do that whether you allow them to close their account or not).

You might also be able to get some feedback by adding a small form or comment box asking why they are leaving. If they are leaving because something isn't working as expected, they will probably tell you and you'll have a chance to put it right. By doing this it may also be possible to convince people to stay by making the process interactive, learning why they want to leave, and hopefully giving them the information they need to change their minds.

Finally, going back to my first point from a user's perspective - people like to feel in control. They may have created an account and misspelled a username or just don't require it anymore, and in an age where so much of our information is online, it reassures people that they can remain in control of their data.

I'd love to hear what your experiences are with building account closure features into your web apps and why you have or haven't chosen to do so. I don't think every app or site should (or shouldn't) have this feature, but these are just some possible advantages from a developer and user perspective. Please feel free to leave comments using the link below.

Optimising Drupal performance

There are a few great out of the box performance tweaks which Drupal offers to speed up page loading times and minimise server load. First of all, these tweaks wouldn't suit every site. You need to first think about how much traffic you currently get and how often our content changes. You don't necessarily have to add or amend a page for content to change; people can post comments and interact with your site in ways which change the content displayed. This will make a difference to how you chose to optimise your Drupal site performance.

Book review: CodeIgniter 1.7 by Jose Argudo Blanco and David Upton (Packt Publishing)

The CodeIgniter framework is a secret weapon for many web developers as it allows you to quickly build complex web applications in a structured and organised way. I started using CodeIgniter over a year ago now so I've approached Packt's CodeIgniter 1.7 by Jose Argudo Blanco and David Upson as a way of expanding upon when I've already learnt from the user guide, forums and a book which I had previously read from Wrox called Professional CodeIgniter by Thomas Myer.

'PHP Nature' missing from 'Project Natures' in Aptana Studio 2.0

For some reason, even though I have the PHP Development Tools (PDT) installed in Aptana Studio (2.0), I'm not able to select 'PHP nature' in the 'Project natures' of an imported project. I can start a new PHP Project which will have the 'PHP nature' selected as primary nature, but this doesn't even appear as an option in imported projects. The only two natures that are available are 'Remote Nature' and 'Web Nature'. The 'PHP nature' adds some really useful functions, like grouping my @todos into Aptana's Tasks view and also other handy things like auto-completing PHP docblocks.

To get the 'PHP nature' associated with your imported project you can manually edit the .project file which Aptana creates in your imported project directory so that it contains the 'PHP nature'. To do this, add the following code between the <natures> tags in your .project file:

<natures>
   <nature>org.eclipse.php.core.PHPNature</nature>     
</natures>

You may need to re-load Aptana to refresh the project but you should now find that your imported project has a primary 'PHP nature' set.

Note: Please do this at your own risk; although it worked fine for me I don't know if it will cause any side effects to the project or Aptana.

CodeIgniter 1.7 by Jose Argudo Blanco and David Upton

CodeIgniter 1.7I was recently sent a copy of a book from Packt Publishing to read and review called CodeIgniter 1.7 by Jose Argudo Blanco and David Upton. I'll be interested to see how the book compares to what I've learnt so far about CodeIgniter (>1 years experience CodeIgniter and >4 years php) and see what else it can offer, especially in terms of planning and managing application projects. The description on the Packt Publishing website says:

"This book explains how to work with CodeIgniter in a clear logical way. It is not a detailed guide to the syntax of CodeIgniter, but makes an ideal complement to the existing online CodeIgniter user guide, helping you grasp the bigger picture and bringing together many ideas to get your application development started as smoothly as possible.

This book will start you from the basics, installing CodeIgniter, understanding its structure and the MVC pattern. You will also learn how to use some of the most important CodeIgniter libraries and helpers, upload it to a shared server, and take care of the most common problems. If you are new to CodeIgniter, this book will guide you from bottom to top. If you are an experienced developer or already know about CodeIgniter, here you will find ideas and code examples to compare to your own."

I'll be posting a review of the book on my blog shortly. This review is now online.

Links

Firefox or Chrome

Chrome VS FirefoxHere's an edgy stand-off I find myself in the middle of every so often – Google Chrome or Mozilla Firefox as my default browser. From a day to day, quick browse, everything is on the web perspective I'd have to say I prefer Google Chrome. It's fast(er), simple and gets the job done. However, from a web developer perspective Firefox has the add-ons that you so sorely need. I've tried designing a Drupal Zen sub-theme with Chrome's 'inspect element' feature but it's not as comprehensive as the Firebug add-on for Firefox which I couldn't work without. However, when I want to check my daily barrage of social sites Chrome shaves off valuable seconds. For today, I'll leave Firefox as my default browser simply because of the add-ons – they're useful, I need them and I don't mind sacrificing a bit of speed.

Twitter and the short URL conundrum

Although the spam seems to be dying down a little on Twitter since they introduced their 'report as spam' option I'm still a little cautious about clicking some shortened URLs - SO many of the links seem to lead to spam (spam and more spam). The whole concept seems to have gone full circle as well with people using extensions like Long URL Please to make the short URL long again. Although I think this is a good a useful add-on, the whole process seems a little excessive. I can see benefit in using shortened URLs in printed media but, when it comes to the web, why are we making links short just to make them long again? I guess Twitter has a big part to play in this by restricting messages to only 140 characters, but surely there's got to be a better way?! With this in mind, I've been trying to get some perspective on the issues. Shortened URLs:

  • You can't see where the link is going to take you (without a plugin)
  • Because most are obscure, they are difficult to remember
  • Multiple links may be created to the same resource
  • Added overheads in the redirection process
  • People can track who has visited the link
  • Spam links look the same as legitimate links

With this in mind
Maybe Twitter could implement a better way for sharing links without using shortened URLs. If links could be 'attached' to tweets and replaced with a token in your message then it would be like wrapping an HTML 'a' tag around some text. You would be able to see where the link is taking you and the message is still short (or even shorter, as there is no more http://).

Free subversion repository hosting accounts

I've come across a few subversion hosting services which offer free accounts so I thought I'd share the links. Most of these seem to offer a limited free account and a range of paid accounts. If you're working with subversion a lot and you come to rely on them then you may want to upgrade in the future - at least you can try them out first for free. However, if you're developing one or two projects on your own you may be happy to stick with the free account. These details are for the free accounts only, and most offer a lot more for the paid account (for example, SSL access, more users, repositories, etc.).

Service Storage space Active projects/repositories Users SSL
Beanstalk 100mb 1 3 No
ProjectLocker 500mb Unlimited 5 Yes
Slik SVN 10mb 1 1 Yes
Springloops 100mb 3 Unlimited No
Unfuddle 200mb 1 2 No
XP-Dev 500mb Unlimited Unlimited No

These details are only up to date as of when I submit this post so make sure you have a look through the links to see what you're getting. If you're looking at hosting an open source project you may want to look at Google Code (http://code.google.com/projecthosting/) and SourceForge (http://sourceforge.net/).

CodeIgniter 1.7.0 Released

It's that wonderful time again! CodeIgniter 1.7.0 has been released, so it's time to upgrade.

http://codeigniter.com/user_guide/installation/upgrade_170.html

Upgrading looks fairly straight forward - here are some notable changes (http://codeigniter.com/user_guide/changelog.html):