Site builders

Where are we?

A good Web site serves users, owners, and builders. We’ve talked about the first two. Now let’s see what people who make Web sites want.

This lesson’s goals

Let’s talk about three things:

  • Satisfying users and owners.
  • Productivity.
  • Pride in craftsmanship.

Satisfying users and owners

At the beginning of a project, owners and builders sit down together. Here are three different ways the conversation might go:

Conversation 1. The conversation is about the business, who its customers are, what customers want, how the business makes money.

Conversation 2. Owners list tech they want, like lots of Flash, and animation, and movies, and sound, and pop up ads. Some Webers, particularly inexperienced ones, will enthusiastically agree, and start working.

Conversation 3. Owners say, “You’re the experts. Build a good site. Let us know when you’re done.” The Webers guess about business goals and customer needs.

Conversation 1 is a good start. It keeps everyone focused on business goals and user needs. The owners have a good chance of ending up with a site that serves business and user goals.

Conversations 2 and 3…, well, it’s not going to be pretty. The owners will get a site that people don’t want to use, and that doesn’t serve the business. The owners will be angry with the Webers, the Webers will be angry at the owners, and both will be angry at the users.

Experienced Webers know that a successful project is as much about the business as the tech. Wise owners know this, too.

One of the worst things Webers can do is to get some initial input from owners, go away and build a complete site, and then present it to owners. It’s unlikely that owners will like what they see.

Why? Because business and user needs aren’t all known when the project begins. Some goals are known at the beginning, but others are uncovered as the project goes along.

Owners and builders should meet every week or so, and review the work so far. Over time, they’ll get a better idea of the final goals of the site.

Goal changes can be frustrating. Webers could have spent hours creating something, only to be told, “Oh, now that I’ve seen it, I guess we don’t want that after all.” This is normal. It’s simply the way things work in the real world.

At some point, owners and builders will need to throw away some of their work. It takes courage to say, “OK, we were wrong about that goal. Let’s change it.”

But what’s better:

  • Keep going down a path you know is wrong?
  • Change direction, and work towards a site that might actually succeed?

To make a good site, start with wise owners and Webers, who accept joint responsibility for the project.

Productivity

Suppose you’re starting a journey. The time it takes depends on:

  • Whether you go in the right direction.
  • How quickly you travel.

Working together helps owners and builders move in the right direction. Productivity is about how quickly they travel.

Builders try to:

  • Use the right tools.
  • Reuse their work.

Tools

Builders need tools to write programs, edit images, and do other things. We won’t talk about them all right now. That comes later.

I’ll just give you one example here. Suppose you want to make a page like this:

Output

Figure 1. Output

You open an editor, a program that lets you type and save text. Editors are like word processors, but without all the formatting and stuff. Just plain text.

You type this:

<!DOCTYPE HTML PUBLIC  "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Dogs</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript"
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
    <script>
  </head>
  <body>
    <h1>Dogs</h1>
    <p>Dogs are the best.</p>
  </body>
</html>

Figure 2. Your code

You try it, but it doesn’t work.

You left something out. Line 8 should have been…

</script>

... instead of…

<script>

That one missing character – a / – makes all the difference.

CC
CC

You’re kidding. That one thing?

Kieran
Kieran

Yes. That one character.

CC
CC

That’s stupid!

Kieran
Kieran

Computers are really stupid. They have no common sense at all.

Unless you program them to detect errors like that, they won’t.

CC
CC

Hmm. That might make me crazy. Trying to find mistakes like that.

Kieran
Kieran

Get ready to be frustrated.

You have to be patient when doing computer work. Patient with the computer, and patient with yourself.

I make mistakes like the missing character all the time. I’ve learned how to keep going.

But all is not lost. Read on.

Remember, you use an editor to type in your code. There are many editors you can use to write pages. Two I talk about later are Notepad++ and Netbeans.

Suppose you use Notepad++. Here’s what the page with the error looks like when typed into Notepad++:

Code in Notepad++

Figure 3. Code in Notepad++

Here’s what it looks like in Netbeans:

Code in Netbeans

Figure 4. Code in Netbeans

Netbeans shows you that something is wrong. Put the mouse cursor over the error, and see this:

Error message

Figure 5. Error message

Netbeans can analyze your code. It can show you errors it finds. It doesn’t always know exactly what is wrong, but it tells you that something is.

Netbeans takes longer to learn than Notepad++. But most Webers prefer tools like Netbeans. Tools that show errors make you more productive.

Of course, Netbeans will only show some errors. But some is better than none.

So the right tools make builders more productive.

Reuse

Reuse is another way to be productive. The idea is to create something once, then use it again and again.

Templates are great examples of reuse. Most Web sites have a standard look for their pages. For example, most CoreDogs pages look something like this:

CoreDogs template

Figure 6. CoreDogs template

I wrote the code for the template once. It gets reused again and again. So the effort I spent on the template pays off again and again. At the time I’m writing this, I’ve reused the template more than 900 times.

W00f! A productivity win.

Templates also make the site easier to change. Suppose I wanted to change the CoreDogs logo to this:

New logo

Figure 7. New logo

I just change the code in the template, and every page in CoreDogs would change.

Craftmanship

Webers love to show off their best stuff. Just like carpenters, writers, artists, and engineers. It feels good when someone says, “That’s good work.”

There’s a danger, though. A Weber can make a page too complicated, just to show off his/her skills. This can increase the cost of a site, and even make it harder to use. Webers should remember that they’re creating something for owners and users, not for themselves.

Summary

  • Owners and builders need to work together to make a Web site good.
  • Goals change during a Web site project.
  • Owners need to constantly review what builders make.
  • Using the right tools makes builders more productive.

What now?

A good Web site serves users, owners, and builders. We’ve looked at things that are important to all three.

Let’s summarize, and then move on to the next chapter.


How to...

Lessons

User login

Log in problems? Try here


Dogs