Saturday, November 6, 2010

Essential Techniques For E-shot creation for designers and developers

For all you web developers out there, E-shot design may seem like a little bit of a hindrance. It's not what you describe as a fundamental skill to master, but it's something that many of us have to do time and again when you work with, or for a design agency. This is primarily down to you having to turn back time when it comes to your web design skills.

I drew up this set of guidelines as I was commissioned to draw up a fully functional e-shot for a company that specialises in website design Bury called Fluid Digital before they took on their own professional developers. Fluid Digital provide some great e-shot services including design, production and delivery, so be sure to look them up.

Modern positioning and styling techniques center around the following structure:

element/CSS reference model which keeps content and layout separate, for example:

<div id="myElement">My Content</div>

With an accompanying reference in your CSS stylesheet:

#myElement {
display: block;
float: left;
}

That is fine for modern browsers, but when you start creating E-shots, you cannot use this method. No, you have to go 'old-school' and I do mean old school- no element backgrounds, minimal style sheet settings (when you can use them, they have to appear inline with the element). The main reason for going 'old-skool' is because you have to accommodate a number of email clients that all have their own way of doing things. Unfortunately the two most dominant email clients - Microsoft Outlook 2007 and Microsoft Outlook 2010, also have the most restrictions. Microsoft Outlook 2003 is a little more leniant as it used the IE engine to render HTML rather than Microsoft Word.

Designing your eshots can be tricky and I hope to take you through the majority of sticky points in the points below:

Section Layout

Like I mentioned above, you cannot use element/CSS to design your pages. In the case of e-shots, you need to go back to the ways of old and use tables to design your layout. In modern web design, when you go to lay out an element like a <div> you would simple add a background, define the width and how the element is positioned in using CSS. Let's compare the two methods.

The HTML/CSS way

#wrapper {
width:655px;
margin: 0 auto;
}

#column1 {
background-image: url('url/reference');
width: 459px;
float: left;
}

#column2 {
background-image: url('url/reference');
width: 196px;
float: left;
}

#footer {
clear:both;
}

Used in a page, they would look like this:

<div id="wrapper">
<div id="column1">Left Hand Side</div>
<div id="column2">Right Hand Side</div>
<div id="footer"></div>
</div>

With an e-shot, you do not have these CSS luxuries as the elements (usually div elements) do not display well in email clients. The background would not show as background-urls are forbidden, the float would not even work properly in a number of clients, though the width probably would.

Positioning

We use a basic table structure:

<table width="655" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="459">Left Hand Side</td>
<td valign="top" width="196">Right Hand Side</td>
</tr>
</table>



With this you get the two column layout, each cell side by side. Notice the width is contained as an attribute of the table, as is the alignment. There is no need for a clearing div as table cells in the same row inherit the height from their tallest sibling. I have also added the valign="top" attribute as content in cells can be a little bit erratic, this just makes sure that all content positions itself in a uniform manner. This is the basic idea behind positioning elements and content in your eshot. You can use all the normal table goodies of colspan as well as using nested tables to create subsections.

Using Background Images

You can't use them if you want your e-shot to pass muster with all email clients, as background-urls are forbidden. But you do have a couple of options. You can either use an image to encompass all your information, but you then run the risk of your emails being spammed out due to an adverse ratio of text:images or you can use the method I have laid out below which allows you to put image into a table that will encompass your text. As you know the amount of content that will be going in your cell this method would work:



Things you can and can't do:
  • font-styling(CSS) is fairly safe and you can perform add most attributes like margin and padding, font-weight etc.
  • Ideally, you want your container element to be no larger than 655px wide
  • Keep the number of links contained in the email to a reasonable amount to avoid Spamming Issues
  • CSS styles can be kept in the head, but may cause some problems, it is preferable to keep all CSS inline. One option is to design the Eshot with the styles in your <head> section and then use something like this to convert them to inline styles
  • <td>table cells - use valign="top" applied as an attribute to the cell instead of using vertical-align in your CSS.
Here are some tips which could help:
  • Basically, when you're building an eshot you are not building a modern web page, you're building a web page like you would have done in 1996!
  • If you feel like you certain clients are not important when your perform your validation then you can always choose to ignore them. I always validate against all versions of Outlook - But like I mentioned above, you allow it to pass the Outlook test then it should be fine in all other clients.
  • Always include a link to a web page that has the e-shot saved
  • Always include an un-subscribe link
  • If you can, include a link back to your website, as you never who is looking at the eshot
  • Remember to keep your overall width to 655px as this width is the most compatible size with the most amount of clients.

Labels: , , , ,

Wednesday, August 11, 2010

Should all web developers work in SEO first

First a little background about myself. I first learnt HTML back in 1999 and was immediately blown away by the instant results of it. You added a likely bit of mark up and boom you saw the results in your browser - images, headers, tables the lot. Some quick code and it was like you could paint with the text in a matter of minutes, for someone with zero artistic ability it was a great feeling to see your ideas rendered on a screen. Not that the designs were anything to get excited about, but it was enough to get me hooked in web design.

Anyways, after a few years playing around at university I thought it was high time I get myself a job in the field that I studied for. After being put in touch with a company through a friend in 2005 I was thrust head first into the wonderful world of SEO (Search Engine Optimisation).

A very large part of SEO centres on the construction of the web page. There are so many ways that you can build a web that it would take me about a thousand years to go through them all. This article really is a piece about how SEO can help make you a better developer through best practice.

This blog post is based around a site I took on from a client who had invested thousands of pounds in to a website and was getting very little traffic. He came to me as I had built a number of smaller sites for a mutual acquaintance that had performed very well in the search engines and asked me if there was anything I could do. I took a look at the website and while it had been developed to a very high standard, the optimisation was severely lacking. After going back to the customer, I asked the customer what happened and it was down to the project manager that was employed to manage the job wanting to over-engineer the site, thus bogging down the original developer. A large part of the blog is information, but I will, also add in the example of the rebuild, where I can. There are so many more SEO techniques you can employ in addition to what I mention below. This case study is more of what I did when I rebuilt and the main areas we concentrated. Further more, there was about 1,200 pages in the database, this information went largely unchanged when it moved to its new home, I mention this, because like with all tests, the monitoring of all elements and variables is essential. Please also note that HTTP 301 redirects were used to make sure that no links were broken and that the busiest pages were mapped to forward to their new home. Non-essential pages were mapped to the home page.

Page construction

One of the first things that I learnt was how the construction of page can affect the optimisation of a page. In the beginning of my own development I used the very common technique of using tables to create the pages layout (even now, people still use this method) rather than the current element and CSS approach that I use now. When I made the switch to developer, not only is easier to keep your design separate from your source code but also makes for a more optimised page. When Google crawls a page it's not interested in the font sizes of your text or what colour it is, it just cares about the content and how this content fits in to the grand scheme of how Google sees the web. Not that layout is the only important part of page. Page Elements, div tags, H1, H2 and all the other primary tags should be used to create the perfect web page. If you took this idea to the extreme, then only those developers who can create ultimate optimisation should create web pages. This is of course not true, but you can get my point which is when you work in SEO you learn best practice that will help you no end if you change career path and become a developer.

Using jQuery/JavaScript to help improve your page's content and or functionality

Let us look at another example; you want a fully functional and flashy slide down menu based at the top of your page. Or the customer wants to have a mission statement at the top of the page that whilst essential to the brand is not necessarily optimised text. A developer without this experience must put the HTML in to the page and think nothing more of it, whereas a person who keeps SEO in mind knows the most optimised text should be towards the top of the page. This us where the SEO primed developer would use jQuery or JavaScript to load the HTML in to the DOM instead. In this situation, we get the best of both worlds as we have our text at the top in terms of presentation and our Google read source code remains uncluttered and optimised.

Another area I would like to touch on is the URL structure of a website. A great many, many people have argued about URL structure and how it affects SEO, all I can do is talk about how it affected the site I rebuilt for my client. I took a look at the existing URL structure and it was based around a 6 folder deep directory structure, which would have been almost impossible for the Search Engines to crawl, especially as there were 1,200 pages spread amongst them. Whenever I build a site, I keep the site as simple as possible. The site now goes no further than 3 folders deep and each page links to its siblings so that each page had hundreds and hundreds of links going to it.

I have not created this entry to boast but is more of a case study of how well a site can do when developed even when it has been completely rebuilt with SEO in mind with some figures to back up the theory.

OK, here are some of the figures for the rebuild, figures post rebuild, figures pre-rebuild a few reminders of some of the facts:

Pages in site: 1200
Domain Age: 4 years
Months since rebuild (at time of writing): 5 months
Development Language used pre-rebuild: PHP
Development Language used post-rebuild: PHP
URL rewrites in place pre rebuild: Yes
URL rewrites in place post rebuild: Yes

Average Visits prior to rebuild per month: 1,500
Average Visits post rebuild per month: 8,200

Yeah, you read that right, the site has had a 550% jump in traffic since the rebuild and the customer is now starting money from, something he wished he had been able to do when he first had the site launched. Yes, the traffic is still not huge, but the 550% increase in traffic in only 5 months is certainly a step in the right direction.

In conclusion I'm not saying that it is essential to have 10 number of years in SEO to become a web developer but it is important to know how to create a well formed page in terms of optimisation. When you consider how competitive the Search Engine Results Pages are and considering it is the developer that will help you attain these positions - it becomes even more important that these developers know how important optimisation is when developing a website.

Labels: , , , ,

Wednesday, July 15, 2009

My PHP development Book List (Advanced)

Advance your PHP knowledge...

I hope you all enjoyed my recommendations on PHP books for beginners. I now give you my list for more advanced books that will take you further into the world of PHP programming and development.

1. I touched upon this book in the beginners book list, but feel like it should be mentioned upon more here. Advanced PHP 5 by Larry Ullman would be the first book I would start to read if I was to go in to more Advanced PHP 5 programming and the reasons are as follows. It has great reference chapters on XML, Ajax and OOP - all of which I would recommend you move on to with more detailed books (some of which are listed below). Each chapter is (relatively) light weight and will give you a good grounding in the subject.

2. The next book I would take a look at is PHP Object-Oriented Solutions by David Powers for friends of Ed. This is a brilliant book, I didn't learn OOP from this book, but from looking at it retrospectively I wished I had. It's great book to learn from and (chapter 2 especially) works as a great reference manual should you need it.

You quickly realise when you are building your applications that you often have retype lots and lots of code. OOP is based on code reusability and modularity so that once you have classes in place, the hard work is done. OOP is also good for those who have to keep one eye on the profitability of their business i.e. free lance developers. With OOP in PHP, you can use common classes so that your time can be utilised in a more efficient manner.

I recommend OOP to all people learning PHP, it may take you more time in the early stages when you are designing and building your class, but once the classes are finished you will find your projects running far smoother. Getting one's head around OOP can be tricky so, unless you can do it in another language I would leave this until you really feel comfortable with the language before you proceed.

3. To learn Ajax with PHP I would use Ajax And PHP Building Responsive Web Applications by Cristian Darie et. all. If you managed to master many of the concepts in JavaScript and PHP then this shouldn't be too hard a book to digest. Not only does teach you about Ajax and how to use it with PHP and MySQL, it also gives you real life examples of concepts that can be used in most modern websites.

N.B. I would suggest that you work through at least some of the chapters in the previous book as this Ajax book does use PHP OOP concepts.

Ajax is a brilliant concept and again, it is something that I would recommend all developers to at least try. Not only does it add that all important visual flair to pages, it also has other benefits too. If server loads are an issue, either through the amount of data or instructions they can handle it helps as only the parts of a page that are needed are sent from the server, rather than the server having to send the whole page again.

Labels: , , , , , , , ,