Wednesday, 30 March 2011

PHP encoder

Hmm.. interesting...

Just came across IonCube which encodes PHP code, protecting your source code.

http://www.ioncube.com/sa_encoder.php

Tuesday, 29 March 2011

Choosing a website package

I'm often asked to create websites for customers but before parting with your hard earned cash, have a think about what you really need and how much time you have to maintain it.

It may sound obvious but creating your own website can be as easy as using a word processor and will give you more control as well as saving you money.

Whatever method you choose, it is very important to update it frequently. There's no point creating a couple of web pages and then leaving it to gather dust. You want your website to be found!

Search engine optimisation is a subject in its own right but in summary:
  • Google loves content, lots of content, relevant and not "spammy" - articles, news, media
  • Google loves fresh content - sites that are updated frequently will be indexed frequently - if your website hasn't changed for a month, then Google will have a look in a months time - if your website changes daily, then Google will look daily - you get the idea.
  • There are other search engines to think about (Yahoo, Bing, Ask, etc) but Google is used by around 90% of the UK
So here are most of the options available, starting with the easiest then getting more techy.

Blog

Simplest and easiest to set up and manage. The choice basically boils down to Blogger or Wordpress.com.

Its really a personal choice, both have similar features. Both enable you to use your own domain name, have static pages and custom templates.
Blogging is ideal if you provide a service and can be used to demonstrate how good your are at your job. But it can also be used to show off products too. Get into a routine of writing a blog post daily or weekly or at least monthly. Talk about successful projects, new products, events etc. Use the "static" pages for an about us, contact us, services etc. (Like the tabs at the top of this blog)

The one thing you might want to think about paying for is a template design. There are plenty of off the shelf templates but using a designer will give your page a unique feel and help market your brand.

(Wordpress can also be a CMS - see below)

Hosted website

Okay, so you've outgrown your blog or you need a few more pages.

If you are not very techy or have a limited budget, then have a look at a hosted website or website builder. There are a few free ones including Google Sites.

The main advantage is that you don't need any technical experience or special software. Its all done online and very simple. They have "widgets" that can be included on web pages, such as calendars and blogs. They are also free... The downsides are the templates are usually limited and the host will have their branding on your website.

Content Management System

Okay, so you need a customised, all singing, all dancing website. Then you need a  content management system or CMS. These offer a highly customisable solution.

A CMS is basically divided into 3 separate parts
  • Design - this is how the web site looks and most CMS will have a template system. This has the advantage that you can change the design/template at any time without affecting the content.
  • Techy stuff - this is the inner workings of the CMS. Most will have a modular system allowing you to install extensions - modules, plugins, components. For example, a blog component, a forum component, analytics plugin or a latest news module.
  • Content - this is the marketing bit - which in most cases is likely to be you! Its very similar to updating a blog but with a few extras. But like a blog it enables you to update content frequently.
To create a successful CMS you need to employ 3 personalities - a designer, a developer and a marketeer. Generally speaking developers don't make good designers and vice versa. So split the job up. First choose the CMS which is best for you, then employ a designer to create a template, then possibly a developer to get the website just right for you. Then its up to you to add the content.

Each CMS will have a user management system, so you can assign sections of the website to different staff in your organisation.

Which content management system?

There are a LOT of content management systems available.

I would recommend choosing one that is open source and widely used. It doesn't have to be the best but will ensure there is plenty of support. You will then be able to easily hand over the development to another programmer (should the programmer or designer have creative differences and throw a wobbly...)

The most widely used open source CMS is Joomla followed by Drupal. Both have their pro's and con's - a good comparison is on GoodWebPractices.

Although Wordpress is now being used as a CMS rather than just for blogging. So if you choose Wordpress as a Blog initially, you will be able to transfer to a host and customise it at a later date by installing Wordpress.org. (Wordpress.org is the software used by Wordpress.com)

Whichever CMS you choose, you will need a host. I would recommend ZipHost - a local company in Kinver.


CMS installation and maintenance

One of my projects, www.globaldialysis.com has been developed using Joomla. Most of the extensions are used as is, but I have also modified a couple of the extensions, particularly SOBI.

I haven't a lot of experience with Drupal or Wordpress but can share some of my experiences with Joomla. These points will apply to most CMS's.
  • You will need a host, so this is going to cost you a monthly or annual fee.
  • Joomla, Drupal and Wordpress all require PHP and MySql - so make sure your hosts provides these.
  • You will need to install and setup the CMS - if you are not very techy then you might need to employ someone to do this for you. (Installation guides for Joomla, Wordpress, Drupal)
  • Each has thousands of extensions, choose those that are highly rated AND has a lot of votes. eg: I would choose an extension with 4 stars and 500 votes rather than 5 stars and two votes. (Extensions for Joomla, Wordpress and Drupal)
  • Avoid installing every extension - yes its all very exciting but after a bit it becomes cumbersome and time consuming. I'll write about the best ones for Joomla in a separate post.
  • The core system and extensions are updated frequently for bug and security fixes. You will need to check these regularly and update them. If you don't update - then you run the risk of a security hack. (Upgrade Joomla, Wordpress, Drupal
  • Each will have a front end and back end. The front end is what the public sees, the back end is for administration. The back end links are well known - for example Joomla is website.com/administrator - so make sure you use a very good password and install a security module to protect or rename the link. (Admin for Joomla, Wordpress, Drupal)
  • Not all hosts will backup your website, so make sure you have a method of backing up and restoring - not just your website but also your database. (Akeeba is by far the best for Joomla.)
  • At some stage you will inevitably need to employ a developer. Bear this in mind. Although it can be inexpensive if you use oDesk or Freelancer - or yours truly of course :)
I don't want to put you off using a CMS, they are highly customisable and widely used and supported. Just bear in mind that there are some bits that need techy skills. You will also need to regularly maintain a CMS.

eCommerce

If you sell "stuff" then you have a four main choices. Use an intermediary service, hosted service, host an ecommerce package or use a CMS extension. I haven't a lot of experience in this area but can direct you.

Intermediary eCommerce services
The main advantages are wide exposure, familiarity, ease of use and payment processing is done for you - both are widely known and show up on shopping searches in Google. The downside are the fees. There is a good comparison on ArticlesBase.

Hosted Services
The advantage is that you don't need to do anything techy. Just follow their instructions. The pricing is based on the volume of products you have. Payment processing is done for you. Most of them have options to put stuff on eBay and/or Amazon for you - as well as Google products etc.


Host an eCommerce package
    The main player here is Magento. You'll need to choose a host and install the software. The main advantage is that you only have hosting fees and can customise the software however you want. The disadvantages are similar to a CMS - you need to maintain it and might need to hire a professional for some of the work.

    Use an eCommerce module for a CMS

    The main player here is VirtueMart - the most widely used shopping cart for Joomla. The advantage is that you can build a CMS around your shopping cart. Only pay for hosting fees too but you still might need some professional help.

    Web applications - ready made

    So you want a website with a bit more functionality - technically an application. For example appointment booking, estate agents, accounts system, room booking, training, customer support, CRM etc.

    First have a look to see if an open source system is readily available for your needs. There isn't really a definitive list so you might have do a bit of Googling for something like "open source online" + the application you are looking for. Although if your host has a cpanel then have a look through the list in Fantastico Deluxe or try Simple Scripts.

    Some examples of online open source applications are:

    Most of these can be installed alongside your existing website.

    Web applications - custom made

    This is where you need to employ a developer - such as me :)  Or if you have the time, then learn a programming language. I would recommend PHP or Python both are open source and so are free and have plenty of forums and resources. In reality though, you will need to learn a lot of other stuff too - javascript, html, css, xml, dom, jquery, soap, ajax, json, sql and possibly java and flash. But php is a good start, try online tutorials before splashing out on a book such as w3schools.

    If you choose to employ a developer or have a go yourself, then it would be very wise to use a web application framework. A framework basically handles all of the common routines allowing you to concentrate on the nitty gritty development - this allows developers to rapidly create an application. If you choose to employ someone and use a framework, then like CMS, the development and support can be easily transferred should the developer throw a wobbly.

    Like content management systems, there are a lot of frameworks to choose from.

    If you choose Python then go for Django.

    If you choose PHP then there are 5 main frameworks:


    • Yii - my favourite so far. Its fairly new framework compared to the others but dead easy to use.
    • Zend - Too complicated
    • Symfony - Couldn't get Symfony 2.0 installed, although haven't tried version 1.x.
    • Cakephp - easy to start up, generates CRUD but got a bit stuck in parts
    • Codeigniter - I tried this first, documentation is great but lacks a CRUD builder.
    With a framework its very easy for a developer to rapidly create a web application. It also offers long term support and there are plenty of developers available.

    Finally, really really simple websites (sort of)


    Create a Facebook Page for your business - you should really have one of these as part of your online marketing strategy anyway. Please don't confuse this with your personal facebook page - just put stuff on there that is relevant to your business not things like you're having lunch with aunty Doris.

    You might think that Facebook is just for social networking but its also the 2nd most popular website in the world...

    Once created, get all your friends and family to like your page - then once you get to 25 fans, you can choose a username for it. For example, my facebook page is http://www.facebook.com/RussellEnglandTechy which I can now use in my marketing. So in theory you could use this as your primary website.

    Also create a twitter page for your business, gather followers and get tweeting. (http://twitter.com/RussellEngland)

    Add your business to linkedin (http://www.linkedin.com/company/russell-england) as well as your personal profile. (http://uk.linkedin.com/in/russellengland)

    Keeping track of Twitter, Facebook and LinkedIn can be a bit of a headache. Fortunately there is a great little program called YooNo. Install it in your browser or as a desktop program.

    Finally, if you don't do anything else, then at the very least make sure you are on Google Places.

    Friday, 18 March 2011

    Cool piece of software for keeping up to date with all the Facebook, Twitter and Linkedin messages - runs inside your browser or on Linux, Windows or Mac http://yoono.com/

    Cool piece of software for keeping up to date with all the Facebook, Twitter and Linkedin messages - runs inside your browser or on Linux, Windows or Mac http://yoono.com/


    Yoono - Twitter Facebook MySpace LinkedIn Flickr - Share and Download Youtube videos
    yoono.com
    Yoono is free software that allows you to connect and share with all your social networks and instant messaging services in one place

    Tuesday, 15 March 2011

    jquery: Adding numbers and concatenation

    This one stumbled me for a bit. I kept trying to calculate the total of 5 input fields using jquery/javascript. But the numbers kept concatenating.

    Turns out that if any of the input fields don't have a value, then it becomes a string and so the whole value becomes a string.

    A little trick to get around this is to simply - zero which will convert it to a number without affecting the result.

    eg:

    var tot = ($('#MarginVatForm_purchaseCost1').val() - 0) + ($('#MarginVatForm_purchaseCost2').val() - 0) + ($('#MarginVatForm_purchaseCost3').val() -0) + ($('#MarginVatForm_purchaseCost4').val() - 0) + ($('#MarginVatForm_purchaseCost5').val() - 0);

    This is only for the + operator because it doubles as string concatenation. Other arithmetic operators seem fine.

    Saturday, 12 March 2011

    I was there... read more about it at http://www.russellengland.com/p/my-computer-bio.html

    I was there... read more about it at http://www.russellengland.com/p/my-computer-bio.html


    ZX81: Small black box of computing desire
    www.bbc.co.uk
    The Sinclair ZX81 was small, black with only 1K of memory, but 30 years ago it helped to spark a generation of programming wizards.

    Thursday, 10 March 2011

    Using your laptop anywhere in the home/office is the biggest advantage of wifi. But if you need speed, connect to the router with a network cable.

    Using your laptop anywhere in the home/office is the biggest advantage of wifi. But if you need speed, connect to the router with a network cable.


    Wi-fi 'slows down' home broadband
    www.bbc.co.uk
    People relying on home wi-fi get significantly slower speeds than from fixed broadband connections, research suggests.

    Wednesday, 9 March 2011

    Installing symfony 2.0 - progress so far...

    I'm trying out the main php frameworks - started with Zend but it was far too complex for me - so tried Cogeigniter and Cakephp - both are great for my needs.

    Symfony is my next evaluation but the quick tour seems to be incomplete
    http://symfony.com/doc/2.0/quick_tour/the_big_picture.html

    Sandbox is obsolete, so I downloaded symfony 2.0, extracted it into your /var/www/ directory, then renamed the Symfony folder to sandbox.

    check.php should be config.php
    http://localhost/sandbox/web/config.php

    Install sqlite in Ubuntu
    sudo apt-get install php5-sqlite

    Edit the php.ini file for the timezone
    gksudo gedit /etc/php5/apache2/php.ini

    Install APC
    sudo apt-get install php-apc

    Restart apache
    sudo apachectl -k graceful

    Not sure where the HelloBundle is...

    Will leave this one for bit, testing out Yii now... Although django looks like the best option it means learning another language python.

    Monday, 7 March 2011

    Extract email addresses

    Grep is a great search tool in Ubuntu/Linux thats also available for Windows.

    A friend lost their email contacts because of a hotmail hack... So I downloaded all emails they had sent to me and then used grep to create a list of email addresses. Heres how I did it:
    1. Create a label (friendsname) in Google mail for all email received from friendsemail@hotmail.co.uk
    2. Install Thunderbird and connect to my Google mail account using IMAP.
    3. Thunderbird creates a folder for each label, so go to the folder for friendsname
    4. Highlight all of the emails and select file -> save as -> folder name - this will save each email as a file in a folder (friendsfolder)
    5. Open a linux terminal or windows command prompt.
    6. Change directory to the folder in step 4 above (eg in Ubuntu: cd Documents/friendsfolder)
    7. Then enter grep -Eiorh '([[:alnum:]_.]+@[[:alnum:]_]+?\.[[:alpha:].]{2,6})' "./" | sort | uniq > emails.txt
    8. This will copy all email addresses into a file called emails.txt
    You can then open the file with a text editor, delete any emails you don't want and import into your email account.