Welcome!

Adobe Flex Authors: Liz McMillan, RealWire News Distribution, Maureen O'Gara, Yakov Fain, Keith Swenson

Related Topics: Adobe Flex

Adobe Flex: Article

Freaks and Geeks Unite Part 1

Getting dynamic requires designers and coders to work together

This past summer I decided that my courseware site needed a complete overhaul. It was, in fact, a bit of an embarrassment. As a teacher, writer, and lecturer I had been sticking my courseware and lectures notes up on a site that was designed more for convenience than anything else. After quietly suffering through the jabs of my students and my colleagues, I decided the time had arrived to bring order to the chaos.

In August 2003, I sat down with a very talented Toronto graphic designer, Shawn Butchart, and asked him, as I succinctly put it, "to give my site an enema." After a lot of the usual discussion we settled on a rather interesting design and I went to work exploring the joys and the frustrations of the world of CSS-Positioning, or CSS-p. When the redesign went live in November, it met with the approval of my students and peers and, as is normal, I thought I would live with the design for the next couple of years (see Image I). Then the wheels started to wobble.

One-third of the site was devoted to a series of tutorials and Studio MX-related articles I have written. They can be found at www.tomontheweb2.ca/MXtras/Tips_techniques.htm.

Image II shows a redesigned page - this area will grow, and I hadn't incorporated this rather important fact into the design of the site. In November of 2003 there were about a dozen tutorials. Today, a few months later, the number is approaching 30 and will most likely crack the 50 mark by the end of this year. Rather than solve a problem, I had created a bigger one.

The problem had two aspects to it. The first was the entry page listing the tutorials. There was no real organization to it. I would prepare a tutorial for the students and tack its description to the bottom of the list. This is workable if you have only a handful of tutorials. It falls apart when the number grows. Trying to find a specific tutorial, "Color Correction in Fireworks," for example, requires the user to hunt through the page. I needed to rethink this page and make it more accessible to my visitors.

The second problem was the actual process of adding a tutorial. Though I was using a "template" the actual creation of the page was a time-consuming process. The text would have to be flowed into the page; the images would have to be added; the links, if there were any, would get tossed in; and the page would be saved to the directory. The listing page would then be opened, the description and link created, and then it would be uploaded to the server. It was inefficient and, if allowed to continue, would become an administrative and site management horror show.

The time had arrived for me, to borrow a phrase from my latest book, "to get dynamic or get dead."

This two-part article will take you through how I did it. It most likely won't be pretty because Web design based upon a dynamic paradigm is an inexact science. Planning data, data flow, database choice, middleware choice, and so on are all subjective, not objective, decisions. The whole field of dynamic Web site creation is relatively new. It's only over the past few years that dynamic sites have moved into the mainstream of the industry, and the introduction of Studio MX 2004 and Macromedia's embracing of "rich Internet applications" only served to accelerate acceptance of this discipline.

I didn't try to do it by myself. My area of specialization - how Studio MX tools work together to provide a comprehensive workflow solution - is already quite large. Early in the game I made a conscious decision to understand how databases and ColdFusion work and interact with the tools in Studio MX. Still, rolling up my sleeves, digging into the code, and getting my arms "dirty" with electrons was something I chose not to do. Ours is an industry where teams of specialists bring their unique skills to bear on the task at hand. It is an industry where two polar opposites - geeks and freaks - have to learn to not only work intimately with each other, but also to speak each other's unique language.

Designers, to coin a phrase from the '60s, "the freaks," simply can't be expected to be coders. They aren't hardwired into logic. Coders, "the geeks," live in a sequential and logical universe. This is not to belittle or stereotype anyone. It is simply describing how the two groups think and approach the problem-solving process.

If a freak wants to get a cup of coffee he or she will point in the general direction of the café and say, "I am going over there for a cup of coffee." The geek will map out the route with a focus on the most efficient and logical method of arriving at the café. In the dynamic way of doing things, the most successful organizations are those in which the geeks and the freaks harmonize their unique skill sets to meet clients' needs.

This brings me to James Cullin - James is a geek. I have known James for more than a decade and, next to my book's coauthor Jordan Chilcott, he is one of the best coders I have encountered. More important, like Jordan, James understands the creative process intimately.

James and I have worked together for more than a decade teaching digital media technologies at our college's school of media studies. Our two programs - interactive multimedia and Internet management - complement each other, and three years ago we came to the conclusion that his Internet management students needed to know what I do and that my multimedia students needed to know what he does. This wasn't done for political or turf reasons. It was more pragmatic than that. Our two groups were graduating into an industry in which they would eventually have to work closely with each other, and it only made sense that they learn how to communicate and work together before they graduated.

Getting Out of the Box
When I discovered I had boxed myself in with my new design, I started looking at how to get out of the box. Over Christmas, I came to the conclusion that the only solution was to make the tutorials section dynamic. When I returned to work in January of this year, I plunked myself down in a chair in James's office and said, "I have a problem and need your help to solve it."

As is so typical of James, he listened to my problem, asked a few very pointed questions, whipped out a lined pad of paper, and said, "Let's get to work."

At this stage of the process, there is very little, if any, design work to be done. The key issue is how to incorporate the movement of dynamic data into a page composed solely of <div> tags. If you look at the structure of the page in Dreamweaver MX 2004's design view, rolling over a <div> is indicated by a red outline, as shown in Image III, around the perimeter of the <div> area. If you are used to creating pages with tables, a <div> replaces either the table or the cell of a table. This means, theoretically, a CSS-p page can actually be turned into a Dreamweaver template. The <div> tags can be placed in the Optional regions of the template and the content can flow into the editable regions of a Dreamweaver MX 2004 template that are commonly used in dynamic pages.

Though the theory is sound, I wanted to be absolutely sure I could do this. I went to Murray Summers, coauthor of the definitive book on the use of templates in Dreamweaver MX, for a second opinion. His response was rather interesting: "I like it when I look at the page's source and all I see is <body>. This tells me that I am either dealing with a rank amateur, or an experienced master!" As you can see, there is a razor-thin margin for error in this project.

When James pulled out his lined pad, he was assuming control of the first part of the process: planning the data.

Planning the Data
This step involves a lot more than simply pointing to a text area on a page and saying. "Well, the text goes here." When planning the data you have to "think like a computer" and create the database in a logical manner. This is the area where the geeks should take control. Databases are not created on the fly. They are carefully designed and planned to meet both immediate and future needs.

When planning the data consider these points:

  • Determine what is stored in the database: To the freak it would be pictures and text. To the geek text isn't an answer because, as James put it to me, "That's great, Tom. What kind of text are we dealing with here?" In the case of the project at hand the text could be two pieces of data - a headline and a brief description of the tutorial's contents on the entry page. In the actual tutorial page the text is the tutorial's write-up, headline, image captions, and links to sites using the technique.
  • Determine what each piece of data looks like: This is not a formatting question. For example, the tutorial description would be a "tinytext" field in a database. The main narrative, meanwhile, calls for the "longtext" data type.
  • Determine a model that meets your needs: Again, this is not a design issue. The model is the construction of the database, which is a collection of the fields that hold the data and the tables that contain the fields. The tables in the database will most likely contain data that is related to other fields. James and I spent a lot of time examining the various fields and tables that we will need to create.
  • Determine the relationships between each table within the database: Take the time to do this properly and you can actually consolidate your data and avoid repetition. For example, a tutorial's headline could be used in both the entry page and the tutorial page. This means one headline has two uses and, therefore, doesn't need to be reproduced. Freaks tend to call this process "getting organized" while geeks like James insist on calling it "data normalization."
  • Account for the present and the future: James intuitively understood the importance of this point. I had a vague idea and he started to focus my thinking around this one.

    Situations change as data is added or removed, and failure to consider this point at the beginning of the process will hand you a maintenance nightmare. Tutorial sites have to be current. This makes them "living pages" as new tutorials are added and old ones are removed or udated to accommodate product changes or industry best practice.

    For example, when Macromedia released FreeHand MX they included the use of the Live Effects found in Fireworks MX. A database planned to accommodate the future would be designed in such a way as to easily allow us to add this feature to a table that contains a list of filters and effects in FreeHand MX. If we didn't accommodate this kind of growth it would be difficult to graft FreeHand MX Live Effects onto a model that had them hardwired as fields in a table.

    Choosing the Database
    Once James had an idea of the data, the discussion then swung over to the choice of database. This decision was easier to make than it first appears. Because James was involved in the process from the start, the choice of database was his to make. From the freak point of view this is a godsend. I have no problems discussing the nuances and fine details of software, but when it comes to databases, this is uncharted territory. As an experienced database developer James had a personal preference, which in this case was mySQL. The reasons for the choice, apart from the fact that it's free, were that it is fast and stable, and can handle a large amount of data.

    By involving a geek like James right at the start of the process I also avoided the potential for error. The last thing you need is to plan around a database and then have to scrap the plan and any work that went into it. If the database developer is brought into the process after the fact and discovers the data plan is incorrect or you are trying to "shoehorn" one technology into another, you'll eventually have to start all over again or resign yourself to less-than-optimal performance.

    The Data Dictionary
    As James and I reviewed the plan his notepad was becoming filled with important points covered in our discussion. This wasn't because James wanted a written record, but because he was going to eventually have to construct a data dictionary. This document is the data model and is nothing more than a list of the tables and fields used to store that data.

    A data dictionary can be created using a spreadsheet, an HTML table, or a vector drawing tool like FreeHand. It should contain the following headings:

  • Field: This will be the field name in the database. (Geeks often refer to fields as columns.)
  • Type: What type of data will be in the field? Text? Time and date? Numeric? (Geeks will sometimes use the phrase "datatype" in this case.)
  • Length: How large will the field be? If it is a headline it doesn't need to have more than 100 characters. This area is generally flexible and can usually be changed at a later date if needed.
  • Description: Which data is going into the field, or how the field functions in the table. This is not a technical requirement for database design as such. But you would be foolish not to take the time to think your description through. It's helpful to think of the description in the same way you think about comment tags when creating a Web template. The better you document your work at the beginning, the easier it is to collaborate with others downstream.

    This document can quickly be created using the text, shape, and line tools of FreeHand MX and then, using File>Export can be saved as a PDF document for use by members of the team. The other alternative, if you want to remain digital, is to use Dreamweaver MX 2004's Tables feature to create the data dictionary. This page can then be posted to the group's work site (see Images IV and V).

    The Back End
    The next issue we dealt with was the "back end." This is how data gets entered in to the database using a Dreamweaver MX 2004 page. My need was succinct: "it has to be simple."

    This has nothing to do with me and everything to do with growth and use. Like James, I was looking to the future. The plan is to eventually open this section to students and faculty. Thus the back end had to be intuitive and flexible. It had to be designed in a manner that allows content to be quickly added, changed, or removed without a steep learning curve. From a design point of view, this feature, because the visitor never sees it, has to stress functionality and usability over aesthetics.

    Data Types
    The final piece of the data-planning puzzle was defining exactly which data types were needed. Based upon the current design and the existing pages this was fairly easy to identify. For the entry page the data would consist of three fields. The first is a unique identifier, called a primary key, for each tutorial, which would be an integer. A text field to hold the name of the tutorial would also be required, as well as another text field for the tutorial's description. For the actual tutorial the data would consist of fields holding the names of the JPG images for the tutorial and fields for the captions and tutorial write-up.

    On the freak side of the equation, it became pretty clear during James' questioning that the page listing the tutorials would have to change. It was not user friendly, and a more accessible design approach is needed.

    For example, new tutorials are simply tossed in at the bottom of the listing area. This is not exactly a visitor-friendly approach.

    First, I'm making the visitor's "job" terribly difficult by forcing him or her to scroll through the list looking for a particular tutorial. On top of that, the tutorials aren't identified by product. This means a student looking for my color correction tutorial would have to not only scroll through the list but also read each description. This requires an investment of time that I am sure not many visitors are prepared to make.

    The solution to this usability problem involves categorizing the tutorials by MX product. The visitor would select the product - for example, Fireworks MX 2004 - from a list. That choice would then initiate a "call" to the mySQL database and build a list of all of the Fireworks MX 2004 tutorials that include this particular categorization. In this manner, I can also look to the future. As the numbers grow they can easily be refined into subcategories (e.g., Fireworks>Color Correction>Using Levels), making the design even more accessible.

    From a design point of view this decision opens up the page by reducing the amount of content presented. It also becomes more usable and functional, designed more to meet the visitor's need for information access than my need for expediency.

    Conclusion
    As you have seen, converting a static page to a dynamic page involves a lot more than a designer pointing at an area of the screen and saying, "Text goes here; images go there." Involving a database and/or ColdFusion pro right at the start of the process will keep the project moving in a straight line toward success. These geeks, as I call them, are now an integral members of the Web development team and, rather than being regarded as adversaries, they are now collaborators.

    Making a site dynamic is a complicated process, and where the designer (freak) sees an image, the geek sees something even more important. He or she sees data, which is the raw material for dynamic site development.

    Stay Tuned
    With the planning process complete, it's time to go to work. James will handle the task of bringing order to my chaos, and I will learn that making a CSS-p page dynamic is harder than it seems. We'll document that process in Part 2.

  • More Stories By Tom Green

    Tom Green describes himself as 'teacher, author, chief cook and bottle washer.' He is an instructor at Humber College's School of Media Studies in Toronto, and is also the author of 'Building Web Sites with Macromedia Studio MX' and 'Building Dynamic Web Sites with Macromedia Studio MX 2004,' both published by New Riders.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.