Sunday, April 12, 2009

Ubiquity vs. Smart Keyword--Two Firefox Addons

What's Smart Keyword

A smart keyword (also known as bookmark keyword, or keymark for short) is a special kind of bookmark that replaces a special sequence, %s, in the bookmark location field (URL) with the text entered after the keyword in the address bar. For example, if you define "g" for Google Search as shown below:



Pressing Ctrl+L sets the input focus to the address bar and selects the entire content. Then, you enter "g Oracle" in the location bar. After pressing Enter, "g Oracle" will be expanded into:
  http://www.google.com/search?hl=en&q=Oracle&aq=f&oq
In summary, the following keystroke sequence let you Google Search "Oracle":

  Ctrl+L > "g Oracle" > Enter


The Similarity

Similarly, Ubiquity command "google" allows you to Google Search "Oracle" in the following keystroke sequence:

  Ctrl+Space > "g Oracle" > Enter

assuming command "google" is the top one on the suggestion list. You can read another post for how Ubiquity works here. Both Ubiquity and Smart Keyword allow users to save mouse clicking and word typing to achieve everyday's browser tasks easier and quicker. Then, what's the difference between Ubiquity and Smart Keyword?


The Difference

In a nutshell, Ubiquity can do what Smart Keyword can do and more. For example, if you select "Oracle" in the browser window, selected word(s) can become the input of Ubiquity command. In this case, you can achieve the same task by:

  Selecting "Oracle" > Ctrl+Space > "g " > Enter


Both Ubiquity commands and Smart Keywords function like command templates. Firefox selects one of the commands to execute with command variable replaced with user's input. In Smart Keyword, there is one variable one command. However, you can have more than one variable in a single Ubiquity command.

The centerpiece of Ubiquity architecture is a natural language parser which can provide user a list of candidate commands based on partially matched results. For the top candidate command on the suggestion list, it immediately generates a preview of the top command results in the preview panel. If the top command on the suggestion list is what user wants, user can hit TAB to automatically complete the command name. As user types more characters or uses arrow key to select commands on the suggestion list, Ubiquity dynamically changes the content of suggestion list and command preview.

Besides good for search, Ubiquity commands can be designed to do almost anything. For example, you can translate selected paragraph from one language to another language, insert selected image from search results to the current cursor position, italicize or underline text, etc.

Based on the group activity on ubiquity-firefox@googlegroups.com, you can tell that Ubiquity has active community supports and it evolves fast. This Firefox addon is still in experimental phase (the latest beta is 0.2pre29). There are a lot of design details to be ironed out. But, I think it has potential to become a big hit. At least, I have found it handy and used it on a daily basis.

Friday, April 3, 2009

What's Ubiquity--User's Perspective

Ubiquity is a Firefox extension and it provides you with a different way to navigate and interact with your computer through the use of keyboard shortcuts and typed commands. Ubiquity let you apply textual commands (called "verbs") to whatever you're looking at on your screen. See here for its formal introduction. You can also view the video below:



Ubiquity for Firefox from Aza Raskin on Vimeo.

Platforms Supported

Ubiquity is cross-platform. Here are a list of platforms it supports with descriptions:



























Mac OS X



  • Need to have Growl installed




    • This is a Mac OS X system extension that applications can use to display unobtrusive transparent messages



Windows



  • On Windows (XP and later), you don't need to install anything special.


Linux



  • On Linux, you shouldn't have to do anything special: just make sure you're updated to the latest version of Firefox.




Where to find Ubiquity?


Ubiquity is still in flux. The latest release is 0.1.7. If you're viewing this post from Firefox, you can get the latest version here. If you're a brave soul, you can get the latest beta vesion here. The installation is a simple Firefox add-on installation. After installation of Ubuiquity, you can start playing with its commands from standard feeds. To see a list of commands available to you, paste the following URL to your Firefox address field:

chrome://ubiquity/content/cmdlist.html



How to launch Ubiquity?

  1. Open up Ubiquity (CTRL+SPACE on Windows and ALT+SPACE on other platforms), and type any command name.

  2. You should see command options on suggestion list or preview pane, complete the command and hit Enter.

Where to get more commands?

There are two sources that you can get more Ubiquity commands from:

After you get started, you'll have a need to manage all your Ubiquity commands. To do that, go to the command management page by pasting the following URL into your Firefox address field:

about:ubiquity


How to subscribe new commands?

After navigating to the command source page in Firefox, you should see a bar at the top of the page asking you to subscribe to the Ubiquity command. If not, then you either do not have Ubiquity installed or you are already subscribed to the command.

What happens when you click on subscribe button?

Ubiquity commands are implemented in Javascript. All Javascripts are deemed potentially dangerous. So, what happens if you click on the subscribe button? At ease. It will bring you to a subscription page like this:



It will show you the content of Javascript source. At the bottom of the page, it shows two buttons for you to either accept or reject the subscription. In Ubiquity 0.2, it redesigns the security model of Ubiquity with command feed plugins. So, you can identify and/or trust your command feeds more easily.

To learn more, check out other blog posts here.

Thursday, April 2, 2009

Understanding URL Syntax of Oracle Application Express

Oracle Aria (i.e., Oracle people search site; this is located in the intranet of Oracle) is built using Oracle Application Express. Oracle Application Express (Oracle APEX) is a rapid web application development tool for the Oracle database.

To build a Ubiquity command for Oracle Aria, you need to understand its URL syntax. Web application built using Oracle APEX is composed of multiple pages. Each application is identified by a unique number (i.e., application ID). Similarly, each page is uniquely identified by its page number.
Applications and pages may also have alphanumeric aliases. Application aliases are unique within a workspace and page aliases are unique within each application.

Understanding URL Syntax

The URL that displays for each page identifies the address of Oracle Application Express, the application ID, page number, and session ID. For example:

http://xxx.us.oracle.com/pls/oracle/f?p=8000:1:7528859885365

This example indicates:
  • xxx.us.oracle.com is the URL of the server
  • pls is the indicator to use the mod_plsql cartridge
  • oracle is the database access descriptor (DAD) name. The DAD describes how HTTP Server connects to the database server so that it can fulfill an HTTP request.
  • f?p= is a prefix used by Oracle APEX
  • 8000 is the application being called
  • 1 is the page within the application to be displayed
  • 7528859885365 is the session ID

You can create URLs to access pages in your application using the following syntax:
  f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

Table 1 describes the arguments you can pass when using f?p syntax.

Syntax Description
App Indicates an application ID or alphanumeric alias.
Page Indicates a page number or alphanumeric alias.
Session Identifies a session ID. You can reference a session ID to create hypertext links to other pages that maintain the same session state by passing the session number.
Request Sets the value of REQUEST. Each application button sets the value of REQUEST to the name of the button. This enables accept processing to reference the name of the button when a user clicks it.
Debug Displays application processing details. Valid values for the DEBUG flag are YES or NO. Setting this flag to YES displays details about application processing.
See Also: "Debugging an Application"
ClearCache Clears the cache. This sets the value of items to null. To clear cached items on a single page, specify the numeric page number. To clear cached items on multiple pages, use a comma-separated list of page numbers. Clearing a page's cache also resets any stateful processes on the page. Individual or comma-separated values can also include collection names to be reset or the keyword RP, which resets region pagination on the requested page. The keyword APP clears cache for all pages and all application-level items in the current application and removes sort preferences for the current user. The keyword SESSION achieves the same result as the APP keyword, but clears items associated with all applications that have been used in the current session. See Also: "Clearing Session State"
itemNames Comma-delimited list of item names used to set session state with a URL.
itemValues List of item values used to set session state within a URL. Item values cannot include colons, but can contain commas if enclosed with backslashes. To pass a comma in an item value, enclose the characters with backslashes. For example:
\123,45\
PrinterFriendly Determines if the page is being rendered in printer friendly mode. If PrinterFriendly is set to Yes, then the page is rendered in printer friendly mode. The value of PrinterFriendly can be used in rendering conditions to remove elements such as regions from the page to optimize printed output. When the value is Yes, the Application Express engine will not display tabs or navigation bars, and all items will be displayed as text and not as form elements.



What Is a Session?

HTTP is a stateless protocol. In web browser, each page request is treated by the server as an independent event, unrelated to any page requests that happened previously or may occur in the future. Typically, when a user enters values into a form on one page, those values are not accessible on later pages.

A session is a logical construct that establishes persistence (or stateful behavior) across page views. Each session is assigned a unique identifier. The Application Express engine uses this identifier (or session ID) to store and retrieve an application's working set of data (or session state) before and after each page view. It transparently maintains session state and provides developers with the ability to get and set session state values from any page in the application.

Using Zero as Session ID

Application pages that do not require authentication can be accessed with "f?p" URLs where the session ID is zero (that is, the single digit 0). When you request a page by either entering the URL in the browser or by clicking on a link having 0 for the session ID, the Application Express engine assigns a new session ID and sends a session cookie containing this new session ID to your browser. As you navigate through the application's public pages, you will see that all generated links to public pages will contain 0 for the session ID and all branches to public pages will have new URLs that use 0 as the visible session ID. Behind the scenes, however, the Application Express engine uses the session ID in the cookie as the actual session ID to locate session state.

This feature is useful when you want to hide the actual session ID. By hiding the session ID, you enable users to bookmark pages without needing to include the session ID in the bookmark link. As an added benefit, using zero as the session ID also keeps the actual session ID hidden from search engines.