Online Book Reader

Home Category

HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [339]

By Root 1412 0

padding-right: 1em;

}

.content h2 {

background-color: #A11204;

color: #FFFFFF;

text-align: right;

}

#footer {

color: #FFFFFF;

background-color: #000000;

border: 1px solid #A11204;

float: left;

clear: both;

width: 100%;

text-align: center;

}

Figure 2-6 shows the standard template with the CSS attached.

Figure 2-6: The XHTML template looks good with the CSS attached.

Building a data framework

The examples throughout this chapter assumed that a large Web project can be done in straight XHTML and CSS. That’s always a good starting point, but if your program needs data or interactivity, you probably have a data back end.

Most data-enabled site plans fail.

The reason is almost always that the data normalization wasn’t incorporated into the plan early enough, and the other parts of the project inevitably depend on a well-planned data back end.

If you suspect your project will involve a database, you should follow these steps early in the process (during the early site-planning phase):

1. Identify the true data problem to be solved.

Data gets complicated in a hurry. Determine why exactly you need the data on the site. Keep the data as simple as you can, or else you’ll become overwhelmed.

2. Identify data requirements in your site diagram.

Find out where on the site diagram you’re getting data. Determine which data you’re retrieving and record this information on the site diagram.

3. Create a third normal form ER diagram.

Don’t bother building a database until you’re sure that you can create an ER diagram in third normal form. Check Book VI, Chapter 3 for details on this process.

4. Implement the data structure.

Create an SQL script that creates all the necessary data structures (including tables and views) and includes sample data.

5. Create PHP middleware.

After the database is in place, you usually need PHP code to take requests, pass them to the database, and return the results. Most of the PHP code for the main site consists of simple queries from the database. If you can use AJAX or SSI, it simplifies the process because your PHP code doesn’t have to create entire pages — it simply creates snippets of code.

See Chapter 4 of this minibook for help on implementing these technologies.

6. Consider update capabilities.

Usually, when you have a database, you need another part of the site to allow the client to update information. It’s often an administrative site with password access. An administrative site is much more complex than the main site because it requires the ability to add, edit, and update records.


Fleshing Out the Project

If you completed all the steps in the preceding section, it becomes relatively easy to create the page: It’s simply a matter of forming the copy into the templates you created, tying it all together, and launching on the site.


Making the site live

Typically, you do the primary development on a server that isn’t in public view. Follow these steps to take the site to production:

1. Test your design.

Do some usability testing with real users. Watch people solve typical problems on the site and see what problems they encounter.

2. Proofread everything.

Almost nothing demolishes credibility as quickly as sloppy writing. Get a quality proofreader or copy editor to look over everything on the site to check for typos and spelling errors. If your page contains a specific type of content (technical information or company policy, for example), have an expert familiar with the subject check the site for factual or content errors.

3. Prepare the online hosting environment.

Be sure that you have the server space to handle your requirements. Make a copy of your database and test it. Check the domain name to be sure that you have no legal encumbrances.

4. Move your site online.

Move the files from your development server to the main server.

5. Test everything again.

Try a beta test, where your page is available to only a few people. Get input and feedback from these testers and incorporate the best suggestions.

Return Main Page Previous Page Next Page

®Online Book Reader