Anatomy of a Jquery Plugin

jqueryplugins1

A jquery plugin is a powerful addition to the jquery library. also known as extensions these are nothing new to the development world and have been around for quite some time in various languages. But what makes jquery plugins so unique is the ease in which they can be developed. Continue Reading »


Business Card Design

businesscard

I have finally found the time to make some business cards. Ive tried to go for something which isn’t too “in yout face” but at the same time gets the message across.

Where to Print?

I chose to use moo cards as I had heard some really great stuff about them, and they certainly didn’t disappoint. The turn around time was around 5 days and they even give you a snazzy little case to keep them in. I only opted for 50, and that cost me £10, which is very reasonable, although if you buy in bulk you can save yourself some serious money.

businesscards2

Inspiration

I got some inspiration from the logo designer blog which has some fantastic designs to get you in the creative spirit. As well as this there are some other really great blog rolls which deal specifically with the craft of the business card. Of course if you want to go one further you could always try out chris spooners tutorial on creating a professional print ready business card yourself!


Book Review – Sexy Web Design

sexy web design

Author: Elliot Jay Stocks

Publisher: Sitepoint

Rating: 4.5/5 Stars

I have just finished This fantastic book by Elliot Jay Stocks Entitled “Sex Web Design” I was so impressed with It I felt it deserved a review.

Im not usually a fan of web design books. I have had bad experiences in the past with web development literature, which I found to be quickly out dated and very cumbersome to navigate through. However this book has a refreshing take on how to enlighten and engage with the reader. The book is a great resource for web designers of any caliber. It is packed full of useful suggestions and examples of web tools which will help you improve you design skills. Even once you have finished reading the book is a great point of reference to help you direct your creativity.

One of the greatest aspects about this book is the very personal approach Elliot has taken in composing it. The book covers some complicated theories and ideas, whilst always being clear and concise in describing them, yet the language and structure makes this feel effortless. I also very much liked the case study that Elliot has used, rather than just generalizing the topics he discusses, he refers everything back to the case study, which enables the reader to see the theory put into practice.

If you are however looking for a book to take you through the intricate details of web project management this may not be the best choice for you. Although the book deals with the process of briefs and the design life cycle, it does not touch on invoicing and client relationships.  I don’t however see this as a weakness, as it means the book can focus on whats really important – “Sexy Web Design”.

Overall I would rate this book a great buy. If your new to web design, or a even a seasoned pro it has something to offer you. I picked up my copy on Amazon.co.uk although you could head straight to Sitepoint.


Accreditation and Developments in 09

uxbooth

Just a short update on how things are going in 2009. I have made a few enhancements to the website, as well as throwing around a few ideas for a redesigns. I was quite seriously contemplating starting again from scratch as part of a re-branding exercise, however I found my work accredited in a UX Booth article which really made me reconsider the situation. This coupled with reading a fantastic article on smashing magazine that basically states good designers redesign, great designers realign, got me to thinking, my best bet would be to enhance the package I already have and put my niggles aside.

One of the first steps to doing that has been to change the branding of theodin logo. I decided to step away from the harsh uppercase style as I perceived this to be too overwhelming and did nothing for the senses.

Aside from this I have been busy on some other freelance projects which I hope to share with you soon. I have also been reading a fanstatic book by elliot jay stocks called sexy web design, usually I am not a fan of books on web, In fact the last and only other book I bought was PHP, from novice to professional on Apress publications, I must have picked the book up twice at most, and that was the start and end of it. This book however is very different, and probably dare I say it, one of the best I have read on the subject of web design. I picked it up on amazon and to be honest it has been worth every penny.

I hope to write again shortly when I have a few more projects to show off, in the mean time, I hope you like the new logo. answers on a postcard!


Truncate Text In PHP the Easy Way

Whilst looking for a way to truncate text in my content manager I thought about the best way to approach this. To begin with I thought it might be a good idea to use a method written into a class like this:

//truncate text
public function truncate($text) {
//specify number fo characters to shorten by
$chars = 25;
$text = $text." ";
$text = substr($text,0,$chars);
$text = substr($text,0,strrpos($text,' '));
$text = $text."...";
return $text;
}

There is nothing wrong with this method, it serves its purpose, however I wanted to find a quicker and easier way to apply truncation whereby I could define the number of characters to truncate by. This  could be written into the arguments passed to the truncate function, however this is still what I would call ‘code heavy’ After a bit of thinking I found this to be a much more suitable solution to the problem.

<?php $someText = 'this is textthis is textthis is textthis is textthis is text'?>
<?php echo(substr($someText, 0,25)).'...'; ?>

This simple use of the substr() function built into PHP and saves a lot of the method hassle. I hope this proves useful if you find yourself in the same situation.


How to Serialize and Unserialize POST Arrays using PHP

This tutorial will talk you through the basic steps involved in submitting a serialized array in a form using PHP. Although this can be a straightforward procedure there are a couple of pitfalls to be aware of.

Why Serialize an Array?

There are lots of reasons for wanting to serialize your data. especially if you are passing sensitive information. Serialization may not be a word, but its a great way to make data more secure and tamper proof. with tools such as url params and the web developer toolbar, it has never been easier to hack websites, so the rule of thumb should always be, leave nothing to chance.

Serialized Example

To overcome the problems you may encounter in serializing an array, consider the following example. we have an array that we want to post through in a form and unserliaze on the other side for further use. Your code would look something like this:

$foo = array("hank", "frank", "tank");
?>
<form action="recieve.php" method="post">
<input name="names" type="text" value="<?php print_r(serialize($foo)); ?>" />
<input type="submit" value="submit">
</form>

This however will not work. the serialized array, if you check the code you will see it  looks like this “a:3:{i:0;s:4:“. The reason this breaks is a simple case of “”, instead if we try that same code with single quotes around the value attribute we get a:3:{i:0;s:4:”hank”;i:1;s:5:”frank”;i:2;s:4:”tank”;}, (check out the live example), which is the complete array: the code to get this would look like this:

<?php
$foo = array("hank", "frank", "tank");
?>
<form method="post" action="recieve.php" name="formExample">
<input type="text" name="names" value='<?php print_r(serialize($foo)); ?>' />
<input type="submit" value="submit">
</form>

Now we have the fully serialized array we can pass it through and pull it out the other side of the form. Once we post the form through to the recieve.php we hit another problem. consider the following code:

<?php
$names = unserialize($_POST['names']);
echo($names);
?>

you will find that the code will not output anything, this is yet another pitfall. In order to get the array back out in a usable format we need to use the stripslashes() to remove the uneccesary back slashes that are preventing our array from unserializing. your code would want to look like this:

<?php
$names = unserialize(stripslashes($_POST['names']) );
echo($names);
?>

this will then give you the the your array safely unserilized and ready for use on the other side.

Try It For Yourself

To test this out for yourslef check out the demo, or download the source code and try it out. Good Luck!