Recently in Web Developments Category

High Priority Mac App.

| No TrackBacks

Douglas Bowman of Stop Design writes about sleek new Mac app called High Priority:

Leveraging the power and simplicity of iCal, Apple’s calendar software bundled with Mac OS X, High Priority allows you to create, edit, and remove your To Do items directly from the menu bar, without having to have iCal open.

I downloaded and installed it because it sounded like my type of tool. After testing it out a bit I must say it lives up to its billing. I like its approach as a faster similar interface to the To Do interface in iCal. That's really smart. I haven't worked it into my daily workflow yet though. I find this is the norm for any new tool I try. What can I say, I'm a high cycles guy that has little room for drag.

Try out High Priority. At $6 for a license ($12 for a family license and wallet busting $60 for a business license) you can't go wrong.

Octet: The Big Ideas.

| No TrackBacks

I was recently catching up with Ben Hammersley when he mentioned he was finishing up a book. Really? I said. Do tell.

Octet: The Eight Big Ideas You Need to Understand in the 21st Century.

The eight big ideas that will dominate the 21st century are: 1. Zero distance 2. Information wants to be free 3. Mass amateurisation 4. Metcalfe's Law - more is much more 5. True Names and Robust Identities 6. Everything is viral - the art of spreading 7. Personalisation of everything

Sounds good. Ben has quite a talent for blessing the mundane with wit and charm so I'm sure this will be an interesting read even for an alpha geek like myself. Alas, the publish date is February 8, 2007 so I guess I'll have to wait awhile.

In related news, DL Byron and company are said to be wrapping up their book Publish and Prosper : Blogging for Your Business due out much sooner and here in the US.

Cribcandy.

| No TrackBacks

Via Nick Denton: Cribcandy is weblog of "bookmarkable stuff for your home." The site features "wists," the thumbnail entries that make up the site. Its like del.icio.us meets Flickr meets e-commerce. Very interesting.

Rollyo.

| No TrackBacks

Of all the startups I heard about while attending the Web 2.0 conference, I thought Rollyo was the most useful and clever of them all. Like so many of these companies though I'm scratching my head and wondering what their business model will be though.

It's here now and worth exploring. Business 2.0 gives more detail here.

Patience for Perl 6.

| No TrackBacks

People have complained about how long Perl 6 is taking to arrive; I used to grumble about that myself. Now that I watch things growing and changing on a daily basis, I'm glad everyone is taking their time.

I kind of feel the same way as Geoff Badwell posts in Perl Polyglot. I haven't had the time to follow what is happening in the Perl 6 world, but when I do have a chance to review I am encouraged, very encouraged, about what is to come. Sure I'd like it here today, but at least its coming and with a great deal of promise from years of research and observation.

Despite my love hate relationship with Perl, I'm certainly not ready to jump ship to Ruby so quickly.

Checking one of my inboxes I found an interesting email message from ActiveState announcing commercial Perl support for Mac OS X.

ActiveState is pleased to announce the immediate availability of ActivePerl, ActivePython & ActiveTcl for the Mac OS X platform. More importantly to this list, we are very excited to announce our plan to release Komodo for Mac OS X later this year. We expect to offer a beta release in August.

To keep up-to-date with our Mac OS X progress, betas and
announcements, we invite you to join our new mailing list:

osx-announce@ActiveState.com

BTW, the free downloads of ActivePerl, ActivePython & ActiveTcl for Mac OS X are available here:

www.ActiveState.com/Languages

I've been fairly pleased with my standard Perl distribution running on Mac OS X with BBEdit for writing code. Before I switched, I used Komodo and their version of Perl for Windows. I kind of liked it though I can't say I miss it – perhaps that was because of all of the Windows baggage I left behind. As I dive deeper in standard command-line tool shedding my all GUI past, shedding a slick Perl development app like Komodo seemed appropriate no matter what the quality.

I think this is a win for Mac folk in that ActiveState had a nice installer and a more sensible distribution of Perl. ActiveState windows installation included must-have modules such as LWP, XML::Parser and others that the standard distribution lacks. The lack of support to highly popular function in Perl like XML parsing or Web interfaces has always been a great mystery to me. That's why I'm glad to see a company like ActiveState pushing that notion.

It will be interesting to see what effect a commercial entity like ActiveState will have in the adoption of Perl (and Python) on the Mac.

tima @ etech 2004

| No Comments | No TrackBacks

I'm out in San Diego experiencing the O'Reilly Emerging Technology Conference. My day 1 post is on my O'Reilly weblog. Instead of real time blogging as I did last time, I've been participating in SubEthaEdit collaborative noting taking. Here are some of the session notes I hosted and promised to make publically available.

DAY 2 SubEthaEdit Notes

LAST UPDATE

Was getting too tired to write coherent notes on day 3. I did make another post on my O'Reilly weblog here. The O'Reilly Wiki was a page of links to notes that various participants took. O'Reilly setup a page here for the complete coverage of the event.

ADX Part Duex.

| No Comments

During last weekend's, Foo Camp a group of luminaries got together to discuss feed auto-discovery. Sam Ruby took notes and what they are calling FDML (Feed Discovery/Directory/Detailing) Markup Language) and has posted them on a wikimy favorite. ;)

I revised my previous example to bring it closer in-line with the requirements they listed.


<?xml version="1.0" encoding="UTF-8"?>
<index 
  xmlns:dcterms="http://purl.org/dc/terms/" 
  xmlns="urn:temporary:uri">

 <title>News4Humans feedOnFeeds</title>
 <!-- a URL to the corresponding website --> 
 <source>http://news4humans.com/index.html</source>
 <description>All the news preferred by highly evolved primates.</description>
 <language>en-us</language>
 <!-- the parent directory -->
 <relation>http://www.foo.com/parent.adx</relation>
 <!-- generator -->
 <publisher>newsfor@news4humans.com ADX Generator 0.1</publisher>

 <service>
 <name>Latest News</name> <!-- same as dc:title -->
 <description>A syndication feed of the 15 most recent news posts.</description>
 <source>http://news4humans.com/feeds/index.xml</source>
 <format>http://purl.org/rss/2.0/</format>
 <!-- need a standardized list of terms or perhaps a URI 
 	scheme would be more precise? -->
 <type>abstracts</type>
 <dc:modified>2003-09-12T23:35:52-00:00</dcterms:modified>
 <subject>Breaking News</subject>
 <creator>News4Humans Staff</creator>
 <identifier>brnews20031014123456</identifier>
 </service>

 <service>
 <name>Google Search</name>
 <description>A SOAP interface to the Google search engine.</description>
 <format>http://schemas.xmlsoap.org/wsdl/</format> 
 <source>http://api.google.com/GoogleSearch.wsdl</source> 
 </service>

<!-- This was IndexRef. Are the "children" to this list. -->
 <link>
 <title>News4Humans Technology News Feeds</title>
 <description>All the news preferred by highly evolved primates.</description>
 <source>http://news4humans.com/tech.adx</source>
 <format>urn:temporary:uri</format>
 <creator>News4Humans Staff</creator>
 </link>

</index> 

I kept with Dublin Core Metadata Element Set for the most part just to adhere to some recognized standard. The tag naming could be more precise and refined.

Relatedly Bill Kearney posted a mockup of James' initial ADX format here: http://www.syndic8.com/genfeed.php?Format=adx&UserID=wkearney99&List=8

All good stuff.

While I was out on my latest blogging hiatus, James Snell picks up on my response to earlier discussion by Jeremy Zawodny and Diego Doval for developing a means of more robust RSS auto-discovery. He writes:

As much as I like WSIL, it's pretty much officially dead. There is no further work going into it at all. So while I like where Tim is going with this, I think an alternative approach needs to be developed.

He goes on to layout an example of a new alternate WSIL-like format he calls The Automatic Discovery indeX (ADX).

I agree with James and had suspected as much about WSIL. Given James employer is one of the authors of that spec I'll take it as fact.

I also like where he's gone with ADX. Like WSIL, it's more RESTful then UDDI (which just needs to die) and relatively simple and versatility enough to integrate numerous format pointers into one mechanism – SOAP, RSS, OPML, Atom and so on. This could also be used as a more robust and eventually a better formed and documented blogroll format.

While its a good start, ADX as James has detailed it I think it could use some refinement – mostly what I think are nits.

  • Keep the tags all lowercase. Most formats do it that way so I see nothing gained be switching to proper case tags names.
  • I like the reuse of existing RSS modules such as Dublin Core however their use seems inconsistent. For instance James uses dc:title, but does not namespace Description. Name is also not namespaced and is about the equivalent of dc:title. I realize that James was transcribing my WSIL examples, but since this is a new format we might as well clean that up. Perhaps if Dublin Core is going (and should) play such an important roll those elements should just be folded into the syntax of this format?
  • In the spirit of Dublin Core, I'd reuse this element sets naming conventions as much as possible. Service.EndPoint becomes source or perhaps the RSS standard link and so on.
  • IndexRef should be expanded to allow for additional meta data to be associated with a reference to another index. For instance, what type of index is on the other side of this link? Another ADX? Or perhaps a UDDI directory? Or perhaps a OPML file. This is also an important allowance for blogroll use.
  • For argument sake, I'd like to see an example of a WSDL file and a UDDI pointer.
  • Having a schema is good, but I think should be optional in an ADX document.
  • I'm really hesitant of the DNS Service Discovery method because most users do not have the knowledge or access to implement such a thing.

Mostly nits. So here is my riff on James' original ADX proposal where I incorporate my feedback into an example:

 <?xml version="1.0" encoding="UTF-8"?>
 <index 
   xmlns:dcterms="http://purl.org/dc/terms/" 
   xmlns="urn:temporary:uri">

  <title>News4Humans feedOnFeeds</title>
  <dcterms:modified>2003-09-12T23:45:37-00:00</dcterms:modified> 
  <source>http://news4humans.com/index.adx</source>
  <description>All the news preferred by highly evolved primates.</description>
  <language>en-us</language>
  <creator>newsfor@news4humans.com</creator>

  <service>
  <name>Latest News</name>
  <description>A syndication feed of the 15 most recent news posts.</description>
  <source>http://news4humans.com/feeds/index.xml</source>
  <format>http://purl.org/rss/2.0/</format>
  <dc:modified>2003-09-12T23:35:52-00:00</dcterms:modified>
  </service>

  <service>
  <name>Google Search</name>
  <description>A SOAP interface to the Google search engine.</description>
  <format>http://schemas.xmlsoap.org/wsdl/</format> 
  <source>http://api.google.com/GoogleSearch.wsdl</source> 
  </service>

  <!-- This was IndexRef –>
  <link>
  <title>News4Humans Technology News Feeds</title>
  <description>All the news preferred by highly evolved primates.</description>
  <source>http://news4humans.com/tech.adx</source>
  <format>urn:temporary:uri</format>
  <creator>News4Humans</creator>
  </link>

 </index>

Thoughts?

Preface: This is one of the hacks that I had contributed to the O'Reilly Blog Hacks projects until it was pulled from production. For awhile, I've been meaning to release what I did through my weblog like the legenary Tom Coates did in his. Today I put my foot down and take some action.

Back in November 1997 I read a Webmonkey article by Jeffery Veen entitled Object-Oriented Publishing on the Web. In the article Veen notes that building a Web site should not be redundant activity. Rather then cutting-and-pasting markup, content and links throughout your templates or pages, he suggests that developers think of a sites as chunks of content that can be assembled in various ways to form pages. He goes on to explain that these chunks are compartmentalized elements in your page layouts, such as header, footer, navigation, sidebars, and the page body, are the functional equivalent of objects in object-oriented programming. (He later went on to dedicate an entire chapter to the concept of object-oriented publishing in his book The Art & Science of Web Design and later excerpted in another Webmonkey article.)

Generally speaking, object-oriented techniques eliminate redundant effort, ease maintenance and future modification, increase reuse and improve quality. Object-oriented techniques also better support evolutionary, iterative and incremental development then other means. For those not familiar with object-oriented development theory we will not be able to go into the topic any further. There are dozens of books and scholarly papers written on the topic if you're interested.

Being a programmer that was already familiar with the principles of object-oriented design, the notion of applying them to web publishing resonated with me though I hadn't considered it until I had read Veen's article. Since then I've always tried to apply these object-oriented publishing principles to any website I've built including weblogs.

So how do we apply object-oriented publishing to weblogs? It depends on the tool you are using as to how and to what extent. Here I'll cover how I do it with my weblogging tool of choice, Movable Type. To demonstrate that this notion is adaptable to other environments, I will also walk through another method using Apache's XSSI (Extended Server Side Includes) – the one Veen used to illustrate his principles in the original article. Its one that I've used in the past before the various publishing tools and page generation technologies we have today were readily available. (I've personally adapted these principles to ColdFusion and I'm confident they are applicable to PHP, ASP, JSP and any many others.) While not as elegant, the XSSI method that can be applied to weblogging tools such as Blogger that can write static files that are being served up with the Apache web server. Let's discuss these approaches to object-oriented publishing.

Movable Type (MT) structures your content and keeps it separate from its display via templates. What it lacks in the grand scheme of object-oriented publishing is a facility for applying a global layout template – a single template that can wrap the layout of any other page's content with the common elements (header, footer, navigational links) used throughout.

Ideally you would create a module that is a global layout template with placeholders for various pieces of content to be plugged into. Each template would create the body of content and set other meta data variables before calling in the global layout template to assemble the page. I initially found that there is a catch to doing this in MT though. While MT allows for variables to be set and retrieved in templates using <MTSetVar> and <MTGetVar> tags, it only permits small bits of static text to be stored – not paragraphs with markup and links. It also meant you could not capture the output of a block of MT template code, which is precisely what is needed for inserting the content body into the global layout template.

In trying to work within MT's capabilities initially, I broke my content objects into MT modules and used <MTInclude> tags to call them into each template. While this helped minimize a certain amount of redundancy and provide some reuse, adding a new element or reshuffling the order of objects in the layout still required making the same change multiple times.

With the later introduction of plugins to MT, I was able to create a better and more elegant solution for implementing a global page template and achieving a better object-oriented publishing effect.

I created a very simple container tag plugin, <MTSetVarBlock>. (The mt-setvarblock plugin is freely available under the Artistic License.) This tag is similar to <MTSetVar>, but instead of taking in its value as a tag argument, it stashed the output of what was between its start and end tags. Now any amount of text, markup and, most importantly, MT template tags could be included and its output captured into a variable. The block of content could be retrieved with a <MTGetVar> tag just as you would output a variable set with <MTSetVar>. With this added bit of functionality, I could create a consistent look and feel for my entire weblog with a modicum of template code by reusing the common elements.

First I created a global layout template with the elements that appear throughout the site and frame the various content layouts. You may want to break the various elements into their own separate modules and use <MTInclude> to bring them into the global template. It depends on your situation and personal preference whether you will want to do this. In many cases I have elected not to because these elements where only used solely by the global template.

One word of caution. As Movable Type users know, MT statically renders its content to files. This is generally a very good thing, however there are a few side effects of this feature that my impact the implementation of technique. In order to avoid having to needless rebuild the entire site each time new content (an entry, comment or ping) is published, MT attempts to selectively rebuild files based on tags usage that it has mapped and the template type. MT does not map modules and it does not allow you to directly nest templates. Suppose you want to render a list recent entries and include it in your global page layout. Movable Type will not recognize that all of the templates using the global layout template module needs to be rebuilt. You probably don't want your whole site rebuilt every time you make an entry anyway. In these situations you should generate a file using a standard template, like an index template. Then by including some dynamic scripting code such as XSSI or PHP in your template, include that generated file into the layout.

Here is a simple example of a global layout template module.


<html>
	<head>
		<title><MTGetVar name="title"/></title>
	</head>
	<body>
 	<h2><MTGetVar name="title" /></h2>
		<MTGetVar name="body" />
	</body>
</html>

With the global layout stored as a module, I created my various index and archive templates. Since there was no need repeat all of the elements that was in the global layout, these templates consisted of creating a layout for the body of that specific template and wrapping it in a
<MTSetVarBlock> tagset with a name of body.

I also set variables with information (meta data) that needed to be inserted into the template. While these are optional and will vary based on what you are doing in your global template, I've found them helpful in refining my template by giving me more control on a template-by-template basis. At a minimum, I tend to create and store a variable that contains at least part of the page title. You can have as may or as few as you like. You may also want to set a variable for controlling a conditional statement inside your global layout.

Finally I include the global layout module. MT retrieves the module and processes it, inserting the content where I had placed my markers using <MTGetVar>.

Here is a simple example of a master archive listing of hyperlinked entry titles for a blog in reverse chronological order using the global layout template.


 <MTSetVarBlock name="title"><MTBlogName/>  Archive</MTSetVarBlock>
 <MTSetVarBlock name="body">
 	<MTEntries>
 		<a href="<MTEntryLink/>"><MTEntryTitle/></a><br />
 	</MTEntries>
 </MTSetVarBlock>
 <MTInclude module="Global Layout Template"/>

Rebuild your blog and you have a consistent layout throughout your site with a minimum of template coding necessary. Want to give your weblog a different look? Change the global layout template, save, rebuild all and viola! Your whole weblog has a different look.

As I mentioned earlier, object-oriented publishing is adaptable to other weblog tools. How and to what extent varies. Now we'll look at how you may apply these principles to other weblogging tools using static files and the Apache Web server's XSSI capabilities.

XSSI is a set of built-in commands for (as its name implies) inserting files and doing basic if-else conditionals in addition to setting and output variables. The commands are quite limited and only provide the most rudimentary of functions – they're no loops nor there any type of lists/arrays to work with. Creating extensions or plugins means modifying C code and recompiling the server – not a trivial task though some have made valiant attempts with some success. Despite all of this, a remarkable amount can be done with XSSI including web publishing in an object-oriented style.

Unlike the Movable Type example, XSSI does not have the ability to set variable with a block of content and requires two files and some file naming conventions to achieve. Since its not connected to a database all data must be loaded in variables or individual files. While it's not ideal, it's not so laborious when you have a tool to do all of the hard work. XSSI does allow for your changes to be seen immediate since the pages are assembled dynamically.

Let's look at how XSSI can be applied.

Each piece of content would require two smaller files. The first file is the file users will retrieve. It defines the meta data for the content before finally calling the global layout that we'll look at momentarily. Here is a simple example file we'll call foo.shtml.


<!--#set var="title" value="My foo title." -->
<!--#set var="description" value="This is an excerpt of the content that will be inserted." -->
<!--#include file="global_template.shtml" -->

In order to accommodate inserting the body content into the global layout template, we place it into a separate file and give it the same name as its meta data mate and a .body appended. This way we can use the built-in DOCUMENT_URI HTTP server variable in our global template to programmatically make the association between the two content files. So this example file, foo.shtml.body, is just the main body of content – plain text and markup.


<p>This is a simple example to demonstrate body copy being inserted into a template using just Apache XSSI.</p>
<p>These are not the droids we are looking for. Move along. Move along.</p>

You can include XSSI commands in this file if necessary though I wouldn't advise it. Besides you'll have to configure the server to parse files with .body extensions.

The final piece is the global layout where we output (echo) meta data and include the body of content. Here is a sample global layout template in XSSI loosely based on the one used in the Movable Type solution.


<html>
	<head>
		<title><!--#echo var="title" --></title>
		<meta name="description" content="<!--#echo var="description" -->" />
	</head>
	<body>
 	<h2><!--#echo var="title" --></h2>
		<!--#include virtual="${DOCUMENT_URI}.body" -->
	</body>
</html>

That's all. Like I said using XSSI is not as ideal, but with Apache's widespread deployment it provides virtually any tool the can output static files a means of applying an object-oriented style to publishing.

About this Archive

This page is a archive of recent entries in the Web Developments category.

Viewpoints is the previous category.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.2rc2-en