Contents
Home Products Books Recipes Ingredients Weblog Forums Contact Home RSS Feed
Blog Archive
*

Wednesday, August 27, 2003

Mailing Lists 5:06 PM
Someone emailed me last week, asking how I created the subscription form on the Newman Zone homepage. Actually, it's a lot easier than you might think. These days, most mail servers include a list server that enables you to create and manage your own mailing lists and/or discussion groups. If your hosting provider doesn't offer this, you can always use a free service such as Topica or Yahoo! Groups.

Once you've set up your list, you can usually add/edit/remove subscribers via email. For instance, to unsubscribe from a Yahoo! Groups list, you would send a blank message to:

pastry_chefs-unsubscribe@yahoogroups.com

Sometimes, you have to place the command in the body of the email:

set mode digest pastry_chefs-list

At this point, creating a subscription form on your web site is simply a matter of sending the appropriate email to the list server. Here's the code for the subscription form on Newman Zone:

<form action="subscribe.asp" method="post" name="form1" target="results">
<input name="email" type="text" value="Enter email address" onFocus="this.value=''" />
<select name="command">
<option value="sub">subscribe</option>
<option value="unsub">unsubscribe</option>
<option value="digest">digest</option>
<option value="standard">standard</option>
</select>
<input type="submit" name="Submit" value="Submit" />
</form>
Pretty straightforward. On the response page, subscribe.asp, I simply call the following sub procedure:

Sub MailingList(Email, Command)

If Email <> "" Then 'send email

Select Case(Command)

Case "sub"
strBody = "subscribe pastry_chefs-list " & Email
Case "unsub"
strBody = "unsubscribe pastry_chefs-list " & Email
Case "digest"
strBody = "set mode digest pastry_chefs-list"
Case "standard"
strBody = "set mode standard pastry_chefs-list"

End Select

'Send CDO NewMail
Dim objCDO
on error resume next
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = Email
objCDO.To = "yourlistserver@yoursite.com"
objCDO.Subject = ""
objCDO.Body = strBody
objCDO.Send
Set objCDO = Nothing
If Err Then 'Create error variable
strError = Err.Description
End If 'End check for errors

End If 'Email <> ""

End Sub
Notice that the sender of the email is the visitor who submitted the form:

objCDO.From = Email
At this point, most list servers will send an additional message, asking the user to confirm that she wanted to subscribe, unsubscribe, change to digest mode, etc. In my experience, most mailing lists make it too difficult or unintuitive to change your subscription options. If nothing else, creating a subscription form avoids the dreaded post: "Get me offa this list!!!!!!"

Comments []

*

Tuesday, August 26, 2003

Studio MX 2004 7:54 PM
As you undoubtedly know by now, Macromedia has announced the impending release of Studio MX 2004. For some, this upgrade won't seem as sexy as Studio MX circa 2002, but that's largely because most of the improvements are behind the scenes. (For more on Studio's new features, take the tour.)

What most excites me about this release is the announcement of Flash MX Professional 2004. Over the past year, I've come to regard Flash Remoting as the future of the Internet. Clearly, with a version of Flash aimed directly at developers, Macromedia is banking on the widespread acceptance of "rich Internet applications."

As with most product upgrades, expect a few growing pains. For instance, I was very surprised to learn that many of the Flash components included in the DRKs are not compatible with Flash MX 2004 (see the following Flash TechNote). The good news is, ActionScript 2.0 "supports object-oriented programming and a more robust, ECMA standards-compliant model, making it more familiar to experienced Java programmers." In addition, Flash MX 2004 offers limited support for CSS, which is great news to anyone who uses HTML text fields in Flash. In another surprising turn of events, Macromedia's Data Connection Kit (a.k.a. Firefly) is no longer for sale. Instead, you'll find an enhanced version, called Data Connector Components, in Flash MX Professional. According to Macromedia, "it is highly recommended that existing [Firefly] applications are rebuilt to take advantage of the new architecture and features." I know the Studio upgrade isn't cheap, but I can't wait to get my hands on Flash MX Professional. As far as I'm concerned, this marks the beginning of the end of the hypertext-based Internet.

Comments []

*

Thursday, August 21, 2003

I'm Fixing a Hole 10:39 AM
What is it with Microsoft? Two more Critical Updates and a SQL Server patch? Why do I feel like I'm sticking my finger in a dam to hold back the flood?

Unfortunately, not even Macromedia is immune: they just released a Dreamweaver patch to address a security issue with server behaviors, including two that shipped with DRK2 and DRK4. For a list of the server behaviors affected, see this TechNote.

After patching Windows, updating my virus definition files, and deleting dozens and dozens of SoBig emails, it's a wonder I get any work done at all. In India, Linux is apparently giving Windows a run for the money. Even the president advocates using open source software rather than Windows. Can you blame them? A Windows web server requires licenses for Windows 2003 Advanced Server, SQL Server, Media Server, Exchange Server, etc. On a Unix box, everything is free. Of course, Windows comes with lots of extras, like Blaster, LovSan, Nachia, Slammer...

At this point, I'm seriously considering making the switch to OS X. I'll miss those collapsible panels in Dreamweaver and Flash, though.

Comments []

*

Monday, August 18, 2003

ActionScript Prototyping 7:20 PM
One of the best features of Dreamweaver is its extensibility. If it doesn't do something, you can write an extension. With the introduction of the UI Components Sets, a similar extensibility has been brought to Flash MX. However, there's another way to extend Flash that's not quite as obvious: prototyping.

The prototype object enables you to extend the methods and properties of Flash objects. For example, here's a pithy little prototype from ActionScript.org that adds a searchReplace() method to the String object:

String.prototype.searchReplace = function(find,replace) {
    return this.split(find).join(replace);
}


Usage:

myString = "Flash Remoting sucks!";
trace(myString);
myString = myString.searchReplace("sucks","rules");
trace(myString);


I adapted this prototype to create the Flash contact form on Newman Zone. For more prototypes, here are some of my favorite sites:

  • Prototype

  • ActionScripts.org

  • Sephiroth


  • Incidentally, the prototype object is not unique to ActionScript. It is also available in JavaScript 1.1 and higher, which is not surprising, since both ActionScript and JavaScript are based on the ECMAScript standard.

    Comments []

    *

    Thursday, August 14, 2003

    Porting Pollster to IIS 6:03 PM
    Oh, the joys of shared NT hosting. I spent the better part of a day getting Pollster to work with IIS and SQL Server on my development computer. I had to change some code in two of the CFCs, and write a SQL script to create the database, but for the most part it was pretty straightforward.

    Then I uploaded it to my ISP. Turns out, CFC dot notation doesn't work on multihomed servers. The solution, allegedly, is to create a ColdFusion mapping that points to your folder (e.g., C:\Inetpub\wwwroot\yoursite\www). I paid my host $15 to create the mapping but still no joy. At this point, the only workaround I can devise is to replace all the CFC dot notation in the Pollster app with relative paths. Based on trial and error, this works on a multihomed server:

    <cfset pollEntity = createObject("component", "pollster/components/entities/Polls")/>

    but this doesn't:

    <cfset pollEntity = createObject("component", "pollster.components.entities.Polls")/>

    Unfortunately, you cannot specify relative paths above the current folder, so this doesn't work either:

    <cfset pollManager = createObject("component", "../managers/PollManager")/>

    As a result, the only way to get Pollster to work on IIS — that I'm aware of — is to move all the Pollster CFCs into a single folder and find/replace every reference. If anyone knows of a better solution, I'd like to hear it.

    Comments []

    *

    Tuesday, August 05, 2003

    ColdFusion MX 6.1 Upgrade 9:44 PM
    In my previous blog, I mentioned some additional steps required to install Jimg on ColdFusion MX. Turns out, this workaround isn't necessary if you've installed Updater 3 or ColdFusion MX 6.1.

    Speaking of which, I just upgraded to ColdFusion MX 6.1 (a.k.a. "Red Sky") and everything worked without a hitch. Even my data sources survived (whew!). According to Ben Forta, ColdFusion MX 6.1 is "160% faster than ColdFusion MX." The installer is simpler and more reliable as well, so there's no excuse not to upgrade.

    Here are a few things you can do to ensure things go smoothly (this assumes you're upgrading the Standalone version of the Developer Edition):

    By the way, the 6.1 Updater is a whopper at 150+ MB (I'm glad I have broadband). So far, all of my code runs normally on 6.1. The only difference I noticed is the way dates are getting serialized back to Flash Remoting.

    Here are a few more links to help you with the install:

    And once you're done: Enabling Web Services Access for Flash Remoting. Enjoy!

    Comments []

    *

    Home  |  Products  |  Books  |  Recipes  |  Ingredients  |  Weblog  |  Forums  |  Contact