Archive for the ‘Uncategorized’ Category
Margin Marks UI Concept
Summary
Margin marks is a user interface concept that aims to expose microformats on a web page in a way that’s intuitive, useful, and positionally relevant, yet has minimal interaction with the page presentation. This concept can be also extended to emphasize other, typically invisible aspects of the content, such as fragment identifiers, classes and even to letting the users add their own marks. You can go ahead and just look at the pictures if you don’t feel like reading.
Motivation
I’ve been following the thought process of microformats UI in Firefox 3 as documented in Operator‘s
functionality, Alex‘s blog, and uf-discuss list. It’s been exciting to think about the power of microformats and its consumption potential being built into the browser, and as such the decisions about the user interface exposing this power are certainly quite heavy in weight. The greatest problem as it appeared to me was exposing content, marked up with microformats in a way that does not interfere with the page presentation, while at the same time providing comfortable and immediately useful experience for the users. Mike’s current experiment, the Operator, has cool ideas and lots of configurable options, but it still left me wanting something more. Primarily, my holy grail was positional relevance of the consumer user interface to the actual marked-up content. Looking at pages like twitter.com and my own blog comments, I realized that a page with a lot of microformatted content practically begs for positional correlation between the Operator’s
action drop-downs and the page itself. That’s how the margin marks came along.
General Concept
The margin bar is a vertical pane that is shown on one side of the browser window. Whether it’s on the left or on the right may be configurable by the user. The contents of the margin bar are vertically attached to the page, so
that when the page contents are scrolled, the margin bar contents are scrolled as well. Visually, it’s an extra margin to the page that is controlled by the browser, not page presentation (hence, the margin bar). The margin bar can be visible or hidden, as desired by the user. Naturally, open
should be the default state.
The margin bar is narrow, with minimal impact on the width of the browser window. The information provided is hint-like, abbreviated down to icons and perhaps numeric indicators. Visually, it’s a set of glyphs, each positioned alongside the start of relevant content fragment. These glyphs are margin marks. Margin mark identifies vertical position of a content fragment in the margin bar. The mark can be visually presented as an arrow or any other sort of pointer with an icon on it.
Grouping Marks
In situations, when there are more than one marks occupying the same space, the marks are combined into one mark, visually identifying multiple items, together with the number of combined marks. The icon, associated with the top-most mark is displayed.
Mark Actions
Each mark may have one or more actions, associated with it, with one action designated as default. Configuring the actions is part of the browser preferences UI. It is possible that the action may have an icon associated with
it. For instance, if the action is to add event to Microsoft Outlook calendar, the Outlook icon is displayed in the mark, rather than a generic address card. However, this may introduce more confusion, given the diversity of platforms and applications that may be potentially invoked by the users.
Mouse Navigation
When the user hovers the mouse over the mark, the details window is revealed. Moving the mouse off the mark closes the details window. Clicking on the mark invokes the default action. Visually, default action is placed at the top of the details window, so hovering and clicking are intuitively connected: the user does not need to make any further mouse movements to invoke the default action. Hovering the mouse over a group opens the group: the marks in the group are lined up in the bar vertically, allowing the user to explore the marks within the group. Admittedly, this is not very elegant. Perhaps you could come up with a better idea.
Keyboard Navigation
Margin bar participates in the browser chrome tab cycle, preferably placed immediately before the page. Also, there should be a keyboard shortcut to bring keyboard focus into the margin bar. Once the bar acquires keyboard focus, the top-most mark gains it automatically. Then, the following keyboard events are recognized (this list is just a suggestion and food for thought):
- Down Arrow — move to next mark
- Shift-Down Arrow — move to next mark within the group. If at the end of the group, move to next mark
- Up Arrow — move to previous mark
- Shift-Up Arrow — move to previous mark within the group. If at the beginning of the group, move to previous mark
- Space — scroll the page down and jump to the first mark in the visible span of the page
- Enter — invoke mark/note action
- Tab — go to the browser window
- Shift-Tab — go to the previous item in the tab cycle
Aural Presentation
Ideally, when used with a browser that is equipped with voice-reading software,
such as JAWS, the user interaction should occur as follows:
- When the margin bar gains focus, the reader announces:
X marks on the page. Mark One. Type: Address Card. Name: Rulon Oboev…
and continues reading the mark contents - Using arrows, the user can move between the marks. Upon each move, the reader announces the sequential number of the mark, it’s type and contents.
- After reading contents, the reader announces each action as a link.
- In addition to standard actions, the “Go to content on page” action is added after the default action.
Microformats Marks
Whenever microformat markup is encountered on page, a mark is placed on the bar at the current vertical position of the starting element of the markup fragment. Should the position change as a result of DOM operation or changing geometry of the page, the mark changes the position accordingly. This may be difficult to implement, so an acceptable solution would be to detect detachment (position change) and somehow change the appearance of the mark to no longer “point” to a place in content. Each mark contains a distinctive icon of the corresponding microformat (address card icon for an hCard, calendar icon for hCalendar event, etc.).
When hovered over the microformat data is presented as a complete note, perhaps using a metaphor, relevant to the specific microformat. For example, the hCard could be rendered as a Rolodex card, and an hAtom entry would be probably best presented as a yellow-pad note, a common visual hint of blog post.
Other Types of Marks
One can also easily extrapolate the use of the margin mark to other types of page metadata. For instance, a mark with a feed icon may be placed whenever a feed is encountered on the page. Usually, these would be at the top, but should there be an a element with the type attribute of application/rss+xml, the mark would be placed accordingly there, too.
Also, the marks could be used to provide a UI to unobtrusively identify HTML elements with an id attribute (HTML fragments). Other uses may include tracking a set of user-specified elements, attribute values, or content (mark everything containing “microformats” on the page).
User Marks
It would be really interesting to offer the users to add their own marks to the page, perhaps by clicking (or right-clicking) on the bar, as a way to annotate the page. As the users add a new mark, they can fill in the fields in the provided dialog box. Typically, this would be a simple note (an hAtom entry), but one can envision adding reminders (an hCalendar event), contact information (an hCard), perhaps re-purposing non-microformatted content from the page), or other types of content. After the mark is added, it is persisted within the browser.
Persistently and reliably identifying is a potential challenge of user mark implementation. Since it is not known when or how the content of the page will change upon next visit, a visual equivalent of um.. somewhere around here
may be applied: if the browser can not identify the precise location of the user mark, an extra hint (a question mark, maybe, or a spatial glow/spread to signify uncertainty in position) is added to the mark. When this hint is present, the point line is not displayed.
Other Random Thoughts
Taking one step further brings us to the ability of the browser to communicate with the server when new user marks are added or deleted. Using some simple detection scheme, a browser could recognize that the page accepts mark updates and send newly added marks to the server transparently. An existing blog comment API with some positional extensions could be used or a new protocol could be proposed. I’ll let you figure out what would be best here.
When the margin mark is hovered over or has focus, an additional visual hint could be introduced: a point on the page where the relevant content begins and a horizontal line, connecting it with the mark, like a laser pointer. This could really address the issues of positional relevance.
When the page has more microformatted content beyond the current scroll view, a teaser hint could be shown at the bottom or top of the margin bar (an arrow of some sort?) to indicate that there’s more crunchy markup above or bellow the currenty visible portion of the page.
The margin bar could also have an expanded state, in which it shows details along with the marks. I originally had this in the concept, but I instinctively felt it makes the whole thing too complicated.
Inspiration, Disclaimer, and Licensing
This concept is inspired by the entire super-awesome premise of microformats and the great people around them, by the Alex Faaborg‘s
post on Firefox 3 microformat UI concepts, Mike
Kaply‘s ground-breaking Operator extension, and quite obviously, Jack Slocum‘s blog comment system.
I am not a browser developer and honestly do not know how much effort would it take to implement something like this. I did take a brief stroll in a Mozilla trunk and soon realized that one cannot evaluate implementation feasibility by just taking a brief stroll through the code of a browser. I am positive this can be done completely in Javascript, and thus assume that the feasibility is pretty high.
Should anyone find this concept, in full or in parts useful, inspiring, and/or worthy of implementation, I release it as public domain. I think that it would be awfully splendid of you to mention my name, even if somewhere deep in the comments of your shiny new toy. Or maybe bake me a low-carb cake. Or a MacBook Pro. But I won’t insist.
The Horrific Markup of Live Spaces and Possible Explanation of Dare not Getting Microformats
It’s a Friday surprise! After reading this post by Dare Obasanjo,
I dutifully followed the links in the article. Upon stumbling on his Live Spaces friends page, I instinctively hit Ctrl+U to peek at the source code. Ow! Ow! My eyes! My tired bespectacled eyes!
Dear readers (yes, all 2 of you — Privet, Mom!), let’s all hold hands and stand in a circle. Let’s promise ourselves to never look at that pitiful, congealed elephant-man, malignant-growth of a code ever again. It’s just better that way. And you, Spaces developers… Well, shame on you. You should know better than dumping this crap on the Web. No wonder poor Dare can’t get screen-scraping
out of his mind: he probably hasn’t even seen good semantic markup, much less realized its benefits. Have you?
Oh, and Dare, bad call on the friends.get example. You should probably use fql.query to get something more useful than a list of friend UIDs for any sort of social network portability. But I’ll leave you alone with your point of view on what can and cannot be an API.
Framework for Tomorrow’s Web
I am trying something new here. Instead of blabbering and shaking wrinkled fists like a cranky old man, I’ll turn my lemon into something with a bit more kinetic oomph. Like a two-by-four. Kidding! Kidding…
If you’re like me, you’re fascinated with Web frameworks. You’ve dabbled in all of them, finding likes and quirks, but ultimately walking away wanting more. If you’re like me, you’ve kept a mental wishlist of what tomorrow’s Web framework should be like. Here’s mine, in no particular order:
- Framework for Tomorrow’s Web (FTW for short) Speaks Web natively. No extra work is needed by a developer to take advantage of the full HTTP spec potential.
GETs are idempotent.POSTs are free of abuse. Etags are meaningful. Did I mention they just work? - FTW is intentionally and unapologetically stateless. On the other end of a request, there is a representation of a resource whose change is strictly a function of time. Personalization and other shnazzy Web 2.Poo junk are accomplished by client-side composition.
- FTW is architected outside of a single server boundaries. Parallelism and massive scalability are part of the deal. Spreading your application across several nodes does not require redesign or even changing a line of code. Perhaps even, the framework does it automatically, expanding or contracting its physical machine span as a reaction to traffic.
- Just like we grew out
mallocs andfrees, with FTW, we no longer worry about caching. Caching is effective and completely behind the scenes. FTW developer does not know anything about dependencies, re-syncing, or sliding expiration scales. Caching just happens. No tinkering is necessary. - FTW respects the markup. If asked to produce xHTML, it outputs minimalist semantic markup that is free of presentational dribble. It may actually prevent the developer from tossing crap onto the representation.
- In FTW, you develop using a a strongly, dynamically typed language. Ok, this one is not really a tomorrow’s feature by most accounts, but we .NET folks are still calling them futures.
- The framework consists of two integral parts: the server-side and the client-side. The client-side part is treated with the same respect as the server-side. They’re equals, except one manages content, and the other manages presentation. In this respect, FTW is not a hodge-podge of multiple technologies that spans several disparate projects.
- Layers of abstraction are drawn along, not across the separation of concern. In fact, FTW manages separation of concerns. It is developed to support best practices, unified into an intuitive, thorough methodology. You know, the one that doesn’t begin with
‘spose you want to build a Web form
. - Finally, the FTW‘s architects realize that Web is most naturally modeled as a graph. Instead of messing with tables and rows, the developer creates representations and establishes relationships between them, never departing from hypermedia to another the data abstraction. Dare I predict the end of reign for tabular data, my SQL homeboys? Meh. We’ll see.
I could probably list more items, but these seem to capture the spirit. Speaking of spirits, it’s Friday night. Enough writing. Thank you for reading. Y’all come back now, ya hear?
Javascript Makes Me Giddy
I must be a simple man, ‘cuz things like this in Javascript make me slap my sides, and go Hot damn!
function Context(base) {
if (base) {
var c = function(base) {
this.base = base;
}
c.prototype = base;
return new c(base);
}
return new function() {
// standard context functions
this.get = function() {};
// ...
}
}
// then
var a = Context();
// do things with "a"
var b = Context(a);
// "b" inherits "a" as context:
// * changes to "a" make it to "b"
// * changes to "b" don't make it to "a"
var c = Context(b);
// you get the picture ...
I don’t know what’s more exciting here, the “no-much-to-it-ness” or the “bang-for-buck-ness”, but every time I get to work with Javascript, I am excited about the actual process of crafting code.
ECMAScript 4 on the Server
Let’s imagine there is a viable, publicly available ECMAScript4 (that’s Javascript 2.0, y’all) implementation that runs on the server (is there, by the way?), that can be used instead of Ruby, Python, PHP, C# etc. Wouldn’t it be great?
My first reaction is yes!. Actually more like you betcha, my goatee-chinned, mojito-drinking, flip-flop-wearing blog-buddy (that’s how I imagine you, anyway), as there would be one less language to learn for the developer.
But then, I am wondering if the developers would be more prone to get their wires crossed, switching from client to server context inside of the same language?
What do you think? Is less more in this particular case? Is having a separate language for the server side the right thing to do?
Send your answers with a self-addressed and stamped envelope. Or you can just use comments. Or your blog. Or Twitter. Or Facebook. Or Pownce. Whatever. Sheesh, this social networking thing is a full-time job.
Client-side Performance Tip
I wanted to mention this for a while, but only now found a bit of time. This is very important.
When a page loads, it first processes all child elements in the head element of the page. Until all child elements are processed, no rendering of the page will occur. So, first important bit of information is: the page won’t start showing anything until all script and link elements in its head are requested and loaded.
Conforming to RFC2616, all user agents (including Firefox, IE, Opera, and Safari) will only make 2 HTTP requests at a time to load all external assets for the page. Which means that this is not a parallel operation, and regardless of how fast the server is, the visible performance of the page will suffer if there are lots of scripts and links declared in the head element of the page. So, the performance tip is: at all costs, minimize the number of items in the head element of the page.
Goodbye, Subtext
They say: all good things must come to an end
. What a load of crap! It’s like saying: only bad things last forever
. Perhaps a more accurate statement would be: some good things occasionally come to an end
. But that’s a heckuva lot less dramatic and you know us, humans — we love drama. But I digress…
One of these “some good things” is my membership in the Subtext, the open-source project masterminded by hacker extraordinaire Phil back in 2005. The little grey submarine that could
grew nicely since then into a complete blogging platform with a rowdy gang of devout followers.
I was one of the original members of the project and even somewhat contributed to it early in the game. For the last year or so, I’ve been a bit more of a wall flower, kind of like one of ‘em famous folks in on a board of directors who never show up and when they do, they desperately try to evade death of boredom by picking on their teeth or playing wastebasketball. Except, y’all know I am not famous. Especially not for the stuff that would get me a seat on a board of directors. That’s because Phil was too kind to strike me out of the roster. You are too kind, Phil. You are too kind.
Luckily, over this weekend I had made the final step that gives Phil and the Subtext team a superb reason for giving me the eviction notice: I am no longer running this site on Subtext. Not even a pre-beta 1.0 Nautilus. Yessiree-bob, this site is now powered by the Estrada Engine, the latest and greatest product offering of the company at which yours truly works. I was talking about converting three years ago (that’s before Subtext!), but only now got a chance to catch up and do the move.
Don’t take me wrong. I love Subtext. I think this blogging engine, rooted in Scott Watermasysk’s creation is a great choice for individual or small-group blogging on a great platform. But the boy’s gotta eat his own dogfood. If you write the code, you have to enjoy (or suffer) using it. So here I am, sitting on unpacked boxes in a new empty virtual house, walls unpainted and all. It’ll be good. Just needs a little lovin’.
BarCampAustin
I am sitting here at BarCampAustin, the precursor to the SXSW 2007 conference. This one is really a bar camp. It’s at Bourbon Rocks bar, and the atmosphere follows suit. There is actually a bartender behind us, and even a bouncer at the door.
At around 7:00pm, I will be talking about UAB in Antartica, the project I mentioned here before. This is the next generation (can I say Antarctica 2.0?). If any of you remember my little schpiel about not building your own networking site at the NetSquared conference last year? Well, here it is, in action.
Antarctica.uab.edu is an educational outreach project by the University of Alabama at Birmingham (UAB): a blog by a group of university scientists who are currently on the ice in Antarctica. Technology allows to tightly intertwine the blog with Flickr via 3 groups: public, crew, and classroom. The tagspace is shared between these Flickr groups and the blog (try clicking on the crew members names and tags in the right column), providing an impression that both Flickr pics and posts are in the same information stream. Also, bloggers can associate specific pics with posts with a simple tagging technique. When a picture is posted on Flickr, it’s linked back to the site, to provide to and fro traffic connection.
There is quite a bit of interesting technical stuff in this site, from nifty fixed-flexible window sizing to HTML text trimmer, from improved AHAH technique to using semantic markup to query Flickr API. I am going to go ahead and commit to talking about each aspect in a separate post, but at BarCamp I will concentrate on the XHTML Flickr API queries.
So if you have 30 minutes of free time this evening (that’s March 10, 2007), please stop by Bourbon Rocks on the 6th street and say hi.
Clairvoyant Software Engineering
While ripping out old code and refactoring late last night, I muttered out something that I just had to write down: one of the most profound skills of a software engineer is the ability to foresee the moment when the negative consequences of implementing a feature outweigh its benefits. Quickly. Perhaps, that’s why the 37signals folks came up with their “It just doesn’t matter” mantra. Obviously, the other important skill is the ability to communicate and argue the point. Perhaps, that’s why all too often, software engineering fails massively on a larger scale.
Attention Google: License ActiveSync!
If any of the Googlers-in-charge are listening, here’s my pure-gold tip of the day:
Buy a license of Microsoft Exchange ActiveSync Protocol.
With the rapid adoption of this protocol as de-facto standard for mobile email client synchronization and proliferation of Windows Mobile devices, it’s a no-brainer.
I bet it will take a couple of nights for 2 of your over-caffeinated server gurus to hack together GMail and Google Calendar support for this, making it possible to sync any ActiveSync-enabled client with your server data.
And then you will offer an ever-too-tempting alternative to the business users who have to stick with the Microsoft Exchange at this time, giving sad, longing looks to your cool email and calendaring suite.
Tags: google, microsoft, pure-gold, activesync.