- •Taking Your Talent to the Web
- •Introduction
- •1 Splash Screen
- •Meet the Medium
- •Expanding Horizons
- •Working the Net…Without a Net
- •Smash Your Altars
- •Breath Mint? Or Candy Mint?
- •Where’s the Map?
- •Mars and Venus
- •Web Physics: Action and Interaction
- •Different Purposes, Different Methodologies
- •Web Agnosticism
- •Point #1: The Web Is Platform-Agnostic
- •Point #2: The Web Is Device-Independent
- •The 18-Month Pregnancy
- •Chocolatey Web Goodness
- •’Tis a Gift to Be Simple
- •Democracy, What a Concept
- •Instant Karma
- •The Whole World in Your Hands
- •Just Do It: The Web as Human Activity
- •The Viewer Rules
- •Multimedia: All Talking! All Dancing!
- •The Server Knows
- •It’s the Bandwidth, Stupid
- •Web Pages Have No Secrets
- •The Web Is for Everyone!
- •Swap text and code for images
- •Prune redundancy
- •Cache as Cache Can
- •Much Ado About 5K
- •Screening Room
- •Liquid Design
- •Color My Web
- •Thousands Weep
- •Gamma Gamma Hey!
- •Typography
- •The 97% Solution
- •Points of Distinction
- •Year 2000—Browsers to the Rescue
- •Touch Factor
- •Appropriate Graphic Design
- •User Knowledge
- •What Color Is Your Concept?
- •Business as (Cruel and) Usual
- •The Rise of the Interface Department
- •Form and Function
- •Copycats and Pseudo-Scientists
- •Chaos and Clarity
- •A Design Koan: Interfaces Are a Means too Often Mistaken for an End
- •Universal Body Copy and Other Fictions
- •Interface as Architecture
- •Ten (Okay, Three) Points of Light
- •Be Easily Learned
- •Remain Consistent
- •Continually Provide Feedback
- •GUI, GUI, Chewy, Chewy
- •It’s the Browser, Stupid
- •Clarity Begins at Home (Page)
- •I Think Icon, I Think Icon
- •Structural Labels: Folding the Director’s Chair
- •The Soul of Brevity
- •Hypertext or Hapless Text
- •Scrolling and Clicking Along
- •Stock Options (Providing Alternatives)
- •The So-Called Rule of Five
- •Highlights and Breadcrumbs
- •Consistent Placement
- •Brand That Sucker!
- •Why We Mentioned These Things
- •The year web standards broke, 1
- •The year web standards broke, 2
- •The year web standards broke, 3
- •The year the bubble burst
- •5 The Obligatory Glossary
- •Web Lingo
- •Extranet
- •HTML
- •Hypertext, hyperlinks, and links
- •Internet
- •Intranet
- •JavaScript, ECMAScript, CSS, XML, XHTML, DOM
- •Web page
- •Website
- •Additional terminology
- •Web developer/programmer
- •Project manager
- •Systems administrator (sysadmin) and network administrator (netadmin)
- •Web technician
- •Your Role in the Web
- •Look and feel
- •Business-to-business
- •Business-to-consumer
- •Solve Communication Problems
- •Brand identity
- •Restrictions of the Medium
- •Technology
- •Works with team members
- •Visually and emotionally engaging
- •Easy to navigate
- •Compatible with visitors’ needs
- •Accessible to a wide variety of web browsers and other devices
- •Can You Handle It?
- •What Is the Life Cycle?
- •Why Have a Method?
- •We Never Forget a Phase
- •Analysis (or “Talking to the Client”)
- •The early phase
- •Design
- •Brainstorm and problem solve
- •Translate needs into solutions
- •Sell ideas to the client
- •Identify color comps
- •Create color comps/proof of concept
- •Present color comps and proof of concept
- •Receive design approval
- •Development
- •Create all color comps
- •Communicate functionality
- •Work with templates
- •Design for easy maintenance
- •Testing
- •Deployment
- •The updating game
- •Create and provide documentation and style guides
- •Provide client training
- •Learn about your client’s methods
- •Work the Process
- •Code Wars
- •Table Talk
- •XHTML Marks the Spot
- •Minding Your <p>’s and q’s
- •Looking Ahead
- •Getting Started
- •View Source
- •A Netscape Bonus
- •The Mother of All View Source Tricks
- •Doin’ it in Netscape
- •Doin’ it in Internet Explorer
- •Absolutely Speaking, It’s All Relative
- •What Is Good Markup?
- •What Is Sensible Markup?
- •HTML as a Design Tool
- •The Frames of Hazard
- •Please Frame Safely
- •Framing Your Art
- •<META> <META> Hiney Ho!
- •Search Me
- •Take a (Re)Load Off
- •WYSIWYG, My Aunt Moira’s Left Foot
- •Code of Dishonor
- •WYS Is Not Necessarily WYG
- •Publish That Sucker!
- •HTMHell
- •9 Visual Tools
- •Photoshop Basics: An Overview
- •Comp Preparation
- •Dealing with Color Palettes
- •Exporting to Web-Friendly Formats
- •Gamma Compensation
- •Preparing Typography
- •Slicing and Dicing
- •Rollovers (Image Swapping)
- •GIF Animation
- •Create Seamless Background Patterns (Tiles)
- •Color My Web: Romancing the Cube
- •Dither Me This
- •Death of the Web-Safe Color Palette?
- •A Hex on Both Your Houses
- •Was Blind, but Now I See
- •From Theory to Practice
- •Format This: GIFs, JPEGs, and Such
- •Loves logos, typography, and long walks in the woods
- •GIFs in Photoshop
- •JPEG, the Other White Meat
- •Optimizing GIFs and JPEGs
- •Expanding on Compression
- •Make your JPEGS smaller
- •Combining sharp and blurry
- •Animated GIFs
- •Creating Animations in ImageReady
- •Typography
- •The ABCs of Web Type
- •Anti-Aliasing
- •Specifying Anti-Aliasing for Type
- •General tips
- •General Hints on Type
- •The Sans of Time
- •Space Patrol
- •Lest We Fail to Repeat Ourselves
- •Accessibility, Thy Name Is Text
- •Slicing and Dicing
- •Thinking Semantically
- •Tag Soup and Crackers
- •CSS to the Rescue…Sort of
- •Separation of Style from Content
- •CSS Advantages: Short Term
- •CSS Advantages: Long Term
- •Compatibility Problems: An Overview
- •Working with Style Sheets
- •Types of Style Sheets
- •External style sheets
- •Embedding a style sheet
- •Adding styles inline
- •Fear of Style Sheets: CSS and Layout
- •Fear of Style Sheets: CSS and Typography
- •Promise and performance
- •Font Size Challenges
- •Points of contention
- •Point of no return: browsers of the year 2000
- •Absolute size keywords
- •Relative keywords
- •Length units
- •Percentage units
- •Looking Forward
- •11 The Joy of JavaScript
- •What Is This Thing Called JavaScript?
- •The Web Before JavaScript
- •JavaScript, Yesterday and Today
- •Sounds Great, but I’m an Artist. Do I Really Have to Learn This Stuff?
- •Educating Rita About JavaScript
- •Don’t Panic!
- •JavaScript Basics for Web Designers
- •The Dreaded Text Rollover
- •The Event Handler Horizon
- •Status Quo
- •A Cautionary Note
- •Kids, Try This at Home
- •The Not-So-Fine Print
- •The Ever-Popular Image Rollover
- •A Rollover Script from Project Cool
- •Windows on the World
- •Get Your <HEAD> Together
- •Avoiding the Heartbreak of Linkitis
- •Browser Compensation
- •JavaScript to the Rescue!
- •Location, location, location
- •Watching the Detection
- •Going Global with JavaScript
- •Learning More
- •12 Beyond Text/Pictures
- •You Can Never Be Too Rich Media
- •Server-Side Stuff
- •Where were you in ‘82?
- •Indiana Jones and the template of doom
- •Serving the project
- •Doing More
- •Mini-Case Study: Waferbaby.com
- •Any Size Kid Can Play
- •Take a Walk on the Server Side
- •Are You Being Served?
- •Advantages of SSI
- •Disadvantages of SSI
- •Cookin’ with Java
- •Ghost in the Virtual Machine
- •Java Woes
- •Java Woes: The Politically Correct Version
- •Java Joys
- •Rich Media: Exploding the “Page”
- •Virtual Reality Modeling Language (VRML)
- •SVG and SMIL
- •SMIL (through your fear and sorrow)
- •Romancing the logo
- •Sounds dandy, but will it work?
- •Promises, Promises
- •Turn on, Tune in, Plug-in
- •A Hideous Breach of Reality
- •The ubiquity of plug-ins
- •The Impossible Lightness of Plug-ins
- •Plug-ins Most Likely to Succeed
- •Making It Work: Providing Options
- •The “Automagic Redirect”
- •The iron-plated sound console from Hell
- •The Trouble with Plug-ins
- •If Plug-ins Run Free
- •Parting Sermon
- •13 Never Can Say Goodbye
- •Separation Anxiety
- •A List Apart
- •Astounding Websites
- •The Babble List
- •Dreamless
- •Evolt
- •Redcricket
- •Webdesign-l
- •When All Else Fails
- •Design, Programming, Content
- •The Big Kahunas
- •Beauty and Inspiration
- •Index
Taking Your Talent to the Web |
339 |
tomer feedback onsite in real time. Initially that seems beyond the reach of the print designer-cum-web designer, but a few hours with a book on PHP will change all that. The client gets his interactivity; the designer gets a higher fee. Hopefully the consumer is also better served.
You might think all this is “too technical” for you. If you don’t believe you will ever be able to wrap your head around server-side stuff, let us now introduce you to Server Side Includes (SSI), the technology we mentioned earlier in this chapter.
TAKE A WALK ON THE SERVER SIDE
As a working web designer, you might find yourself cutting and pasting the same menu bar into page after HTML page. For instance, you might have cut and pasted something like this into all 500 pages of your site:
<!--Begin menu -->
<table border=”0” cellpadding=”0” cellspacing=”0”> <tr valign=”top”>
<td width=”20%” valign=”top” align=”left” bgcolor=”#cccc00” height=”25”> <a href=”/main.html”
onmouseover=”window.status=’Current issue. You\’re soaking in it.’; return true;” onmouseout=”window.status=’’; return true;”>
<img name=”main” src=”/menu3/main_o.gif” valign=”top” align=”left” height=”25” border=”0” alt=”Current issue.”></a></td>
</tr>
<tr>
<td valign=”top” align=”left” bgcolor=”#cccc00” height=”25”> <a href=”/stories/”
onmouseover=”window.status=’Past issues.’; changeImages(‘stories’, ‘/menu3/stories_o.gif’); return true;”
onmouseout=”window.status=’’; changeImages(‘stories’, ‘/menu3/stories.gif’); return true;”>
<img name=”stories” src=”/menu3/stories.gif” valign=”top” align=”left” height=”25” border=”0” alt=”Past issues.”></a></td>
</tr>
<tr>
<td valign=”top” align=”left” bgcolor=”#cccc00” height=”25”> <a href=”/news.html”
onmouseover=”window.status=’Site news.’; changeImages(‘news’, ‘/menu3/news_o.gif’); return true;”
onmouseout=”window.status=’’; changeImages(‘news’, ‘/menu3/news.gif’); return true;”>
340 HOW: Beyond Text/Pictures: Take a Walk on the Server Side
<img name=”news” src=”/menu3/news.gif” valign=”top” align=”left” height=”25” border=”0” alt=”Site news.”></a></td>
</tr>
<tr>
<td valign=”top” align=”left” bgcolor=”#cccc00” height=”25”> <a href=”/join.html”
onmouseover=”window.status=’Our mailing list.’; changeImages(‘list’, ‘/menu3/list_o.gif’); return true;”
onmouseout=”window.status=’’; changeImages(‘list’, ‘/menu3/list.gif’); return true;”>
<img name=”list” src=”/menu3/list.gif” valign=”top” align=”left” height=”25” border=”0” alt=”Our mailing list.”></a></td>
</tr>
</table>
<!-- End menu -->
Ugly, isn’t it? What if you could replace that entire chunk of repugnance with one comely line of code? Namely:
<!-- #include virtual=”/includes/menu.inc” -->
You can do it!
To do it, let’s assume that the menu mess was part of a page called index.html.
First, cut the menu mess out of index.html, paste it into a blank document, and save that document as menu.inc. The .inc stands for “include,” though technically speaking, includes can have any file extension—even .html. Your systems administrator will tell you if includes require a particular or unusual file extension.
Now in index.html, where the menu mess used to be, type that one line:
<!-- #include virtual=”/includes/menu.inc” -->
What do these tags mean? <!-- is a null tag containing a comment; <!-- #include --> is an include; virtual means that what follows in quotes is a URL pointing to the file you wish to include; and --> closes the comment and the include.
Next, you’ll save menu.inc in an “includes” directory on your web server. You don’t have to save it in such a directory, but it makes sense, just as it makes sense to save GIFs in a “gifs” directory, QuickTime movies in a “quick-
Taking Your Talent to the Web |
341 |
time” or “movies” directory, and so on. As described in Chapter 7, this makes it easier to find pieces and write appropriate file references during the site’s creation and subsequent maintenance. If for some reason you prefer to save your SSI files in a directory called “rosebud,” the reference would read:
<!-- #include virtual=”/rosebud/menu.inc” -->
Now simply use that line of code in every HTML document where you formerly had to cut and paste a heap of menu bar markup. Then upload your HTML pages to the web server.
Some folks use a different file extension, such as .shtml or .shtm, if their HTML file contains an include, and some servers require this. But if you can stick to the .html file extension, you’ll avoid confusion and heartache down the road.
Why confusion and heartache? We knew you were going to ask. For one thing, imagine that your static .html pages have been bookmarked by visitors and search engines. You then start changing your file extensions. All of a sudden, your internal and external links are broken, your visitors are confused, and the search engines that ranked you so highly are pointing to nonexistent pages.
Are You Being Served?
You’ve replaced redundant markup with neat, clean includes. What’s the next step? There probably isn’t one. Most web servers natively support SSIs. If it doesn’t work right away, you might need to contact the company hosting your site (or the network administrator if your company hosts its own sites) and ask that the configuration file be changed to permit SSIs. Unless the hosting company hires trained monkeys as tech support, complying with your request will take two minutes.
Of course, if you are sane, you will have made this phone call before changing all your HTML pages. Or you will have created a test HTML page, uploaded it, and confirmed with your own eyes and mouse cursor that it works.
342 HOW: Beyond Text/Pictures: Take a Walk on the Server Side
More than one SSI can be put to use on each page. You can replace the
“header,” the “footer,” or just about any piece of the puzzle. Using SSI, you can replace all or nearly all of the dull, repetitive junk that holds web pages together.
In turn, you can begin viewing HTML pages as content containers rather than tortuous masterpieces of visually oriented markup—because content containers are exactly what they are and were always intended to be. This might not be the true separation of style from content, but it will do until the real thing comes along.
SSI can do many things besides what we’ve outlined here. It can insert appropriate text, HTML, or CSS based on the user’s browser. It can indicate when the page was last updated (<!--#echo var=”LAST_MODIFIED” -->), give the current date and time, and do other funky tricks.
And, as we’ve said, SSI is the low end. Imagine the possibilities if you begin to work with more advanced server-side technologies.
Advantages of SSI
If a site changes—or perhaps we should say when a site changes (for instance, when a new section must be added to the menu bar)—the power of SSI is revealed. What was true for CSS is just as true for SSI: It is easier to edit a single document (menu.inc) than it is to change hundreds or thousands.
Hopefully, your client is not about to wantonly add new sections to the menu or demand changes to the appearance of the menu after the site is nearly built. In a perfect world, you have followed the suggestions in Chapter 7, and the client has signed off (and paid part of your fee) at each stage of completion. Therefore, the client has a vested interest in following through with the plan he committed to and paid for and has no vested interest in pulling last-minute changes to prove that he is the dominant monkey in this rainforest.
But clients are clients, and change happens. SSI is a simple way of protecting yourself from hours of tedious replacement tasks.