Making The View: Part 7

OK, so let's get interesting. We've covered creating a base template in XHTML, properly divided our display declarations from our content by using Cascading Style Sheets, and pinpointed some areas within the base template which should be dynamic. Finally, in our previous tutorial, we brought all of this together in a reusable template, which we demonstrated by using it as a custom tag. Now we're going to really start having some fun, by redefining our view within some frameworks. Now, I'm no expert. There are probably a few dozen ways to properly handle the view within the different frameworks, so any other suggestions are welcome as always. We're going to start off with Model Glue:Unity, while I catch up on the changes to Mach II and Fusebox.

[More]

Making The View: Part 6

There is more than one way to skin a cat. In our last tutorial I showed you an old, tried-but-true method for including page headers and footers. But, every ColdFusion developer knows that there are many different ways. In this tutorial we'll go over creating the same header and footer using custom tags.

Custom Tags provided a huge level of power to ColdFusion Markup Language, because it gave us the ability to write simple and elaborate code snippets that could be placed in a centralized repository for consistent reuse. One way to think of them is like an include, but with expanded functionality. Let's get started.

[More]

Making The View: Part 5

So, now anyone following along has had plenty of time to come up with a few items they might include in a page template, variables that might change but layout consistent. Let's take a look at how we might apply the same layout from several different programming perspectives.

First I think we'll start off with basic includes. This is a technique used over and over again, and something that might apply in many different web development languages, but we'll just use trusty old ColdFusion. Let me point out something you don't want to do. Do not place your header and footer includes inside your Application.cfm (or cfc) or OnRequestEnd.cfm. Doing so would strip you of higher levels of control of your output and leave you in the wind if you require alternate displays on different pages, plus could cause you issues should you begin to use AJAX in your applications.

[More]

Making The View: Part 4

OK, back to it. It's been a little while, so you may want to go back and review parts 1, 2 and 3 before continuing. At this point we've created a very basic structure, giving you a basic, standards compliant document and stylesheet. But, you still don't really have any content, just a header with a bogus title, a spot for a menu, and a container for content and a sidebar. Where to next?

[More]

Making the View: Pt 3

For those of you coming in late, you may reference the related entries to catch up (quick reads, I promise).

Last time we began filling our template and creating our stylesheet. Just some basics, where we defined a primary content area.

[More]

Making the View: Pt 2

Ok, before we continue lets's pick apart our template a little.

view plain print about
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3<html xmlns="http://www.w3.org/1999/xhtml">
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6        <title>Untitled Document</title>
7    </head>
8    
9    <body>
10    
11    </body>
12</html>

We defined the doctype of our page as a transitional XHTML 1.0 document with english as the language. The doctype declaration is a required element of any well-formed XHTML page, and references the appropriate DTD (document type definition) for the content of the document.

From W3Schools:

DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.

[More]

Making the View: Introduction

Years ago, when I returned to development after a short haiatus developing business automation systems, I began re-learning web development. Things had changed a little. HTML 2.0 was now HTML 4.0. New tags were available, old tags had been deprecated, JavaScript had matured, and this new thing called CSS was just beginning to catch on. And, oh yeah, I was also learning ColdFusion (4.0 at the time).

Over the years I've seen a trend. There are a lot of designers who've learned some development, but fewer developers have learned design.

[More]