Archive for April, 2006

Book Review: Agile Web Development With Rails

Friday, April 28th, 2006

Review by: Richard Mischook

First, a little about this nerd reviewer:

I’ve been writing web applications for over ten years. I’ve used a variety of technologies over that time including CGI with various shell script dialects, Netscape Livewire, and Active Server Pages.

But mainly I’ve used Java because it generally has been the best choice for many of the projects I’ve worked on. (ed: and it paid the bills!)

Now saying ‘Java’ doesn’t say a whole lot because when it comes to web application development, Java can mean a lot of things. It can be as simple (and messy) as just using Java Server Pages or can include servlets, EJBs and/or the various frameworks that are available such as Struts and Spring.

Many of us have been happy to pick and choose from the rich menu of available technologies, confident that these were solid and reasonable choices.

Things change …

But there is a disturbance in the force. It’s a small thing right now but some important people have been grumbling. They’ve been saying things like ‘Do I need to write so much code to do this’ and ‘How many XML configuration files do I need to get Hello World to show up in a browser?

And while many have embraced PHP there is a growing movement centred on a framework called Rails.

Rails is built on the Ruby scripting language. Ruby is an object-oriented scripting language that is concise and “…makes it easy to create methods that act almost like entensions to the syntax…It makes our programs shorter and more readable.” (page 1).

RAILS USES MVC

Rails provides a Model View Controller based framework with some important extras thrown in, most particularly a built in Object Relational Mapping tool that makes saving and loading data to and from Ruby objects almost trivial.

In fact Rails seems to provide a lot of the stuff you’ll find in Struts without the headaches associated with maintaining the Struts config file(s).

Ok, ok … what about the book!

The book wastes no time and starts with an overview of a simple Rails application. It then steps back and covers installation on a number of platforms.

It then dives in deeper and builds a fictitious shopping cart application using an agile and iterative development approach (the book is after all called Agile Web Development with Rails). After spending 125 pages building an application, the authors look at the guts of the framework and illustrate how it can be tweaked.

One important theme running throughout Rails is that of intelligent defaults – if you follow a relatively small number of conventions you can have an application up and running with little or no configuration file tweaks.

But if you do need to change things, you can, and the book does a great job of showing you how in simple and clear language.

EMAIL AND AJAX

The book also looks at support for sending and receiving email, as well AJAX and web services support in Rails. There is also a chapter on deployment that is upfront about some of the issues here as well as an interesting appendix covering the Ruby language for those who may be new to it (like me).

CONCLUSION

Overall the book is a great read if you want to get to grips fast with Rails. The examples and scenarios are fairly realistic and the writing is clear and to the point. Clearly the authors are very passionate about Rails and their enthusiasm is contagious. Highly recommended!

Killersites Web Designer Directory

Tuesday, April 25th, 2006

As you may know, one of the hardest things about getting your websites to appear in the search engines, is actually getting noticed by the search engines in the first place! If they don’t know you even exist …

To solve this problem, the best thing to do, is to get your site listed on a website that already is visited by Google or Yahoo etc …

A COUPLE OF OPTIONS

One way to do this is with link exchanges. Another is by submitting your website to a directory. The problem is that good directories (that get visited a lot,) usually take their time to list new websites, or you have to pay.

For example: Yahoo! cost about $295 just for them to consider your site – there is no guarantee they will even accept you!

To make a long story short, killersites.com has a brand (spanking) new web designers directory. If you have a website and you are looking for web design contracts and exposure to the search engines, now is the time to get your website listed since it is FREE … for now.

Web Design Firms Directory

I will at some point, stop accepting free listings because each entry has to be validated by human eyes … that takes time! To be clear, if you list your site now, it’s free. It will also always be free, for that level, for you guys and gals.

-

I have an article comparing AJAX (the hot new name for a type of JavaScript programming,) and FLASH. There is some collision between the two, and it is an interesting read to see how these technologies compare.

This will be out within the next few days.

Thanks,

Stefan Mischook

SEO AND THE QUALITY OF WEB TRAFFIC

Thursday, April 20th, 2006

These days people are really interested in web traffic – big web traffic. But one thing that many web designers don’t consider, is the quality of traffic.

NOTE: SEO is the acronym for: ’search engine optimization’. This is the process of making your web pages more search engine ‘friendly’ by tweaking code and content.

NOT ALL WEB TRAFFIC IS CREATED EQUAL

People love counting page-views and unique visits but from my perspective, if the traffic sucks, who cares if you get 100 000 visits a day!

HOW TO DETERMINE THE QUALITY OF WEB TRAFFIC

  1. How long people stay your website
  2. Your conversion rate – if you sell stuff.
  3. How many bookmark/’add-to-favorite’ your website.
  4. How many people visit your website by directly typing in your web address.

You know your traffic (probably*) sucks if are people leave right away, don’t buy anything, never bookmark your site etc ..

You can determine what the numbers are for the above points, with a good stats program.

* People could also be leaving because your website sucks – bad usability etc.

THE MORE SPECIFIC THE SEARCH TERM/PRASE – THE BETTER

Let’s say you sell Irish Setters and you have good rating for the key word: ‘dogs’. And since lots of people search using the ‘dogs’ key word, you get lots of ‘dog’ traffic.

I called it ‘dog’ traffic because what you find, is that the vast majority of your audience is NOT looking for Irish Setters, most are looking for information about (all the) other types of dogs in the world …. and that’s if your lucky!

Who knows, maybe they are looking for information on bad stocks (a la stock market,) or maybe on not so attractive women … it’s hard to say with such a loose/broad search term.

OK, LET’S GET BETTER TRAFFIC

With this understanding, you now decide to target ‘Irish Setters’, and with work and luck, you get good position in the search engines. But now, you’ve lost your top ‘dog’ position … dog dangit!

But is it really bad news? Well no, because you now find yourself getting people who are actually interested in what you are offering (Irish Setters) and as such, sales go up AND you get more return traffic.

WHY GOOGLE TRAFFIC IS BETTER FOR BUSINESS

To the point: people who reach you from other websites are typically ‘browsers’. These people are not ready to ‘pull the trigger’ on anything specific, they are simply snooping about not ready to commit … that’s why search engine traffic CAN BE much better.

HOW WEBSITE CAN DELIVER GREAT TRAFFIC

That said, some websites can deliver great traffic, if they are designed to filter/clean up traffic properly.

For example: if my website has a link to your Irish Setter selling website, and the link text reads:

‘Buy superb Irish Setters’

Chances are that people who click through from my website to yours, will be more likely to want to buy an Irish Setter from you. If on the other hand, my link text read: ‘free Irish Setter Information’, the quality of the traffic will decrease – you’ll be getting a bunch of free-loaders!

CONCLUSION

Don’t waste your time chasing sucky traffic … go for the ‘killer’ traffic.

Stefan Mischook (The Web Design Heretic)

Top 7 alternative Image Editors and Converters

Monday, April 17th, 2006

List of Free Image Editors

A LIST OF FREE IMAGE EDITORS AND CONVERTERS

PowerBatch 2.7 – 1.6MB
- Batch renaming, resizing, converting, printing, rotating, colour adjustment, cropping.
- Crop with aspect ratio confinement.
- Built-in FTP client!
- All program files are contained in a single folder.
- Converts JPEG, GIF, PNG, TIFF, BITMAP and JPEG2000.
- Supports animated GIF and multipage TIFF.
- Contact sheets.
- Image effects.
- Add text.

Paint.net – 4.9MB
- In development.
- Clean GUI.
- Developed with help from Microsoft.
- Requires 24MB .NET Framework 1.1 to run.
- Limited layers support (cannot be moved on canvas).

Pixia 3.1 – 3.6MB
- Not much known about this one yet.

Photofiltre – 1.6MB
- Multiple images open at once.
- Many plugins.
- More than 100 filters.
- Feature packed.

FastStone Image Viewer – 2.4MB
- Convert major formats (inc. PSD).
- Lossless JPEG rotation.
- Magnifier viewing.
- EXIF support.
- Resizing, flipping, rotating, cropping, colour adjusting tools.
- Crop with aspect ratio confinement.
- Compare images side by side.
- Batch image converter/resizer.
- Supports animated GIF and multipage TIFF

Xnview – 2.1MB
- Utility for viewing and converting graphic files.
- Imports 400 graphic file formats.
- Exports 50 graphic file formats.
- EXIF.
- Copy, cut and crop.
- Brightness and contrast adjust.
- Modify number of colours.
- Filters and effects.
- Windows print (Contact Sheet) and TWAIN support.
- Supports animated GIF and multipage TIFF.

GIMP – 7.3MB (Windows version)
- Probably the best open source contender to Photoshop.
- Requires GTK+ 2 runtime environment – 3.5MB.
- Layers support.
- Difficult to get used to GUI layout (or so I’ve read).

Thanks to Tim

Stefan Mischook

Java’s dirty little secret: Java web hosting is fragile.

Wednesday, April 5th, 2006

PHP vs Java - is Java really more stable?

When people think of Java, they think of some mighty indestructible language/environment that never goes down – well at least less than other platforms like PHP or .NET.

REALITY CHECK

After running my own servers for 6 years (IIS with Resin) with few troubles, I moved hosting to outside sources. I had to go through several hosting companies before I found one that could even run my simple POJO based applications!

Now after a year has passed, my experience with shared Java hosting can be summarized:

  • Tomcat seems to go down at least once every 7-14 days.
  • Contrast this to PHP – never goes down.

FINAL COMMENTS

The Java community tends to dismiss PHP as some scrappy scripting language that can’t be counted on … I must confess, I used to think that too.

Now after a year of using both Java based and PHP based applications, I have personally found PHP to be much more stable and reliable. I am actually nervous that my Java applications (and Tomcat) will fail regularly and am moving to migrate everything to PHP.

I have no axe to grind, just speaking the truth based on my experience.

Stefan Mischook (The Web Design Heretic)

Book Review: PHP Hacks

Wednesday, April 5th, 2006

PHP Hacks is essentially a collection of ‘bite-size’ PHP scripts that you can easily drop into your websites.

Besides being able to use the hacks straight away in your projects, the PHP code/hacks are clearly explained making them good tutorials for learning how you might do something in PHP.

SOME TOPICS/HACKS THAT STAND OUT:

  • Creating a shopping cart.
  • Using AJAX with JSON – a php library that makes working with AJAX easy.
  • PEAR hacks like Net-Geo to find out state and city locations of people.
  • A good examination of PHP design patterns.

Not exactly for beginners, but if you have an understanding of basic PHP you will be OK and you will learn a lot. This book is also good for programmers (from other languages) who want to get a good idea of what tools, libraries are available in the PHP world.

Another good book from O’reilly.

The Matching Columns Script Video Tutorial: Matching CSS div Heights

Tuesday, April 4th, 2006

One of the fundamental problems people have with CSS page-level layout is matching CSS div heights. Others might call this ‘matching column heights’ in web pages.  

In this article/video (see below,) we are going to solve this problem using a lesser known JavaScript method: the Matching Columns Script.

Let’s start  out by checking out a diagram that illustrates the problem:

Diagram of div heights problem.

People have come out with different solutions including the ‘Faux columns’ hack:  using a vertically tiled background image to create the illusion of a column.

The ‘Faux columns’ hack/trick works, but it does have some limitations:

  • You have to mess around with background images when creating the fake/faux columns effect – there is even more mucking about when you have liquid layouts.
  • You won’t be able to use CSS border styling (on your div’s that create the columns) because it would reveal the hack.

THE BETTER WAY TO HANDLE THIS PROBLEM: DOM SCRIPTING (JavaScript)

JavaScript (sometimes called ECMA script,) is the programming language built into all the browsers that allow geeks/nerds, to have practically total control over how things appear in a web page – it’s very powerful.

Note: DOM scripting (the term,) is a quick way to describe using JavaScript to control a web page’s structure. If this makes no sense, don’t worry about it as you need no programming knowledge to use the technique that is covered here. 

 WHY IS THE JAVASCRIPT METHOD BETTER?

You are better off with the JavaScript method (rather than the ‘Faux columns’ hack, ) because:

  1. Once it is applied, you don’t have to worry about it as it automatically adjust itself to change with your page(s).
  2. It is much easier/faster to apply than the ‘Faux columns’ hack.

 GETTING STARTED

Attached with this article you will find the files you need to apply the script:

  1. The Javascipt file.
  2. The CSS document.
  3. A sample web page that puts it altogether.

Now it’s time to watch the video to learn how to use it.

 MATCHING DIV HEIGHTS VIDEO


CONCLUSION

There is one downside to this technique:

It won’t work if people have JavaScript turned off. Fortunately, the vast majority of people out there have it on. Last time I checked my own stats, nobody had JavaScript disabled.

That said, though it looks a lot better when your columns heights match, I would not consider it mission-critical to a website. That is to say; people will still be able to use the website, so I am willing to accept that for some rare (paranoid) individuals, the columns will not match.

Source Files

 

How to start earning money with your website.

Monday, April 3rd, 2006

I get emails all the time from people asking all kinds of interesting questions; once in a while I post them on the blog or in my newsletter.

This time around someone wanted to know about earning ad revenue with a website:

Me and my business partner have currently set up a new site and we are wondering if you have any advice as to how we should start to make it earn us money. Do we build up the trafic first? or do we get the paid for links & ads first?


MY ANSWER:

The life-blood of any site (that those that depend on ad revenue,) is the the traffic. I’ll even go a step further: the value of a site is the traffic and the quality of the traffic. I think you guessed the answer by now … but just in case, you need traffic first.

Once you have traffic, people will contact you to buy ad space. I get lots of request and refuse the vast majority. Why? Killersites.com gets over 1 million+ pageviews a month of very high quality traffic.

Hope that helps,

Stefan Mischook (The Web Design Heretic)

Site Map  |  Top of page  go to top of page