J. R. Boynton

WebDav

Summary: WebDav allows enabled programs like MS Word to open and save files on a web server via http, rather than the file system. Ultimately this is a small benefit, but useful in some situations.

Feature: Open and save files over the internet.

Advantages:

Benefit:

The development environment is more flexible, and may be easier to manage for some applications, a content management system, for example.

Disadvantages:

Content Management with WebDav

WebDav only locks a file when it is open. Thus, it doesn’t work for source control. If you have a content management system, though, you can put the file in a folder that only the right user has access to. That way it wouldn’t matter if they close the file and reopen it later: no one else could have changed it in the meantime.

If you don’t have a content management system, and you don’t have a source control system, you just have to hope that no one updates the file after you close it, but before you are really done with it. Or, you don’t save and close the file until it is finished. Not recommended.

Apparently there are people working on a new version of WebDav that will handle more of the source control/content management issues.

What it does, how it works

WebDav lets you open, lock, and save files through HTTP. This is the same communications protocol used by web browsers to show HTML files. While a file is open in Word, for example, the server won’t allow anyone else to access it.

The web server requires a WebDav module. IIS and Apache both have them. I presume Netscape does, and most other commercial web servers probably do or will soon. I downloaded a WebDav module for Apache for Windows, and installed it, pretty much no problem. I put the dll in the modules directory, made a few configuration file changes, and restarted the server. No sweat. On the other hand, it needs a recent version of Apache. I downloaded a version of Apache that worked with mod_perl on Windows... that didn’t work with the WebDav module. (Ug. I believe this is a problem between versions of Perl and Apache on Windows. Worst case on Unix systems is that you have to upgrade Apache, but your mod_perl won’t break.)

After installing the Apache module, I started Word 2000, chose File Open, then clicked on Web Folders on the left side of the FileOpen dialog box. There was a freaky little “wizard” to set up the url I wanted to access. Whatever. After that, I could click on the particular “web folder”, and see the .doc files in the directory. In my case, it was running on the same machine, but of course that isn’t required.

While the document was open in Word through the web folder, I tried to delete it in Windows Explorer. Somewhere down at the bottom of the left side of Windows Explorer, there is a line for Web Folders that I never understood. But I can open the Web Folders, choose an existing folder, and delete files in it. There’s a delay because of the http connection.

As I was saying, I tried to delete the file in the web folder that was also open in Word. It wouldn’t let me. Yippee.

A lot of desktop software will surely support WebDav. Some programs that already do: Dreamweaver 4, Photoshop 6, GoLive 5, Office 2000.

WebDav and Emacs

Only some client software supports WebDav. I use Emacs. Oops. It turned out I could drag a file from the web folder in Windows Explorer to the Emacs icon on my desktop, and it looked to me like everything was right. That is, the file opened in Emacs. Cool. When I saved it, though, it was in the c:\windows\temp directory, and didn’t update to the web folder.

I was able to drag the file icon in Windows Explorer from the temp directory to the web folder. That’s OK. But there was no way to move the file, as opposed to copy it. That is, the file was still in the temp directory. The temp directory is darned messy, so it’s not terribly likely that extra manual steps will always be done perfectly. When I forgot to delete the file from the temp directory, if I dragged the file from the web folder to the Emacs icon again, the file opened, but Windows had given it a new name: inserted (2) before the file extension: test(2).txt. That starts to get pretty messy.

The bottom line is that you can hack around if your program of choice doesn’t support WebDav, but it isn’t the way to go. Also, the file wasn’t locked.

A program called WebDrive maps a drive letter to a WebDav server. Of course installing it on every client takes away some of the benefit of the lower administration. WebDrive is a Windows-only program.

Quirks

Several quirks I noticed:

Conclusion

WebDav seems to work. It does a small thing for us, that may be useful, depending on the way your development environment works. I seem to be enthusiastic about the concept, but it’s hard for me to see where I would actually need to use it.




Copyright © 1998-2008 J. R. Boynton