Home >  Archive >  2011 >  March >  23

Previous / Next

Advice for newbie OPML programmers
By Dave Winer on Wednesday, March 23, 2011 at 3:45 PM.

A picture named frontierBox2.gifLast night I gave Ted Howard a bit of grief (in hopefully a friendly way) on writing code to connect two components running in the OPML Editor. But I didn't say how to do it. #

I wondered how I would approach it if I were completely new to this environment. There are quite a few ways to write a background process that glues two components together. If it were random, I'd probably pick a way to do it that wasn't very supportable. I might even choose a way to do it that is broken! :-( #

Then I asked myself how I want him to do it. What would be the easiest to maintain as we go forward. And for that, there is absolutely no question what's the right answer. #

WRITE A TOOL#

I put that in capital letters and boldfaced it because it is the absolutely number one best answer for any bit of code you want to write to run in the OPML Editor. It's also a good place to start exploring, because all the power of the environment has been encapsulated. You just put the code in the right place and it'll run once a minute, hour or overnight. Or in a background thread. Or as a web page. Or... etc etc.  #

A number of years ago (probably a depressingly large number) we put together the Tools framework for writing apps that run in Frontier. And we even documented it. :-) #

http://frontier.userland.com/tools #

And for the most part it hasn't changed. A tool written ten years ago for Frontier or Radio, will likely still run in the OPML Editor today.  #

Everything I write is a tool, so you know they aren't going to break, at least not on my watch. And if there's a bit of functionality you need that isn't there, this is the place I would like to add it. Because it will make my programming life easier too. #

Another reason to write a Tool is you may want to share it with others, and if you do, they will likely know how to use it.  #

Update: An excellent up-to-date tutorial on Tools by Andy Sylvester. #




Christmas Tree
This site contributes to the scripting.com community river.


© Copyright 1997-2011 Dave Winer. Last update: Wednesday, March 23, 2011 at 8:13 PM Eastern. Last build: 12/12/2011; 12:59:39 PM. "It's even worse than it appears."

RSS feed for Scripting News

Previous / Next