May 30, 2003
Useful CF Links
The ColdFusion Administrator home page has a lot of useful links on it. But you have to log in to see them. Here's a useful page on macromedia.com that provides the same links.May 29, 2003
Extending the CF Administrator
A little-known but useful tip: you can add a CUSTOM EXTENSIONS menu item to the left navigation of the CF admin containing your own links. In the/CFIDE/administrator/ directory, create a file called extensionscustom.cfm and put in your links, separated by <br />. Each link should have target="content" so the result of the link will show up in the main frame within the administrator.
It's listed deep within the ColdFusion 5 Release Notes but I don't know if it's mentioned anywhere else.
Have a Cookie!
Something that continues to surprise me is the reaction some people have toward cookies. I like cookies, they help provide a more streamlined web browsing experience when I'm surfing. Some people, however, go to great lengths to either block cookies or examine every cookie carefully - they install various cookie management tools and then complain to webmasters when a site doesn't work properly (because the site relies on cookies).John Lenker of Invioni has this to say about cookies:
"I know that there are those that will tell you that using technical devices such as cookies to track information about patrons violates their privacy concerns, but I think that's a bunch of hooey. If the motive of the Web enterprise is to be helpful, customers will quickly learn that their trust will be rewarded by superior service."That's taken from the May issue of Elastic Satellite (PDF) which Invioni produces. It won't surprise you to learn that I agree with John - I think cookie management software is "hooey" too.
May 27, 2003
In-flight WiFi
After all of the scare stories about using wireless-enabled equipment such as cell phones while flying, it seems that the ability to use 802.11b while in the air is closer to reality after a trial by Lufthansa and Connexion. This seems like a very sensible option for business travelers, especially if they'd just figure out how to give us enough room in coach to open our laptops without risking the screen being crushed by the person in front reclining...RV Parks & WiFi
As someone who is looking forward to retiring one day and living in an RV, touring America, I was pleased to read that the RV parks of the future will be equipped with WiFi.Microsoft & Peru
It's old news but only yesterday did I finally get to read the Peruvian congressman's response to Microsoft about the State Bill to require "free" software for State systems. It's an interesting and well-reasoned argument and makes the point that the decision is not necessarily about cost per se. It will also be interesting to see how this week's vote in Munich goes on the same issue. Let me also be clear that this is not an anti-Microsoft issue: the question at heart is whether certain sectors are best served by proprietary software or open software (hence the lack of mentions for Apple in much of this, despite their close work with the Open Source community on portions of the operating system and various development tools).Update: Munich voted to migrate to Linux and OpenOffice from Windows and MS Office. I'm pleased to see that: Open Standards and competition are both Good Things(tm).
May 26, 2003
Rural WiFi in the UK
WiFi continues to spread in the UK with a pay-as-you-go option for WiFi Broadband in rural areas.May 23, 2003
Gartner: Living Without Microsoft
The Gartner group has some interesting research about alternatives to Microsoft which was mentioned on the Living Without Microsoft website recently. No matter where you stand on the issue, I think it's useful to be well-informed about the pros and cons.May 22, 2003
Why ColdFusion for J2EE Development?
Ben Forta has a great presentation online about why J2EE developers should look at ColdFusion MX as a powerful RAD tool for building J2EE-based web applications.May 21, 2003
DENG Browser Beta Announced!
The first public beta of the DENG browser for Windows is available. This is essentially a wrapper around the DENG components that render XHTML, CSS etc within Flash.As Claus noted in a comment, there is now a Mac version available! You can download the HQX file. It actually does a halfway reasonable job of rendering several of the pages on my site - even though it isn't really intended to be a full-blown web browser. I will probably work on those pages that fail to render to see if I can fix whatever is choking DENG. Awesome work Claus et al!
No Anonymous Comments!
Just a reminder: if you comment on a post here and use a fake contact address, I will delete your comment out of hand. Yes, that means you "x" a.k.a. x@x.com! It also means you bork@yahoo.com :)Learning About Macromedia Products - On Demand
Wouldn't it be great if you could learn how to use Macromedia products by having someone talk you through various tasks and show you "how", whenever you wanted, at your own pace? Check out Macromedia On Demand. These free, online seminars will help you get started and evaluate the products so you can become productive more quickly. I ran through a few of the ColdFusion MX sections and I was impressed. The seminars seem to be well-paced and very clear, with Closed Captioning available throughout (great for when you have to have the sound off, as well as for the hearing-impaired!)Apart from the sheer usefulness of these seminars, On Demand is a great example of how Flash can be used for educational material (and the back end is powered by ColdFusion MX of course).
May 19, 2003
CF Directory Structures
Tim Buntel's DevNet article about the directory structure of the CFMX Pet Market application refers to my blog and a caveat I posted about directory naming for Web Service CFCs. I mention this again here because Tim's article just refers to my blog's top-level URL rather than to the actual post - this will help readers locate the entry!Blog Software in CFML (again!)
I got quite a response to my recent post on this subject so I've put together a fledgling Blogging in ColdFusion page that lists the ones I know about. Let me know of others and your experiences with them.WiFi & a Pint in the UK
According to The Register, 1,000 British pubs are going wireless soon. The push for WiFi is very aggressive in the UK which is encouraging and the relatively small size of the country should allow for extensive WiFi at relatively low cost - and relatively quickly. Back in '96/'97, I worked at Vodafone (Verizon in the US) on the first pay-as-you-go cell phone system. We had infrared data exchange between cell phones and near 100% coverage back then. Web-enabled phones appeared shortly after. The enormous scale of the US makes it much more expensive to implement this sort of infrastructure but I hope it does happen here. I look forward to WiFi on BART so I can be more productive on my commute - although I'm not sure how productive I'd be with a pint in my hand!May 17, 2003
Blog Software in CFML
In the continuing search for blogging software written in ColdFusion, I was made aware of this CFXML Blog project website. It uses CFCs and stores blog data in XML so the source code is an interesting example of what ColdFusion MX lets you do. The source code is in Italian which might be a bit of a culture shock but it's still pretty easy to follow the code. The resulting blog looks good, is W3C compliant and seems to be pretty fast.Comparing Haskell & ColdFusion
I enthused about Haskell without giving any examples of the language and, since many folks have never seen any Haskell code, I thought I'd show how it compares to CFML.Let's take a simple example - we have a list and we want to apply a transformation of some sort to every element. Perhaps we have a list of strings and we want a list of their lengths, e.g.,
"This,is,a,list" would produce "4,2,1,4". This is pretty simple to do in CFML. Now let's suppose that we want to write a UDF to do this transformation - for arbitrary lists and arbitrary transformations - mapping a transform (function) across a list. We'll call the function map and it will take two arguments: a function to perform the transformation and the list to transform. If we have a function square() that returns the square of its integer argument, we want to be able to say map(square,"1,2,3,4") and get back "1,4,9,16". Here's the CFML for map:
function map(f,l) {
if ( l is "" ) {
return "";
} else {
return listPrepend( map( f, listDeleteAt(l,1) ), f( listGetAt(l,1) ) );
}
}
Note that I'm using recursion. The logic of the UDF says "if l is an empty list then return an empty list, else return f applied to the first element of the list followed by the list obtained by mapping f across the remainder of the list". The order of arguments for listPrepend make the code read rather strangely but, trust me, that's what the UDF does.
Given a few simple UDFs, we can try some things out:
function square(x) { return x * x; }
function length(x) { return len(x); }
sq = map(square,"1,2,3,4,5");
ln = map(length,"This,is,a,list!");
We have to define a wrapper for the len() function because we can't pass built-in functions into map() directly. Try it out and convince yourself that it works... Try mapping a few more functions across various lists...
Once you're comfortable with that, we'll look at the equivalent in Haskell. The first thing to know is that Haskell is a typed language so you declare each function's 'type signature' first. However, let's look at how
map() would be defined in Haskell before we look at its type:
map f [] = [] map f (x:xs) = (f x) : (map f xs)In Haskell,
[] is an empty list and (x:xs) is a list that begins with x and has xs as the rest of the list. You can often remove the conditionals (if/else) by declaring multiple patterns for the function arguments. Trust me that this is equivalent to the ColdFusion UDF above!
Now let's look at the types involved. The second argument to
map() is a list of something (a) so we designate that with [a]. The first argument is a function that takes an argument of one type (a) and returns a result of a possibly different type (b) so we designate that with a -> b. The result of map() is a list (of type b). map() is therefore declared:
map :: (a -> b) -> [a] -> [b]I'll probably post some more articles exploring Haskell and comparing it with CFML in due course.
When cfobject and createObject() are disabled
If you're on a shared host, you might find that your hosting company has disabled cfobject and createObject() so that you can't instantiate Java objects. In ColdFusion MX, you can call getClass() on any simple expression to object an object of type Class. From that you can load the class for any other type, using forName("my.package.MyClass"). Once you have that, you can instantiate the class using newInstance() as long as it has a default constructor:
x = 0;
classObject = x.getClass();
myClassHandle = classObject.forName("my.package.MyClass");
myClassObject = myClassHandle.newInstance();
If your class does not have a default constructor, you have to jump through a few more hoops. First, you have to get the appropriate constructor (getConstructor(Class[] parameterTypes)) which means you have to construct an array of the appropriate Java class objects. I'm not going to go into that today but if folks want me to some code, I'll write it up and post it (otherwise, it's an exercise for the reader!).
An Architect's Fusebox
Without changing very much at all, I've wrapped my blog in Fusebox. If you click around, you'll see all the links are now fuseactions. There were two parts to making this happen: some PHP Fusebox changes and some Movable Type template changes.The PHP changes were simple: add a new circuit ("blog"), add a new switch file in that circuit (for actions "main" and "archive" - the latter accepts either "category" or "month" as an argument), override the default layout (the blog circuit sets a flag
$full_layout_done which the site's default layout checks to decide whether to add the header and footer).
The Movable Type changes were also fairly simple: in each template, replace links to category archives, monthly archives and individual posts with the equivalent Fusebox URL. This was rather tedious but fairly straightforward.
The fuseactions simply treat the HTML files generated by Movable Type as display fuses and include them!
Haskell
About twenty years ago, I was doing my PhD in "Functional Programming Languages : Techniques and Implementation". My interest in functional programming persists today, even though those languages never really made it to the mainstream. My experience with functional languages informs my design and implementation today, just as my decade of OO experience does. One of my colleagues has recently discovered references to functional programming on the web and has been asking me about subject. I pointed him at a few references but it really reawakened my interest in the subject too. Back in the day, I designed and implemented my own functional language (SURE) so I searched the web for free downloads of functional language systems. Miranda was my first choice but seems to be only available as an educational tool (and perhaps a commercial product?). The next choice was Haskell. Named for Haskell B Curry, this was pretty much a de facto standard. More to the point, it's still alive and kicking today. There are several compilers and interpreters available and a lot of freely available documentation, including this wonderful tutorial. I downloaded the source of the NHC98 compiler and, after a few false starts due to 'make' version compatibility, I compiled the compiler using the C sources. Then I compiled the compiler using itself (the NHC98 Haskell compiler has both a C bootstrap and a primary Haskell source). That's about where I am right now. I'll be writing more about this once I've got everything compiled and installed.Why is this of any interest to ColdFusion developers? For the same reason that Java and OO is of interest - it broadens the mind and teaches new ways to tackle problems.
May 16, 2003
Remoting? Web Services?
John Dowdell's blog mentions this interesting article on builder.com that compares Remoting and Web Services... not Flash Remoting, .NET Remoting. JD wonders what the point of the article is and why you'd choose Web Services for Internet applications but Remoting for intranet applications. Having read the article, I'm inclined to agree with him. Why not use standards-compliant communication internally? We are starting to expose our internal systems as Web Services - it makes it much easier to integrate disparate systems. Of course, we don't have a homogeneous Windows network so we're interested in interoperability - we want to be able to expose services on back end systems and consume them from our ColdFusion servers; we want to be able to expose services to specific third parties. That requires that we use open standards compliant methods where possible. I can't imagine why anyone would be comfortable locking down their internal systems in a way that prevented possible integration with third parties in the future - you never know when you might want to outsource part of your operation!CFMX & Mac OS X
Macromedia's DevNet is fairly Mac-heavy right now, including an article on installing CFMX on Mac OS X. The new Flash Detection Kit is also heavily featured.CFLib.org RSS Feed
Seen on Ray Camden's blog, CFLib now has an RSS feed describing new utilities on the site.May 15, 2003
CFMX : Coming Up
The Twin Cities ColdFusion User Group was host to Ben Forta recently and he talked about the next CFMX release. A lot of enhancements coming down the pipe. Stay tuned for more information soon!May 14, 2003
Royale : Flash for Programmers?
The FlashCoders mailing list has been a-buzz with discussions about what Royale might or might not be, spurred on by the recent InfoWorld interview with Rob Burgess where Royale is mentioned. Much of the discussion has been about what people imagine Royale might actually be and there has been some interesting speculation. So far, about the only details that have been publicly released are:- Royale is a new server product
- Royale lets you build Flash applications using XML
- Royale provides (traditional) programmers with an alternative to the visual / timeline idiom of the Flash MX authoring tool
May 12, 2003
Mozilla 1.4b
I just installed Mozilla 1.4b for Mac OS X. The bug, introduced in version 1.3, that broke Flash Remoting support is still evident in the latest Mozilla mach-O build which is a bit disappointing. So I uninstalled it and I'll stick with 1.2.1 which does support Flash Remoting, although now that Safari supports Flash Remoting (in Beta 2), I only use Mozilla to test rendering of pages - Safari is my primary browser. My wife, fed up of pop-up ads on the web, just switched from IE 5.2.2 to Safari Beta 2 and is another satisfied customer...May 11, 2003
Fusebox 4 & Fusebox MX Forums
The Fusebox(.org) site has new forums specifically for discussing Fusebox 4 and Fusebox MX. If you're following Fusebox development, you should check out the new forums.May 09, 2003
JavaOne[sf2003]
As a follow-up to my comments on the forthcoming J2SE 1.5 release, several sessions at JavaOne 2003 (San Francisco, June 10-13) will cover generics and other new language features. I signed up for JavaOne yesterday and planned out my schedule today (nice touch - the website lets you download your schedule as XML!). Mostly I'll be following the performance, tuning and garbage collection topics, with a liberal sprinkling of Web Services and a little Mac OS X. See you there?J2SE 1.5 (Proposed)
Joshua Bloch talks about new language features in the forthcoming 1.5 update to Java. I'm very pleased to see "generics" finally making it into the language - I was heavily involved with C++ templates during the ISO standardization process and I'm a big fan of generic programming so I think this is a big step forward for Java. I also like the extendedfor syntax for avoiding Iterators.
Living Without Microsoft
As I've commented a few times here, my laptop is pretty much a Microsoft-free zone. I found out yesterday that a Living Without Microsoft website exists with reviews of non-Microsoft software and some articles about alternatives to Microsoft Office / Windows / etc. As the site points out, it isn't a Microsoft-bashing site (nor an anti-Bill Gates site), it's just there to provide information about how and why you can "break the Microsoft habit".Sean Neville on RIAs
The Server Side has a video interview with Macromedia's Sean Neville about Rich Internet Applications that is worth checking out. There's a full text transcription too if you don't want to deal with the video.Longhorn Graphics
I picked up on this from Jesse Ezell's blog - under the heading of Microsoft Innovation. It's a first look at Longhorn's windowing and desktop graphics. I got to the end of the article and felt a little bit 'so what?' about it... after all, Mac OS X already shows scalable thumbnails of minimized windows and has various fancy effects for maximizing / minimizing windows. Not so much "innovation" as "catching up" or am I just missing something?May 08, 2003
Rob on Royale
"It's essentially Flash for programmers" says our CEO Rob Burgess in an InfoWorld interview today.Macromedia Press Release RSS Feed
A new RSS feed went live today - http://www.macromedia.com/go/news_rss - this provides an outline of the current news items from the ticker on the home page of macromedia.com. Feel free to provide feedback as comments here.May 07, 2003
Meet The Makers & Jeremy Allaire
As part of the ongoing Conversations series, Jeremy Allaire is interviewed about ColdFusion, the web and the future of wireless.rdesktop
A follow-up to my CFMX for J2EE & Windows post - I did all of that installation and configuration from the comfort of my Mac thanks to rdesktop which is an X-Windows client for accessing Windows Terminal Server. Sweet.CFMX for J2EE & Windows
Yesterday I did my first full install of JRun 4 and CFMX for J2EE on Windows. Last time I worked on Windows, CFMX Server had just been released and CFMX for J2EE was under development. I'd gotten used to installing CFMX Server on Windows (I did it countless times during the Neo development cycle!) so it was a pleasant surprise to find how smooth the process was.JRun 4 installed cleanly and uneventfully (on C:\), although the server didn't have Java installed so halfway through the JRun install I had to pause while I downloaded and installed Sun's 1.4.1_02 JVM (J2SE). I configured JRun with IIS to serve
.jsp and .jws files and tested it with a simple JSP in the default IIS wwwroot (on E:\). No problem.
Then I started the CFMX for J2EE install and decided to go for the EAR install (habit, even tho' I always end up unpacking it to get at the WAR files!). Now I had
cfusion.ear and no jar command. Hmm. So I downloaded WinZIP and used that to unpack the EAR file (to get at the two WAR files) and then unpack the WAR files into the JRun default server (under CFIDE and cfusion). Then I used JMC (JRun Management Console) to edit the context root to / and told it the document root was E:\inetpub\wwwroot\. Finally, I ran wsconfig to connect it to IIS. Done! Both JSP and CFM files serve up from the same directories as HTML.
Then it was time to test the CF5 applications on this box. I created a few data sources (Oracle 8) and tried the apps. The first one failed because it used client variables and I always disable those in the admin (along with selecting J2EE session variables). Changed client variables to use cookies and the first app worked just fine. The next app failed because it had ';' at the end of some of its SQL statements - allowed by the CF5 Oracle drivers, not allowed by the CFMX Oracle drivers. That's a fairly simple edit (regex replace ';$' with '').
The only real glitch in all of this is that, for some reason I haven't figured,
cfregistry does not seem to be able to read or write the registry. That means that ODBC DSNs do not show up in the CF administrator and it's hard to create certain data sources (e.g., Microsoft Access). The workaround for the moment is to create the System DSN in Windows and then attempt to create an Access data source in the CF administrator with the same name but no file path value. "Submit" produces a failures (unable to update the registry and DRIVERPATH variable undefined) but the data source is created and, because it mirrors the System DSN, it verifies just fine.
Thanks to Brandon Purcell, this glitch is fixed. He said:
To fix this add the necessary dlls' to the
java.library.path in jvm.config
java.library.path=C:/JRun4/servers/default/cfusion/WEB-INF/cfusion/libAll my
cfregistry tags and ODBC machinery work just fine now.
And a further note: it was pointed out that this configuration change is mentioned in the install docs... I just missed it (and I was actually making an effort to follow the docs for once). At least it's a simple fix and easy to debug and identify the problem. Mike Nimer had me create this simple script to verify the function of
cfregistry:
<cfset Branch_ODBCDS = "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"> <cfregistry action="GETALL" name="qODBC" type="string" sort="entry" branch="#Branch_ODBCDS#"> <cfdump label="ODBC Data Sources" var="#qODBC#">
Fusebox 4 Beta!
The Fusebox 4 beta is now active through July 4th. There are to be two flavors of Fusebox 4: Fusebox 4 for XML (aka FB4) and Fusebox 4 for CFCs (aka FBMX). They share many commonalities (XML configuration, plugins etc) but are radically different in structure and approach. I've downloaded all the code so I'll be experimenting over the next few weeks and writing up my experiences.May 05, 2003
Accessibility Blog
Macromedia's Bob Regan now has a blog on the subject of accessibility. If you're interested in Section 508 / Accessibility, you should subscribe to this new blog.DevNet Updated - Lots of ColdFusion Content!
The latest DevNet update provides plenty of meat for ColdFusion developers. You can start off with Ben Forta's Logged In column extolling the virtues of CFMX. That article links to several others, including new articles on integrating CFMX and J2EE by Drew Falkman, usingcftransaction by Simon Horwith, building Object-Oriented user interfaces by David Friedel and caching by Matt Boles. Plenty of thought-provoking and informative ColdFusion goodness!
Blogging Internally
A few folks have asked me whether Macromedia uses blogs internally. I haven't seen too many in operation but the subject came up again this morning so I set up Movable Type on my team's server and created a team blog. I'm not sure how many of the team will become enthusiastic bloggers but I'm hoping it turns into a really useful resource for the Web Technology Group team.Do you use blogs internally where you work? Tell me about it (in comments on this entry).
Patterns Central
Check out the new patterns portal. It'll be interesting to see how broad a reach a site like this has given the use of patterns in many different languages these days, including ColdFusion MX.May 01, 2003
cfform & /CFIDE
A couple of weeks ago, I mentioned how to getcfform working on a hosted environment. Macromedia has a new Tech Note that says much the same thing so now it's even easier to find the solution to this problem!