Dec 31
I don’t have any Tracy Chapman albums
, but her new site has me sitting happily listening to her tunes while I color the flash world the developers built.
Switch colors in the upper-right hand corner. Then click in the outlined portions to fill that area with your selected color. It’s a digital paint by number! I haven’t had this much fun since grade school’s Van Gogh by numbers.
An excellent facet I appreciate in the elastic webby world in which we web developers should live: maximize your screen! New portions of the world are revealed as you increase your window size, and each page of the site features a different scene to paint. This is a fantastic usage of flash in a media based site: sparse enough to be unobtrusive to the information you want to gather, engaging enough to keep the user on the site, and clever enough to bring users back for another round. A brilliant marketing, design, and development campaign.
Popularity: 15% [?]
Posted in Flash | No Comments »
Dec 30
FeedBurner not only provides amazing skinned RSS feeds, but it also will take your content, manage a list of subscribers, and email the content to the subscribers. Hello! I love this beast!
Make sure you don’t miss a single slice of codey goodness! Subscribe! If subscribing by RSS isn’t your thing, you can subscribe for the new Neatly Sliced email updates using the form below. I tested this on my Yum food blog, and it seems to work quite nicely.
I also promise you, no spam for you from me from subscribing. You can unsubscribe at any time.
On a side note, aside from the unavoidable inline styles and Javascript for the cut and paste snippet form, the code integrity of FeedBurner’s snippet is decent! Form fields are children of block level element buffer between the field and the form tag, all tags are properly closed… I’m quite pleased with you, FeedBurner.
(more…)
Popularity: 14% [?]
Posted in News | No Comments »
Dec 19
Often a CMS will store its content in a database as structured XML. The easiest way to display this data is often through a short XSLT, which ColdFusion can render a transform using the XmlTransform() function, introduced to ColdFusion in ColdFusion MX.
XSLT Parameter Usage
ColdFusion MX 7 introduced the ability to include parameters to the transform. Parameters allow you to pass in values to be rendered by the XSLT that are not included in the original XML. Following is an example of how an external parameter might be used with the following XML and XSLT:
XML:
-
<Content>
-
<Title>My Title</Title>
-
<Hyperlink>/articles/my-article-name/</Hyperlink>
-
</Content>
XML:
-
<?xml version="1.0"?>
-
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
<xsl
utput method="xml" />
-
-
<xsl:template match="//Content">
-
<xsl:param name="baseWebUrl" />
-
<a>
-
<xsl:attribute name="href">
-
<xsl:value-of select="$baseWebUrl" /><xsl:value-of select="Hyperlink" />
-
</xsl:attribute>
-
<xsl:value-of select="Title" />
-
</a>
-
</xsl:template>
-
</xsl:stylesheet>
Injecting a Parameter
According to the documentation at the Adobe Knowledge Base, parameters are "a structure containing XSL template parameter name-value pairs to use in transforming the document. The XSL transform defined in the xslString parameter uses these parameter values in processing the XML."
Usually when I create structures in ColdFusion, I use the familiar dot shorthand notation:
CODE:
-
<cfset parameters = StructNew()>
-
<cfset parameters.favoriteKitten = url.kitten />
-
<cfset parameters.numberOfKittens = numKittens />
-
<cfset parameters.baseWebUrl = application.webBase />
-
<cfset MyXmlContent = XmlTransform(MyXmlDocument,MyXsltDocument,parameters)>
Using this method, my code would consistently fail to pass in any of the parameters. Careful reading of the ColdFusion 7 comments for the XmlTransform function reveals to us that we must use associative array notation for parameters to work properly. It's as easy as switching the assignation of keys in the structure from dot notation above, to the associative array notation below:
CODE:
-
<cfset parameters = StructNew()>
-
<cfset parameters["favoriteKitten"] = url.kitten />
-
<cfset parameters["numberOfKittens"] = numKittens />
-
<cfset parameters["baseWebUrl"] = application.webBase />
-
<cfset MyXmlContent = XmlTransform(MyXmlDocument,MyXsltDocument,parameters)>
Structure Notation Reasoning
Why is this the case? Why should it make a difference? Quite likely, as the commentor noted in the documentation, it is due to the syntax of ColdFusion. XML and XSLT allows for the "-" character to be included in variable names. Instead of baseWebUrl, I could have named the parameter base-web-url. Using ColdFusion and dot object notation would have resulted in <cfset parameters.base-web-url = application.webBase />, which obviously would result in an attempted mathematically equation and a ColdFusion error.
So, just remember, don't use dot notation! Use associative array notation, or if you wish, the StructInsert() function to add your structure keys.
I hope this saves you at least half of the hair-tearing-out that I endured.
Popularity: 9% [?]
Posted in ColdFusion | 2 Comments »
Dec 12
Lincoln got a new MacBook Pro and let me tell you, I am drooling in envy. That machine is so slick and streamlined. I almost regret repairing my own MacBook Pro rather than replacing it after my prior water fiasco (regarding which I am, at this very moment, on the phone with AppleCare regarding random power fluctuations).
The glossy screen is a lot nicer than I imagined. Due to the brilliant architecture, it seems a lot thinner, as the edges bevel from closer to the center. The older MacBooks were far more squared off.
The magnetic closing mechanism is much nicer than the button on the old MacBook Pro. It feels more secure, and is resistant to damage. My button has marking damage from where my nail has worn away the finish.
The speaker quality seems much nicer than my MacBook Pro. The entire case feels more solid, due to the new design - all cut from one piece of aluminum!
Apple even moves forward with a green screen - LED backlighting to cut down on energy draining. Expected battery life? Five hours. Highly recommended.
Popularity: 8% [?]
Posted in Apple | No Comments »
Dec 07
An Event Apart 2008, Day 2, 5:00pm - 6:00pm
Read the previous talk in this series, Designing the Next Generation of Web Apps by Jeff Veen, or view An Event Apart’s Table of Contents
A Panel Apart
Eric Meyer, Jeffrey Zeldman & Special Guests (Jeff Veen and Cameron Moll)
- Take ownership of browser standards? Everyone is like, uh, what?
- W3C has nothing going on right now: Eric Meyer and Jeff Veen
- Eric: JS is the only way that we're going to get advanced CSS3 standards
- JZ: being a part of the w3c is kinda weird, because it's so time consuming, you would need a company to pay you to work at the w3c, but then you wouldn't be into design anymore because you've spent so much time with w3c. Then, you'll be discouraged because there is so much overhead involved in being a part of it, hatemail, mailing lists, it's like going to the DMV. (not verbatim, in my own words)
- What defines an image from being content apart from presentation?
- EM: if I would need alt text for it, then it's content, otherwise presentation because decorative. "If I need alt text so that Google can pick it up, then it needs to be content"
- JZ: like Cameron Moll's site, the flourishes would be presentational content
- Do you have any advice about designing for phones?
- CM: Ask the boss about the need for this. What is the need? Don't go build some mobile web piece because it's the next big craze, but what will people need? People with blackberries aren't going to want to be browsing like an iphone user will.
- JZ: Does it need to be exactly the same as the site? Does it need to be like NYTimes design that makes it easy to browse and look at articles? Do you want it like Flickr where you just need to see recent activity, see a few basic things? Most the cool things with Flickr happen with Ajax that a real web browser is required, so you don't want the same behavior. Thus, there is a simpler UI. Let's make the phone have maybe a different experience, maybe there's a call to action on the phone, and take away the rest of the website. A call of action could be more important than making it look pretty on the phone.
- JV: got off the blue line and couldn't remember how far the Sheraton, and they didn't even have the address on the home page. Silliness. This is a perfect time to make a phone version.
- How do you deal with not having a copywriter?
- JZ: Happy Cog does content development and IA at the same time, they sneak in copy, unless the client understands that on his own. Good writing makes good interface, they make it part of the IA so they can have clean, good, happy copy. Happy cogs
- Know yourself, your strengths, who the users are, and what KIND of language/reading level/existence of humor/etc. Client may realize that THEY CAN'T write that and so they'll want a writer then. They put it IN their budget.
- CM: He would just slip those things in wherever possible, and it usually went live that way. Now in house, they have an entire translation department.
This completes the An Event Apart 2008 notes series. View the Table of Contents to ensure you have completed your reading.
Popularity: 8% [?]
Posted in CSS | No Comments »
Dec 06
Awwwwwww this appeals to my inner mac-lover and my inner cat-lover.
Popularity: 8% [?]
Posted in Apple, Flickr | No Comments »
Dec 04
Building an ASP.NET site, I needed to use a server-side CheckBoxList control. Much to my irritation, the server control output each <input type="checkbox" /> in a tr of a table containing the entire list. I thought, how awful!
Fortunately, I found a way for the server control to quickly output each input in spans rather than table rows: CheckBoxListId.RepeatLayout = RepeatLayout.Flow
The default value is RepeatLayout.Table. Now my checkboxes are cooler.
Popularity: 6% [?]
Posted in ASP.NET | 2 Comments »