
I’ve been through the process of going from a great graphic design to a website a few times, as I’m sure many readers have also. I was recently asked by a company for advice on this process, and I thought what I told them might be of interest to others more generally.
These thoughts assume that you’ve already got the “look” of your site figured out. You have either a graphic image of that look or some kind of HTML page. But whatever it is, it may not have been designed for production/programming work.
From this point, what I’ve learned is that getting one great HTML/CSS/JS page worked up at the start is really invaluable. This page should be a “programer-compatible” page, meaning it doesn’t just look great on the browers, but is designed to let a programmer manipulate it programmatically in many situations (making subsequent pages much easier/cheaper to build). Once it’s done, you can also get a lower rent HTML person to use the template to build out the rest of the pages to the point where the programmer moves those HTML pages into ASP structure. But that first page is a killer and if it’s done wrong, it makes the programmer’s job much more difficult for a long time.
So the fact that you spend more (hourly and total) for that first page is pretty normal and shouldn’t have you running to the calculator to multiply against the total number of pages and worrying about over-budgets! I’d recommend giving that first page a couple of revisions before moving on to other pages – it’ll seem slower but will result in the overall project time and cost being lower, in my experience.
Regarding that first (“template”) page, here are some of the things I think are critical in the page design:
- CSS styles should be named, hierarchical and inherited where appropriate. I’m currently dealing with a “hodge podge” CSS file in another environment and it’s a real pain. Where possible, it’s great if you can define a style format (like a font) and then inherit that down into all the other CSS elements, so making adjustments easier b/c they only go in one place. It also makes debugging CSS easier, especially during early development when it really matters. Ideally you’ll have just one CSS file.
- The total number of library files (CSS, JS, images) on a page directly affects the load time. You want to keep this total count as low as possible (ideally one CSS and one JS). But don’t worry about this in development. Once you “lock-in” a set of JS libraries for example, you can concatenate the “frozen” set into a single file and deploy that. You can rebuild that single file whenever you upgrade library versions.
- Specify width and height on every image files. If you do this, the page can render before the images are loaded increasing the apparent/effective speed of the page to the user.
- Force a well structured hierarchy of HTML tags.
- Html tags in general should be very orderly for ASP type systems – especially those which affect style and layout. Amateurs will start one styled tag and then close a different tag from further up, creating mismatches, which is a real pain when doing ASP type work. E.g.:
<span id="style1">
[code..]
<div id=style2>
[code..]
</span>
[code..]
</div>
(Note: I've indented the above to show that the errors should stand out if following the next point).
<%# block for price detail breakdown%> <div id="style1"> [code] </div> <%# style1%>
- Sometimes spaces mess up your layout and the html programmer will want to fudge by removing somes space-indents or carriage returns. Sometimes this is ok, but often this means the way you're building HTML is wrong, and it won't be cross-browser compatible - so keep an eye out if you see this.
- IE6 renders very differently from IE7. I have recently seen some FF3-only bugs as well. In general IE6 will be your problem child - where the layout works everywhere but there so test heavily against that one.
- Related to this, I would also advise not to spend too much time putting everything into blocks! I've found that this is a technically compelling exercise that doesn't yield value down the road. A lot of HTML is "gunk" and can be left alone - if it's done in an expedient manner, that's ok. But the programmer should be able to tell the "programmatic" HTML that needs to be "clean" from everything else and be engaged with the HTML programmer in that way.