1. Build a Little

2. Stop

3. Validate

4. Test

5. Repeat

 

The other day while working with an intern in our office, I mapped out a workflow that I use almost every day, but didn’t even realize it. The steps in this workflow are above. The purpose of this workflow is to lessen development time and ensure quality in the work you produce. One important thing to note is that this workflow assumes that your project is “shovel ready”, as in all the planning and strategy has already been completed. This model does not cover that part of a project.

Step 1: Build a Little

Some XHTML & PHP

Some XHTML & PHP

The first step in my workflow is to build. Build a little that is. It’s important not to build your entire project in the first step. If you do this, it will only make validation and testing harder. If I’m building a full layout template for a website, then I will typically build a third of it before I move to step two (say the header, content area or footer). How much you build will largely depend on your experience and skill level. Those new to the field may want to build less while those with a decent amount of experience will be just fine building more. If you are just starting out you will eventually notice a natural inclination to build more before moving to validation. This progression will be the direct results of what you learn in steps three and four.

Step 2: Stop

This step is self explanatory, but probably the most important. As I explained above, my experience has proven that not stopping only makes steps three and four more painful–most of the time. So no matter how tempting it is to keep building, remember to stop at some point to move onto the next step.

Step 3: Validate

Validation isn’t exactly my push for standards driven front-end work–although I believe in it highly. This step is more about learning the language in which you write more clearly and not mention making your life arguably much easier with quirky browsers. It is likely that the project you are building has to support some of the older browsers in the market, however unfortunate that may be. In this instance, you’ll want to have the most valid code that you can possibly have before moving to testing. This is because what you may perceive as a browser quirk, may actually be a fault in your code (say an unclosed p tag), in which case you may spend many wasted hours trying to correct that during the testing phase. I have done this many times and it’s a huge waste of time, not to mention frustrating.

W3C Validator and JSLint

W3C Validator and JSLint

It is important that you validate all the code you’ve written, whether it’s (X)HTML, CSS or JavaScript. All of them need to be validated. The W3C has both an (X)HTML and CSS validator that are quite easy to use. The W3C does not–at the time of this writing–have a JavaScript validator. For JavaScript validation, I use JSLint.

This is not to say that validating will solve all your problems before testing. If that were the case then there wouldn’t be a need the fourth step at all. How far you go with fixing validation errors is your decision. I can certainly understand a need for invalid code in some cases (e.g. YouTube embed code), however, for the most part I prefer 100$ valid (X)HTML, CSS and JavaScript.

Note that at some point in this model, steps three and four will become intermingled and you will definitely need to cycle back and forth between the two before moving on. This is explained in the next step.

Step 4: Test

Testing is the hardest and most time consuming. The good thing is, the more you do it, the less frustrating and time consuming it will be in the future. Testing is all about ensuring that the (X)HTML, CSS and JavaScript that you built in step one displays acceptably in all your supported browsers. As mentioned above, it’s possible and very likely, that 100% valid code will not display/work the way you intended it to in all browsers. This is why testing is so important. There is little use of doing anything in step one if users are not able to actually use what you built.

At some point in testing, you will likely alter the code that you built in step one. In this case, I usually continue until editing the code until my testing is complete. After this, you will have essentially circumvented the validation step. Because of this I recommend that you go back and validate your code. This can be a cyclical process, but in the end, you will hopefully have valid code that displays/works how you intend it to.

Common Browsers to Test With

Common Browsers to Test With

The tools I use in this step are many. I have two old computers at my desk, each with a Windows XP install. One has IE6 and the other with IE7. I test for IE8 on the windows machine I primarily use. I use profiles and separate installs for Firefox and Safari testing. I have noticed some variation in display across operating systems on the same browser, so I use a coworker’s Apple to test on MACs. You can duplicate this by searching Craigslist for old computers. The computers don’t need impressive specifications because after all, you’ll only be using them to run Internet Explorer, which requires very little resources. The two computers I use were just laying around our office not being used so I got lucky. You may want to search your office for old unused computers like I did. Another option I suggest is purchasing a license of VMWARE, which will let you run a virtual computer inside your computer. This essentially gives you another install of an operating system that you can run asynchronously with your development. I used this method to test before I setup some quality assurance machines, but I found it to be resource intensive and also took up half of my screen real estate. There are several options that replicate older versions of Internet Explorer and other browsers, but I haven’t had the best of luck with those, so for professional development I wouldn’t suggest them.

Step 5: Repeat

What do you think? Is there anything different in your workflow that you want to add? Anything you disagree with? Let us know in the comments.

9 Responses to “Front-end Development Work Flow Model”

  1. Alex says:

    Same tactics used over here. But… let's at last remove that IE6 support. For God's sake, at last! It should be a B grade browser already if no Z!

  2. tommi says:

    Alex, remove IE6 support and enjoy the awkward silence when he tells you that his website looks like **** on his xp laptop. And DON'T DARE TELLING HIM TO UPGRADE, he's not going to do it.
    I hate IE6 like all sane webdesigners, but unfortunately this is a gangrene that can't be removed yet.
    A cool move would be Google showing an upgrade alert for visitors that use IE6, but that's unlikely to happen for obvious commercial and 'ethical' reasons.
    The most intelligent thing to do would be to write in the contract that the website you're going to create will work perfectly on the last browser versions, you can either offer a backward compatibility fee or show a downgraded version of the website (wich will miss cool stuff and show a "please upgrade your browser" link a la http://www.pushuptheweb.com/, which i always include in my sites)

  3. montanaflynn says:

    I am just going to provide IE6 users with a basic stylesheet.

  4. Thanks for the share. Very nice topic. Good tutoring

  5. Nice Tommi. I think its a good type of thinking. Keep it up.

  6. jl says:

    great thinking. these are rules to live by.

  7. Barney says:

    @tommi Google choose to address the problem in their own way. [http://code.google.com/chrome/chromeframe/]

    @kylerush who are you responding to there?

    I would definitely recommend VirtualBox for the purposes of IE6 testing.

    Most people can’t afford an extra machine (or can’t afford to spare any other machines); it is more of a waste of time, power and computing resources to boot a whole other hardware machine just to test on IE6.

    By downloading VirtualBox [virtualbox.org] and using one of Microsoft’s free virtual disk images with Windows XP and IE6 [http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en], you can run a completely stripped-down (and therefore much faster) machine inside your own with minimal resources consumption (my ancient 2GB RAM machine handles WinXP virtual machine with Photoshop within a WinXP host machine fine) — you can even save state on a freshly started windows instance with IE6 open and get that up with the click of a button anytime you need.

    • kylerush says:

      @barney i'm pretty firm in my belief that the correct answer here is what works best for the user. if virtualbox works well for you, then you should go with that. i prefer a separate machine to virtualization software for several reasons, but i would hardly call testing on separate machines "a waste of time, power and computing resources."

  8. kylerush says:

    Thanks, I didn't know about VirtualBox, although I already have two display and don't like giving one (or any part of it) up for testing. Also, screen real estate isn't the only issue. I don't like virtualization software dragging down my system resources. I like a separate machine to test, but to each his own.

Leave a Reply